Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 202269

Summary: dev-libs/gnutls-2.2.0 relinks to old libs when upgrading
Product: Gentoo Linux Reporter: Alexis Ballier <aballier>
Component: Current packagesAssignee: Crypto team [DISABLED] <crypto+disabled>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: gnutls-2.2.0-selflink.patch

Description Alexis Ballier gentoo-dev 2007-12-14 16:43:41 UTC
after upgrading from 2.0.4 to 2.2.0:
ldd /usr/lib64/libgnutls-extra.so.26.1.1 | grep tls
	libgnutls.so.13 => not found

relink command:
powerpc64-unknown-linux-gnu-gcc -std=gnu99 -shared  .libs/gnutls_extra.o .libs/gnutls_openpgp.o .libs/gnutls_ia.o -Wl,--whole-archive openpgp/.libs/libgnutls_openpgp.a ../lgl/.libs/liblgnu.a -Wl,--no-whole-archive  -L/usr/lib64 -L/var/tmp/portage/net-libs/gnutls-2.2.0/image//usr/lib64 -lopencdk -lnsl -lz -llzo2 -lgcrypt -lgpg-error -lgnutls  -mcpu=970 -mtune=970 -maltivec -mabi=altivec -mcpu=970 -mtune=970 -maltivec -mabi=altivec -Wl,--version-script=./libgnutls-extra.vers -Wl,--as-needed -Wl,-O1 -Wl,--sort-common -Wl,-soname -Wl,libgnutls-extra.so.26 -o .libs/libgnutls-extra.so.26.1.1


See the -L/usr/lib64 coming before the sandbox one.
This is very similar to bug #157746 ; one could argue its libtool fault, but please read that bug before.


For example:
 gnutls-2.2.0 # grep LTLIBOPENCDK *
config.log:LTLIBOPENCDK='-L/usr/lib64 -lopencdk -L/usr/lib64 -lgcrypt -L/usr/lib64 -lnsl -L/usr/lib64 -lgpg-error -L/usr/lib64 -lz'

and in libextra/Makefile.am:
libgnutls_extra_la_LDFLAGS += $(LTLIBOPENCDK)

I'd bet using LIBADD instead of LDFLAGS would fix it.
Comment 1 Alon Bar-Lev (RETIRED) gentoo-dev 2007-12-14 17:41:11 UTC
Created attachment 138481 [details, diff]
gnutls-2.2.0-selflink.patch
Comment 2 Alon Bar-Lev (RETIRED) gentoo-dev 2007-12-14 17:41:25 UTC
Fixed thanks!