[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libtool chooses the wrong library version to link against
From: |
Andreas Metzler |
Subject: |
libtool chooses the wrong library version to link against |
Date: |
Thu, 29 Nov 2007 19:25:19 +0100 |
User-agent: |
tin/1.9.2-20070201 ("Dalaruan") (UNIX) (Linux/2.6.22-3-amd64 (x86_64)) |
Hello,
this is about <http://bugs.debian.org/453035>.
when I am building gnutls on a system with a different version of
gnutls already installed, libtool links the library libgnutls-extra
against /usr/lib/libgnutls.so instead of against the correct new
version DESTDIR/usr/lib/libgnutls.so.
The actual breakage does not happen at build time but at
install time - ../lib/libgnutls.la is translated into -lgnutls:
-----------------------------
libtool: install: warning: relinking `libgnutls-extra.la'
(cd /tmp/GNUTLS/gnutls25-2.1.6/libextra; /bin/bash ../libtool --tag=CC
--mode=relink cc -std=gnu99 -g -Wall -O2 -D_REENTRANT -D_THREAD_SAFE -pipe -g
-Wall -O2 -D_REENTRANT -D_THREAD_SAFE -Wno-pointer-sign -no-undefined
-L/usr/lib -lopencdk -L/usr/lib -lgcrypt -L/usr/lib -lgpg-error -L/usr/lib
-lnsl -L/usr/lib -lz -version-info 25:1:0 -llzo2
-Wl,--version-script=./libgnutls-extra.vers -o libgnutls-extra.la -rpath
/usr/lib gnutls_extra.lo gnutls_openpgp.lo gnutls_ia.lo
openpgp/libgnutls_openpgp.la ../lgl/liblgnu.la ../lib/libgnutls.la
-inst-prefix-dir /tmp/GNUTLS/gnutls25-2.1.6/debian/tmp/)
cc -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/lib
-L/tmp/GNUTLS/gnutls25-2.1.6/debian/tmp//usr/lib -lopencdk -lnsl -lz -llzo2
-lgcrypt -lgpg-error -lgnutls -Wl,--version-script=./libgnutls-extra.vers
-Wl,-soname -Wl,libgnutls-extra.so.25 -o .libs/libgnutls-extra.so.25.0.1
-----------------------------
I think I can remember similar issues with software packages that
shipped a library and a binary linking against this library. (Although
I cannot find the correct reference on google.) This is a different
issue as it is about two depending libraries.
I /think/ the automake is correct:
gnutls25-2.1.6/libextra/Makefile.am
lib_LTLIBRARIES = libgnutls-extra.la
[...]
libgnutls_extra_la_LIBADD += ../lgl/liblgnu.la ../lib/libgnutls.la
This is libtool VERSION="1.5.22 Debian 1.5.22-4", btw. If you think
this is a Debian specific issue I will gladly take it there.
cu andreas
--
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'
- libtool chooses the wrong library version to link against,
Andreas Metzler <=