[Clfs-dev] multilib 10.(12 14) mpfr/mpc 32_bit

Chris Staub chris at beaker67.com
Wed Jan 8 09:31:14 PST 2014


On 01/08/14 12:07, Pierre Lorenzon wrote:
>
> Hi,
>
> I exprerimented following problem :
>
> checking for __gmpz_init in -lgmp... no configure: error:
> libgmp not found or uses a different ABI (including static vs
> shared).  Please read the INSTALL file -- see "In case of
> problem".  Both with mpfr and mpc when compiling for 32 bits
> libraries. 64 bits seems to make no problem.
>
> I solved the problem for mpfr by passing the --with-gmp=/usr to
> the configure script and will see if it works as well for
> mpc. The system behaves as if the code was linked against a non
> suitable gmp. The one in cross-tools ? I cannot figure out
> myself what is the problem. Indeed le linking options passed to
> ld seems to say that the libraries have to be found in /usr/lib
> or /lib. Why seems this flag to be inefficient at this point :
> I do not know even if the error reported in the config.log file
> has to delal with the linking stage :
>
> configure:13214: checking for __gmpz_init in -lgmp
> configure:13239: gcc -isystem /usr/include -m32 -o conftest -g -O2  -Wl,-rpath-link,/usr/lib:/lib -m32 conftest.c -lgmp  -lm  >&5
> /tools/lib64/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../x86_64-unknown-linux-gnu/bin/ld: skipping incompatible /tools/lib64/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../libgmp.so when searching for -lgmp
> /tools/lib64/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../x86_64-unknown-linux-gnu/bin/ld: skipping incompatible /tools/lib64/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../libgmp.a when searching for -lgmp
> /tools/lib64/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../x86_64-unknown-linux-gnu/bin/ld: skipping incompatible /tools/lib64/libgmp.so when searching for -lgmp
> /tools/lib64/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../x86_64-unknown-linux-gnu/bin/ld: skipping incompatible /tools/lib64/libgmp.a when searching for -lgmp
> /tools/lib64/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find -lgmp
> collect2: error: ld returned 1 exit status
> configure:13239: $? = 1
> configure: failed program was:
>
> Regards
>
> Pierre

What is the result of this:

echo 'main(){}' > dummy.c
gcc ${BUILD32} dummy.c
readelf -l a.out | grep ': /lib'



More information about the Clfs-dev mailing list