Re: [PPL-devel] Can't find GMP, but it's installed

On 05/11/11 14:18, rafael ff1 wrote:
2011/5/11 Roberto Bagnarabagnara@cs.unipr.it:
What is the contents of the `config.log' file generated by the `configure' script? Cheers,
Roberto
-- Prof. Roberto Bagnara Applied Formal Methods Laboratory Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~bagnara/ mailto:bagnara@cs.unipr.it _______________________________________________ PPL-devel mailing list PPL-devel@cs.unipr.it http://www.cs.unipr.it/mailman/listinfo/ppl-devel
I'm sending as attachment a config.log for the aforementioned configure script and another one with ld library path forced. Please let me know if you don't receive it - some mail lists block attachments...
Rafael
Hi Rafael,
the config.log you sent does not seem to match the file fail-build.log you sent earlier. The latter says:
checking how to link with libgmp... /usr/lib32/libgmp.so -Wl,-rpath -Wl,/usr/lib32 checking how to link with libgmpxx... /usr/lib32/libgmpxx.so /usr/lib32/libgmp.so -Wl,-rpath -Wl,/usr/lib32 -Wl,-rpath -Wl,/usr/lib32
which looks correct to me. The former says:
configure:10129: checking how to link with libgmp configure:10602: result: /usr/lib/libgmp.so configure:10644: checking how to link with libgmpxx configure:11117: result: /usr/lib/libgmpxx.so /usr/lib/libgmp.so
which is very different and very wrong, since it is because of that that later we have:
configure:11252: g++ -m32 -o conftest -g -O2 -frounding-math -march=x86-64 -mtune=generic -O2 -pipe -Wl,--hash-style=gnu -Wl,--as-needed conftest.cpp /usr/lib/libgmpxx.so /usr/lib/libgmp.so >&5 /usr/lib/libgmpxx.so: could not read symbols: File in wrong format collect2: ld returned 1 exit status
This is caused by the fact that g++ is given the x86_64 version of GMP.
Please direct all messages to ppl-devel@cs.unipr.it. Cheers,
Roberto

2011/5/11 Roberto Bagnara bagnara@cs.unipr.it
the config.log you sent does not seem to match the file fail-build.log you sent earlier. The latter says:
I guess I used LD_LIBRARY_PATH setting, but didn't mentioned. Can't remember for sure, sorry. But what about the other config.log, which has results with LD_LIBRARY_APTH set? Libraries were pointing to /usr/lib32, which - in may little experience as lib32 packaging - should work fine.
I tried again and I'm sending the build log and config.log.. I hope it helps to debug.
Command line was:
export CFLAGS="-m32 -mtune=generic -O2 -pipe" export CXXFLAGS="-m32 -mtune=generic -O2 -pipe"
./configure --prefix=/usr --enable-interfaces="c,cxx" \ --libdir=/usr/lib32 --libexecdir=/usr/lib32
Please direct all messages to ppl-devel@cs.unipr.it.
Sorry, it was automatic. Sending to correct address now.
Cheers,
Roberto
-- Prof. Roberto Bagnara Applied Formal Methods Laboratory Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~bagnara/ mailto:bagnara@cs.unipr.it
Thanks
-- Rafael

On 05/11/11 23:07, Rafael Fontenelle wrote:
2011/5/11 Roberto Bagnara <bagnara@cs.unipr.it mailto:bagnara@cs.unipr.it>
the config.log you sent does not seem to match the file fail-build.log you sent earlier. The latter says:
I guess I used LD_LIBRARY_PATH setting, but didn't mentioned. Can't remember for sure, sorry. But what about the other config.log, which has results with LD_LIBRARY_APTH set? Libraries were pointing to /usr/lib32, which - in may little experience as lib32 packaging - should work fine.
I tried again and I'm sending the build log and config.log.. I hope it helps to debug.
This is the relevant part in config.log:
GMP header (gmp.h) and library (ligmp.*) bits-per-limb mismatch: header gives 64; library gives 32. This probably means you are on a bi-arch system and you are compiling with the wrong header or linking with the wrong library.
Cheers,
Roberto

