[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libtool chooses the wrong library version to link against

From: Peter O'Gorman
Subject: Re: libtool chooses the wrong library version to link against
Date: Thu, 29 Nov 2007 14:58:19 -0600
User-agent: Thunderbird (X11/20071115)

Andreas Metzler wrote:
> Peter O'Gorman <address@hidden> wrote:
>> Andreas Metzler wrote:
>>> 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/)
> [...]
>>> -----------------------------
>> Do you know where the -L/usr/lib is coming from?
> I did not realize they were unusual, I seem to get them for every
> single library. - Any hint where I could start digging? Might this be
> related to the fact that I am running an i486 installation on a amd64
> kernel?
> cu andreas

I have not even tried to reproduce, so have no idea where you might be
getting them from. However, I do not know of a linker that does not
search /usr/lib for libraries by default (not to say that  there is not
one, just that I do not know of one), so I would think that these are
safe to remove. It is their presence that causes the incorrect library
to be used. Libtool did add a
-L/tmp/GNUTLS/gnutls25-2.1.6/debian/tmp//usr/lib but it came after a
previously mentioned -L/usr/lib which causes the incorrect lib to be used.

It guess you could still call it a libtool bug though, we probably
should be ensuring that -L$(DESTDIR)${libdir} comes before any other -L
on the link line.

Peter O'Gorman

reply via email to

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