public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* gcc 4.6.1 compile fails in linking stage - libgmp.so in wrong format
@ 2011-10-25 21:10 steve kirby
  2011-10-25 21:14 ` Jonathan Wakely
  0 siblings, 1 reply; 8+ messages in thread
From: steve kirby @ 2011-10-25 21:10 UTC (permalink / raw)
  To: GCC HELP

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?  If so, can anyone please clue me in on how to make them -m64.

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


TIA,
Steve

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gcc 4.6.1 compile fails in linking stage - libgmp.so in wrong format
  2011-10-25 21:10 gcc 4.6.1 compile fails in linking stage - libgmp.so in wrong format steve kirby
@ 2011-10-25 21:14 ` Jonathan Wakely
  2011-10-25 22:35   ` steve kirby
  0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Wakely @ 2011-10-25 21:14 UTC (permalink / raw)
  To: steve kirby; +Cc: GCC HELP

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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gcc 4.6.1 compile fails in linking stage - libgmp.so in wrong format
  2011-10-25 21:14 ` Jonathan Wakely
@ 2011-10-25 22:35   ` steve kirby
  2011-10-25 22:43     ` Jonathan Wakely
  0 siblings, 1 reply; 8+ messages in thread
From: steve kirby @ 2011-10-25 22:35 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: GCC HELP

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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gcc 4.6.1 compile fails in linking stage - libgmp.so in wrong format
  2011-10-25 22:35   ` steve kirby
@ 2011-10-25 22:43     ` Jonathan Wakely
  2011-10-26 15:49       ` steve kirby
  0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Wakely @ 2011-10-25 22:43 UTC (permalink / raw)
  To: steve kirby; +Cc: GCC HELP

On 25 October 2011 23:35, steve kirby wrote:
> 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:

Is there a good reason you didn't put the GMP, MPFR and MPC sources in
the GCC source tree and just let GCC build them itself?

There's a script to do that in the gcc source dir, just run
./contrib/download_prerequisites

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

Do not run ./configure, see http://gcc.gnu.org/wiki/FAQ#configure

> gmake
>
> but the -m32's are creeping in somehow.

Probably when building 32-bit libs, x86_64 is a multilib platform,
meaning it builds 32-bit and 64-bit libs.  You could stop it building
the 32-bit ones with --disable-multilib but that;s probably not what
you want to do.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gcc 4.6.1 compile fails in linking stage - libgmp.so in wrong format
  2011-10-25 22:43     ` Jonathan Wakely
@ 2011-10-26 15:49       ` steve kirby
  2011-10-26 15:58         ` Marc Glisse
  0 siblings, 1 reply; 8+ messages in thread
From: steve kirby @ 2011-10-26 15:49 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: GCC HELP

I put the src trees of gmp, mpfr, and mpc under the gcc tree, linked "gmp", "mpfr", "mpc" directories to each of these src trees. Then called configure, in a separate tree, as recommended.

But I'm getting:

checking for recent MPFR... no
configure: error: MPFR version >= 2.3.1 required

The MPFR version in the GCC tree is 3.1.0.

What do you recommend I do?

TIA,
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 4:42 PM
Subject: Re: gcc 4.6.1 compile fails in linking stage - libgmp.so in wrong format

On 25 October 2011 23:35, steve kirby wrote:
> 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:

Is there a good reason you didn't put the GMP, MPFR and MPC sources in
the GCC source tree and just let GCC build them itself?

There's a script to do that in the gcc source dir, just run
./contrib/download_prerequisites

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

Do not run ./configure, see http://gcc.gnu.org/wiki/FAQ#configure

> gmake
>
> but the -m32's are creeping in somehow.

Probably when building 32-bit libs, x86_64 is a multilib platform,
meaning it builds 32-bit and 64-bit libs.  You could stop it building
the 32-bit ones with --disable-multilib but that;s probably not what
you want to do.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gcc 4.6.1 compile fails in linking stage - libgmp.so in wrong format
  2011-10-26 15:49       ` steve kirby
@ 2011-10-26 15:58         ` Marc Glisse
  2011-10-26 17:29           ` Jonathan Wakely
  2011-10-26 17:47           ` steve kirby
  0 siblings, 2 replies; 8+ messages in thread
