bug-libtool
[Top][All Lists]
Advanced

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

Re: Follow up.


From: Bob Friesenhahn
Subject: Re: Follow up.
Date: Tue, 19 Nov 2002 18:32:49 -0600 (CST)

On Wed, 20 Nov 2002, Carlo Wood wrote:
>
> Hopefully *does* libtool already look at LD_RUN_PATH, I didn't
> check that -- would libtool also work when I set CXX to

LD_RUN_PATH has nothing to do with where the libraries are installed
at build time.  It is used to hard-code the run-time linker search
path when building a shared library.  The libraries a shared library
depends on may be located in an entirely different place (such as
within the build directory).

> CXX="/usr/local/gcc-3.2/bin/g++ -Wl,-rpath,/usr/local/gcc-3.2/lib"?
> If that is the case then I take back my "only libtool can fuck up like that" 
> :p.

You should take it back anyway.  Submit a tested patch if you believe
you can do better.

> I suppose that libtool tries to support all compilers out there...
> but if the compiler is a g++, then the output of -v while trying to
> link gives enough information in principle.  For example:
>
> >g++-3.2  -L../../.libs -Wl,-rpath -Wl,../../.libs -lecc -lgmpxx  
> >irreducible.o -o irreducible -v
> Reading specs from /usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
> Configured with: /usr/src/gcc/gcc-3.2/configure --prefix=/usr/local/gcc-3.2 
> --enable-shared --with-gnu-as --with-gnu-ld --enable-languages=c++ 
> --enable-debug --enable-threads
> Thread model: posix
> gcc version 3.2
>  /usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/collect2 -m elf_i386 
> -dynamic-linker /lib/ld-linux.so.2 -o irreducible /usr/lib/crt1.o 
> /usr/lib/crti.o 
> /usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/crtbegin.o -L../../.libs 
> -L/usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2 
> -L/usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/../../.. -rpath 
> /usr/local/gcc-3.2/lib: -rpath ../../.libs -lecc -lgmpxx irreducible.o 
> -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc 
> /usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/crtend.o /usr/lib/crtn.o
>
> Which includes the phrase 
> "-L/usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/../../.."
> in the collect2 line.  Actually I think that there is a way to let g++ print 
> exactly
> which library it is using - but I don't know the options for that, they might 
> not
> even be documented.

The option is -print-search-dirs and appears in the output of
'gcc --help'.  Libtool does use this to determine where libraries will
be found.  Note that the output of -print-search-dirs is somewhat
different with the gcc 3.X versions than it was with the 2.X.X
versions, and I did fix a libtool bug related to that.

What version of libtool are you using?

Bob
======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen





reply via email to

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