[PPL-devel] [Fwd: Re: gmp-4.3.1 header and library version mismatch]

Karl-Werner Beszus kwbes at gmx.de
Wed Aug 26 22:58:48 CEST 2009


Am Mittwoch, 26. August 2009 19:15 schrieb Roberto Bagnara:
> What I would do is to take conftest.cpp and compile it by hand, with a command
> like like the above, but with the addition of -v.  This should tell you
> where the GMP 4.2.2 library files are piched up from.

Well, I did this , but it didn't help neither.
The output of "g++ -v" looks clean and nice.

Sitting, thinking and looking at the g++ command,
my eye fell on "-D__SSE2__". Hmm, that sounds familiar.
As you remember, in the last Mail I mentioned, that "sse2" uses theire
own version in separate directories.

So I tried "ldd -d -r '/tmp/conftest'" on the compiled result,
and heureka:
        libgmpxx.so.4 => /usr/lib/sse2/libgmpxx.so.4 (0xb7fa5000)
        libgmp.so.3 => /usr/lib/sse2/libgmp.so.3 (0xb7f6b000)

Fixing that gives me (with the same executable):
        libgmpxx.so.4 => /usr/lib/libgmpxx.so.4 (0xb7f68000)
        libgmp.so.3 => /usr/lib/libgmp.so.3 (0xb7f1d000)

and ./configure:
...
checking how to link with libgmp... /usr/lib/libgmp.so
checking how to link with libgmpxx... /usr/lib/libgmpxx.so -L/usr/lib/gcc/i686-pc-linux-gnu/../.. /usr/lib/libgmp.so
checking for the GMP library version 4.1.3 or above... yes
checking size of mp_limb_t... 4
checking whether GMP has been compiled with support for exceptions... no
checking for __mpz_struct._mp_alloc... yes
checking for __mpz_struct._mp_size... yes
checking for __mpz_struct._mp_d... yes
...

Result:
It was not a compile-time problem, but a problem during runtime!
This is hard to discover when running configure.
The breakthrough was compiling and running the executable by itself.


And not to forget: Thank you very much for your help!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://www.cs.unipr.it/pipermail/ppl-devel/attachments/20090826/8e7940df/attachment.sig>


More information about the PPL-devel mailing list