Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[closed] Binaries not linked to libz: -Wl,-hashvals breakage
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
mcosta
n00b
n00b


Joined: 20 Dec 2005
Posts: 22

PostPosted: Sun Dec 03, 2006 12:49 am    Post subject: [closed] Binaries not linked to libz: -Wl,-hashvals breakage Reply with quote

I do not mean they can not find libz. ldd does not shows it. For example:

Code:
 /usr/lib/libpng.so | grep libz


shows nothing. Same with beryl, dpkg (I use it to extract .deb) and a bunch of others, even if I re-emerge them[.

gnupg, exiv2 and gtk does not emerge. exiv2 tells

Code:

x86_64-pc-linux-gnu-g++ -march=athlon64 -O2 -pipe -fweb -frename-registers -pedantic -Wall -Wundef -Wcast-align -Wconversion -Wpointer-arith -Wformat-security -Wmissing-format-attribute -W -MMD -Wl,-O1 -Wl,-hashvals -Wl,-zdynsort -o .libs/addmoddel addmoddel.o  ./.libs/libexiv2.so -Wl,--rpath -Wl,/usr/lib64
./.libs/libexiv2.so: undefined reference to `uncompress'
collect2: ld returned 1 exit status
make: *** [addmoddel] Error 1


If I run the order with -lz compiles, but the resulting binary does not link to libz. gtk try to read a png, so fails. gnupg try to make a test and ends with the "undefined reference to `uncompress'" mesage. beryl starts but crash:

Code:

XGL Absent, checking for NVIDIA
Nvidia Present
Relaunching beryl with __GL_YIELD="NOTHING"
XGL Absent, checking for NVIDIA
Nvidia Present
beryl: symbol lookup error: /usr/lib/libpng12.so.0: undefined symbol: inflateInit_


Of course, that symbol is in libz:

Code:

[~]$ nm -D /lib/libz.so | grep inflateInit_
0000003002408ab0 T inflateInit_


My emerge --info


Code:

Portage 2.1.2_rc2-r3 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.16-beyond4 x86_64)
=================================================================
System uname: 2.6.16-beyond4 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.6
Last Sync: Fri, 01 Dec 2006 08:50:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -fweb -frename-registers"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=athlon64 -O2 -pipe -fweb -frename-registers"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks fixpackages metadata-transfer noinfo prelink sandbox sfperms splitdebug strict"
GENTOO_MIRRORS="http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="es_ES@euro"
LDFLAGS="-Wl,-O1 -Wl,-hashvals -Wl,-zdynsort "
LINGUAS="es es_ES"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes "
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/sunrise"
SYNC="rsync://ftp.belnet.be/gentoo-portage/"
USE="amd64 X aac aiglx alsa bash-completion berkdb bitmap-fonts bzip2 cli cracklib crypt cups dbus dlloader dri dts dvd dvdr dvdread elibc_glibc erandom ffmpeg fortran gdbm gif hal iconv input_devices_keyboard input_devices_mouse isdnlog jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility kdenewldflags kernel_linux libg++ linguas_es linguas_es_ES mp3 ncurses nls nptl nptlonly nvidia ogg opengl pam pcre perl pic png ppds pppd python qt qt3 qt4 readline reflection session skey spl ssl svg tcpd theora tiff truetype truetype-fonts type1-fonts udev unicode userland_GNU v4l2 video_cards_nv video_cards_nvidia video_cards_vesa vorbis xml xorg xvid zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL


Notes: revdep-rebuild does not detect breakage because all listed linked libs are there so it does nothing. with LD_PRELOAD=/lib/libz.so apps works fine. I have emerged libpng and beryl-core adding to LDCONFIG -Wl,--as-needed' once and '-Wl,--add-needed' in another try: nothing, compiles, but does not run.

Thanks for reading


Last edited by mcosta on Tue Dec 05, 2006 4:59 pm; edited 1 time in total
Back to top
View user's profile Send private message
mcosta
n00b
n00b


Joined: 20 Dec 2005
Posts: 22

PostPosted: Tue Dec 05, 2006 4:46 pm    Post subject: solved Reply with quote

It has costed me many hours to catch a little detail. I had in LDCONFIG -Wl,-hashvals. That affects the SONAME of the libs. I saw it here:

http://swik.net/GNOME/Planet+GNOME/Michael+Meeks+(michael):+2006-02-13:+Monday/b2nq

Right now I'm rebuilding all the system to get rid of the effect (deffect). I had that LDCONFIG long ago. I do not remember when or why I placed it, but I am conservative with my flags. But *sure* it's been (2 or 3 weeks ago) a recent ld upgrade that made appear the bug/deffect.

Many libs are "contamined", for example:

Code:
[~]$ ldd /usr/lib/libfontenc.so
   ashvals => /usr/lib/ashvals (0x00002ab540e04000)
   libc.so.6 => /lib/libc.so.6 (0x00002ab540f85000)
   libm.so.6 => /lib/libm.so.6 (0x00002ab5411bf000)
   /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)


So, do no use -Wl,-hashvals
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum