[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in libtool
From: |
Carlo Wood |
Subject: |
Bug in libtool |
Date: |
Wed, 20 Nov 2002 00:10:54 +0100 |
User-agent: |
Mutt/1.2.5i |
As a developer of C++ libraries, I need to have multiple
versions of g++ installed, in order to test if my libraries
work with each of them.
These compilers are simply configured with a different
prefix and installed. My default compiler is redhat 2.96
and resides in prefix /usr. All other versions have
prefix /usr/local/gcc-VERSION.
When I do tests that involve a third party C++ library,
then I compile that library several times, using the same
prefix as the compiler version that I use at that moment.
For example, I have installed libgmpxx for versions 2.96
and 3.2:
~/c++/libecc>locate libgmpxx
/usr/local/gcc-3.2/lib/libgmpxx.so.3.0.2
/usr/local/gcc-3.2/lib/libgmpxx.so.3
/usr/local/gcc-3.2/lib/libgmpxx.so
/usr/local/gcc-3.2/lib/libgmpxx.la
/usr/lib/libgmpxx.so.3
/usr/lib/libgmpxx.so.3.0.2
/usr/lib/libgmpxx.a
/usr/lib/libgmpxx.la
/usr/lib/libgmpxx.so
When using g++-2.96, this will of course find and link with
the one in /usr/lib, which was also compiled with 2.96.
When I use g++-3.2, then it DOES find and link with the
one in /usr/local/gcc-3.2/lib. In other words: this works
perfectly and as it should.
Now comes libtool :( ...
In my current project I use in the configure.in file:
AC_CHECK_LIB(gmpxx, __gmpz_set)
When I have set CC=gcc-3.2 and CXX=g++-3.2, then it
uses that compiler version to find -lgmpxx ... and then
links in the end as:
gcc-3.2 -shared libecc_la-debug.lo libecc_la-rng.lo libecc_la-sha.lo
libecc_la-square.lo -L/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../..
-L/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../../i386-redhat-linux/lib
-L/usr/lib/gcc-lib/i386-redhat-linux/2.96 -L/usr/lib /usr/lib/libgmpxx.so
-Wl,-soname -Wl,libecc.so.0 -o .libs/libecc.so.0.4.0
HORRIBLE!
Sorry, but only libtool can fuck up like that :/
Obviously it uses /usr/lib/libgmpxx.la for this '2.96' info. That is
ridiculous,
the compiler (g++-3.2) does NOT link with that - so why use it?
You should find out what the compiler actually USES and then search for a
'libgmpxx.la' in the same directory!
--
Carlo Wood <address@hidden>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Bug in libtool,
Carlo Wood <=