2011/5/12 Roberto Bagnara bagnara@cs.unipr.it
On 05/11/11 23:07, Rafael Fontenelle wrote:
2011/5/11 Roberto Bagnara <bagnara@cs.unipr.it mailto: bagnara@cs.unipr.it>
the config.log you sent does not seem to match the file fail-build.log you sent earlier. The latter says:
I guess I used LD_LIBRARY_PATH setting, but didn't mentioned. Can't remember for sure, sorry. But what about the other config.log, which has results with LD_LIBRARY_APTH set? Libraries were pointing to /usr/lib32, which - in may little experience as lib32 packaging - should work fine.
I tried again and I'm sending the build log and config.log.. I hope it helps to debug.
This is the relevant part in config.log:
GMP header (gmp.h) and library (ligmp.*) bits-per-limb mismatch: header gives 64; library gives 32. This probably means you are on a bi-arch system and you are compiling with the wrong header or linking with the wrong library.
Cheers,
Roberto
-- Prof. Roberto Bagnara Applied Formal Methods Laboratory Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~bagnara/ mailto:bagnara@cs.unipr.it
Therefore I need to force the gmp headers path with LDPATH+=" -I/usr/lib32/gmp/include" and it works!
Thanks a lot!
-- Rafael

2011/5/13 Rafael Fontenelle rffontenelle@gmail.com:
2011/5/12 Roberto Bagnara bagnara@cs.unipr.it
On 05/11/11 23:07, Rafael Fontenelle wrote:
2011/5/11 Roberto Bagnara <bagnara@cs.unipr.it mailto:bagnara@cs.unipr.it>
the config.log you sent does not seem to match the file fail-build.log you sent earlier. The latter says:
I guess I used LD_LIBRARY_PATH setting, but didn't mentioned. Can't remember for sure, sorry. But what about the other config.log, which has results with LD_LIBRARY_APTH set? Libraries were pointing to /usr/lib32, which - in may little experience as lib32 packaging - should work fine.
I tried again and I'm sending the build log and config.log.. I hope it helps to debug.
This is the relevant part in config.log:
GMP header (gmp.h) and library (ligmp.*) bits-per-limb mismatch: header gives 64; library gives 32. This probably means you are on a bi-arch system and you are compiling with the wrong header or linking with the wrong library.
Cheers,
Roberto
-- Prof. Roberto Bagnara Applied Formal Methods Laboratory Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~bagnara/ mailto:bagnara@cs.unipr.it
Therefore I need to force the gmp headers path with LDPATH+=" -I/usr/lib32/gmp/include" and it works! Thanks a lot! -- Rafael _______________________________________________ PPL-devel mailing list PPL-devel@cs.unipr.it http://www.cs.unipr.it/mailman/listinfo/ppl-devel
Mr. Roberto Bagnara,
Some time ago you help me to find out what was the problem building 32-bit library for 64-bit system (a lib32 package), which I solved by pointing out to 32 bit headers of GMP.
My problem now is someone else adopted the lib32-gmp package and removed the headers (This is, in matter of fact, the default for lib32 packages in Archlinux. Ex: package 'gmp' cointains header and everything else 64-bit for 64 bit system [1], while 'lib32-gmp' contains only 32-bit libs for 64-bit system [2]).
How can I (if possible) compile 32-bit PPL 0.11.2 for 64-bit system using headers from 64-bit gmp and the 32-bit library from lib32-gmp ?
[1] https://www.archlinux.org/packages/core/x86_64/gmp/files/ [2] https://www.archlinux.org/packages/multilib/x86_64/lib32-gmp/files/
Thanks,
-- Rafael
participants (3)
-
rafael ff1
-
Rafael Fontenelle
-
Roberto Bagnara