From: Marc Glisse @ 2011-10-26 15:58 UTC (permalink / raw)
  To: steve kirby; +Cc: Jonathan Wakely, GCC HELP

On Wed, 26 Oct 2011, steve kirby wrote:

> I put the src trees of gmp, mpfr, and mpc under the gcc tree, linked "gmp", "mpfr", "mpc" directories to each of these src trees. Then called configure, in a separate tree, as recommended.
>
> But I'm getting:
>
> checking for recent MPFR... no
> configure: error: MPFR version >= 2.3.1 required
>
> The MPFR version in the GCC tree is 3.1.0.
>
> What do you recommend I do?

Take an older mpfr version (like the contrib script does). Newer mpfr 
versions hide their configure script in src, and gcc hasn't been updated 
for that yet (or at least it hadn't been for 4.6.1).

-- 
Marc Glisse

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gcc 4.6.1 compile fails in linking stage - libgmp.so in wrong format
  2011-10-26 15:58         ` Marc Glisse
@ 2011-10-26 17:29           ` Jonathan Wakely
  2011-10-26 17:47           ` steve kirby
  1 sibling, 0 replies; 8+ messages in thread
From: Jonathan Wakely @ 2011-10-26 17:29 UTC (permalink / raw)
  To: gcc-help; +Cc: steve kirby

On 26 October 2011 16:57, Marc Glisse wrote:
> On Wed, 26 Oct 2011, steve kirby wrote:
>
>> I put the src trees of gmp, mpfr, and mpc under the gcc tree, linked
>> "gmp", "mpfr", "mpc" directories to each of these src trees. Then called
>> configure, in a separate tree, as recommended.
>>
>> But I'm getting:
>>
>> checking for recent MPFR... no
>> configure: error: MPFR version >= 2.3.1 required
>>
>> The MPFR version in the GCC tree is 3.1.0.
>>
>> What do you recommend I do?
>
> Take an older mpfr version (like the contrib script does). Newer mpfr
> versions hide their configure script in src, and gcc hasn't been updated for
> that yet (or at least it hadn't been for 4.6.1).

Yup.  MPFR 3.0.1 works ok.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gcc 4.6.1 compile fails in linking stage - libgmp.so in wrong format
  2011-10-26 15:58         ` Marc Glisse
  2011-10-26 17:29           ` Jonathan Wakely
@ 2011-10-26 17:47           ` steve kirby
  1 sibling, 0 replies; 8+ messages in thread
From: steve kirby @ 2011-10-26 17:47 UTC (permalink / raw)
  To: gcc-help; +Cc: Jonathan Wakely, marc.glisse

I'm using the versions in the download_prerequisites script and it is purring along now, hopefully to completion :>

many thanks to all.

--Steve





----- Original Message -----
From: Marc Glisse <marc.glisse@inria.fr>
To: steve kirby <thin_runner@yahoo.com>
Cc: Jonathan Wakely <jwakely.gcc@gmail.com>; GCC HELP <gcc-help@gcc.gnu.org>
Sent: Wednesday, October 26, 2011 9:57 AM
Subject: Re: gcc 4.6.1 compile fails in linking stage - libgmp.so in wrong format

On Wed, 26 Oct 2011, steve kirby wrote:

> I put the src trees of gmp, mpfr, and mpc under the gcc tree, linked "gmp", "mpfr", "mpc" directories to each of these src trees. Then called configure, in a separate tree, as recommended.
>
> But I'm getting:
>
> checking for recent MPFR... no
> configure: error: MPFR version >= 2.3.1 required
>
> The MPFR version in the GCC tree is 3.1.0.
>
> What do you recommend I do?

Take an older mpfr version (like the contrib script does). Newer mpfr 
versions hide their configure script in src, and gcc hasn't been updated 
for that yet (or at least it hadn't been for 4.6.1).

-- 
Marc Glisse

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-10-26 17:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-25 21:10 gcc 4.6.1 compile fails in linking stage - libgmp.so in wrong format steve kirby
2011-10-25 21:14 ` Jonathan Wakely
2011-10-25 22:35   ` steve kirby
2011-10-25 22:43     ` Jonathan Wakely
2011-10-26 15:49       ` steve kirby
2011-10-26 15:58         ` Marc Glisse
2011-10-26 17:29           ` Jonathan Wakely
2011-10-26 17:47           ` steve kirby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).