[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: relinking makes libtool link to the wrong library
From: |
Simon Josefsson |
Subject: |
Re: relinking makes libtool link to the wrong library |
Date: |
Fri, 11 Jan 2008 16:47:44 +0100 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux) |
Ralf Wildenhues <address@hidden> writes:
> Hi Simon,
>
> 0) I forgot to ask: is this libtool 1.5.24?
Yes. From debian testing.
> 1) ../lib/libgnutls.la has dependency_libs entry that contains -L/usr/lib
> and -L/usr/local/lib, both wrongly I think. Why is that? To find out,
> please send `libtool --debug --mode=link' output (not relink) for the
> creation of ../lib/libgnutls.la.
>
> (I assume that your libz is in /usr/lib not /usr/local/lib.
> If that's a false assumption, then the -L/usr/local/lib would have a
> reason to be there.)
See libtool-debug2.txt.bz2 below.
I suspect /usr/lib is from libtasn1, and -L/usr/local/lib is from
libgcrypt. Exactly how they are propagated I'm not sure.
> 2) ../lgl/liblgnu.la has dependency_libs entry that contains
> -L/usr/local/lib. That doesn't look right either:
>
> | ++ dlname=
> | ++ library_names=
> | ++ old_library=liblgnu.a
> | ++ dependency_libs=' -L/usr/local/lib /usr/local/lib/libgcrypt.la
> /usr/lib/libgpg-error.la'
This is from libgcrypt.la, lgl/Makefile.am:
if GL_COND_LIBTOOL
liblgnu_la_LDFLAGS += $(LTLIBGCRYPT)
endif
And from lgl/Makefile:
LTLIBGCRYPT = -L/usr/local/lib -lgcrypt -lgpg-error
Is this a gnulib bug? I.e., should that be LIBADD?
> 3) /usr/local/lib/libgcrypt.la also contains a -L/usr/local/lib which I
> don't understand. For now, you could try just removing it from the file.
> (That's probably where that one in ../lgl/liblgnu.la came from.)
Right. I've removed it. This libgcrypt is built locally from SVN.
However, I recall that I was able to reproduce this problem using the
system libgcrypt too earlier.
> 4) "-lopencdk -llzo2" don't belong in LDFLAGS, they belong in
> *_LIBADD/*_LDADD. Put them after the ../lib-just-built-lib.la args
> for good measure.
Hm. Where does -L belong? Also LDFLAGS? The -lopencdk comes
'pkg-config --libs opencdk' which output '-L/usr/local/lib -lopencdk'.
I could use pkg-config --libs-only-l and --libs-only-L but would prefer
not to.
> Quite possible that we have to play this game a bit longer still,
> so if after the above issues are fixed, libgnutls_extra still has
> -L/usr/lib early, please just send a debug output of the relink again.
Given your hints, I'll try to debug things a bit more.
Thanks,
/Simon
libtool-debug2.txt.bz2
Description: Binary data
Re: relinking makes libtool link to the wrong library, Roumen Petrov, 2008/01/11