[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))


this is about <>.

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/ instead of against the correct new
version DESTDIR/usr/lib/

The actual breakage does not happen at build time but at
install time - ../lib/ is translated into -lgnutls:
libtool: install: warning: relinking `'
(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 -rpath 
/usr/lib gnutls_extra.lo gnutls_openpgp.lo gnutls_ia.lo 
openpgp/ ../lgl/ ../lib/ 
-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, -o .libs/

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:

libgnutls_extra_la_LIBADD += ../lgl/ ../lib/

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'

reply via email to

[Prev in Thread] Current Thread [Next in Thread]