Re: libtool chooses the wrong library version to link against

2007-12-01 Thread Andreas Metzler
Andreas Metzler <[EMAIL PROTECTED]> wrote:
> Might this be related to the fact that I am running an i486
> installation on a amd64 kernel?

That is not the case, running an ix86 kernel does not change a thing.
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'



___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool chooses the wrong library version to link against

2007-12-01 Thread Roumen Petrov

Peter O'Gorman wrote:

Andreas Metzler wrote:
  

Peter O'Gorman <[EMAIL PROTECTED]> 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/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/)


[...]


-


Do you know where the -L/usr/lib is coming from?
  

It should from a dependent library.
I guess that first this is from opencdk and second from gpg-error.
I think from opencdk (/usr/lib/libopencdk.la ?) in reported case result is:

-L/usr/lib -lopencdk -L/usr/lib -lgcrypt

Since GNU crypto use xxx-config files to find location may be 
opencdk-config report -L/usr/lib ... and as result -L... appear in Makefile.


Andreas what is content of Makefile (i.e. please check for -L.. flag) ?
As example you could run:
grep -e -L */Makefile



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, should -L$(DESTDIR)${libdir} precede -rpath ?
Also some projects use flag -rpath-link .


Peter
  



Roumen



___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool chooses the wrong library version to link against

2007-12-01 Thread Kurt Roeckx
On Thu, Nov 29, 2007 at 07:25:19PM +0100, Andreas Metzler wrote:
> Hello,
> 
> this is about .

You might also want to read:
http://bugs.debian.org/320698


Kurt



___
http://lists.gnu.org/mailman/listinfo/libtool