bug-libtool
[Top][All Lists]
Advanced

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

Re: looks like bug


From: Arkadiusz Miskiewicz
Subject: Re: looks like bug
Date: Fri, 11 May 2001 22:08:54 +0200
User-agent: Mutt/1.3.17i

On/Dnia Fri, May 11, 2001 at 10:56:57AM -0500, Robert Boehne wrote/napisał(a)
> I see a few problems here, first, you say you're using
> libtool 1.4, but your library begs to differ:
> > # Generated by ltmain.sh - GNU libtool 1.3.4 (1.385.2.196 1999/12/07 
> > 21:47:57)
So this config was generated by older version of libtool. AFAIK format
of this config didn't change, so it's not important which litool version 
generated it.

> Second, you appear to be installing in the build directory
> because these lines:
> 
> > # Is this an already installed library?
> > installed=yes
> > 
> > # Directory that this library needs to be installed in:
> > libdir='./'
This was manual change of libdir= to create small test-case. I usually have
this file as /usr/lib/libdb-3.1.la and:
installed=yes
libdir='/usr/lib'

> `-all-static'
>      If OUTPUT-FILE is a program, then do not link it against any
>      shared libraries at all.  If OUTPUT-FILE is a library, then only
>      create a static library.
> 
> It seems that -all-static should not link any shared libraries, but
> closer inspection shows that the gcc option '-static' is provided.
Yup. IMO it shouldn't use shared lib but libtool puts .//libdb-3.1.so
at gcc command line. Why? old_library='' so there is no static library.

> The -static option will not link to shared objects, so even though
> the so is provided on the link line it won't get used.
It's obvious. Whole problem is here:
# /bin/sh libtool --mode=link gcc  -o test -s -all-static test.o ./libdb-3.1.la
(Note that there is old_library='' in libdb-3.1.la; no static library)
gcc -o test -s -static test.o  .//libdb-3.1.so -Wl,--rpath -Wl,./ -Wl,--rpath 
-Wl,./
... libtool calls gcc with ,,./libdb-3.1.so'' (as it should do but for
_static_ library only) so for me it's libtool bug.

> I wonder if you can link this from the command line
> without libtool.  
gcc -o test -s -static test.o  .//libdb-3.1.so
won't work and it's ok.

> Robert
> > # Names of this library.
> > library_names='libdb-3.1.so libdb-3.1.so libdb-3.1.so'
> > 
> > # The name of the static archive.
> > old_library=''
> > 
...
> > Note that there is no static library in old_library and now:
> > address@hidden libtool-test]$ make
> > gcc -c test.c
> > /bin/sh libtool --mode=link gcc  -o test -s -all-static test.o 
> > ./libdb-3.1.la
> >                                             ^^^^^^^^^^^
> > gcc -o test -s -static test.o  .//libdb-3.1.so -Wl,--rpath -Wl,./ 
> > -Wl,--rpath -Wl,./
> >                                ^^^^^^^^^^^^^^^
> > /usr/bin/ld: /lib/ld-linux.so.2: indirect symbol `__libc_internal_tsd_set' 
> > to `__libc_internal_tsd_set@@GLIBC_2.0' is a loop
> > /lib/ld-linux.so.2: could not read symbols: Invalid operation
> > collect2: ld returned 1 exit status
> > make: *** [all] B??d 1
> > address@hidden libtool-test]$


> Robert Boehne             Software Engineer

-- 
Arkadiusz Miśkiewicz, AM2-6BONE    [ PLD GNU/Linux IPv6 ]
http://www.t17.ds.pwr.wroc.pl/~misiek/ipv6/   [ enabled ]



reply via email to

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