This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc 4.6.1 compile fails in linking stage - libgmp.so in wrong format


Here's what I did for setup:

(1) I compiled GMP, MPFR, and MPC.? As far as I can tell, all the libs created are 64-bit.


(2) set LD_LIBRARY_PATH=/home/smith/GMP/lib:/home/smith/MPFR/lib:/home/smith/MPC/lib:

(3) ./configure --prefix=/home/smith/GCC461 --with-gmp=/home/smith/GMP --with-mpfr=/home/smith/mpfr --with-mpc=/home/smith/mpc

gmake

but the -m32's are creeping in somehow.


--Steve



----- Original Message -----
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: steve kirby <thin_runner@yahoo.com>
Cc: GCC HELP <gcc-help@gcc.gnu.org>
Sent: Tuesday, October 25, 2011 3:13 PM
Subject: Re: gcc 4.6.1 compile fails in linking stage - libgmp.so in wrong format

On 25 October 2011 22:09, steve kirby wrote:
> Hi,
>
> here's the error I see in the GCC linking phase:
>
>
> libtool: link: /home/smith/gcc-4.6.1/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/smith/gcc-4.6.1/host-x86_64-unknown-linux-gnu/gcc/ -B/home/smith/GCC461/x86_64-unknown-linux-gnu/bin/ -B/home/smith/GCC461/x86_64-unknown-linux-gnu/lib/ -isystem /home/smith/GCC461/x86_64-unknown-linux-gnu/include -isystem /home/smith/GCC461/x86_64-unknown-linux-gnu/sys-include? -m32 -shared? .libs/gnu_java_math_GMP.o ../../../native/jni/classpath/.libs/jcl.o?? -Wl,-rpath -Wl,/home/smith/GMP/lib -Wl,-rpath -Wl,/home/smith/GMP/lib -L/home/smith/GMP/lib /home/smith/GMP/lib/libgmp.so? -m32 -m32 -m32?? -Wl,-soname -Wl,libjavamath.so -o .libs/libjavamath.so
> /home/smith/GMP/lib/libgmp.so: could not read symbols: File in wrong format
> collect2: ld returned 1 exit status
>
> I checked the file that libgmp.so is sym. linked to and it is 64-bit.? Is my problem here the -m32's?

Yes.

>? If so, can anyone please clue me in on how to make them -m64.

It looks as though you're linking a 32-bit lib, so you don't want to
make them -m64

> If -m32 isn't the problem, please let me know what is.

It is the problem, but it's hard to know why it's happened because you
didn't say how you configured GCC.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]