problem with 'make check' in GMP 4.3.2

Marc Glisse marc.glisse at inria.fr
Fri Jul 9 10:16:39 CEST 2010


On Thu, 8 Jul 2010, Michael Schulte wrote:

> I am trying to compile gmp-4.3.2 from source code so that I can build the newest
>   version of gcc.

The easiest for that is to let gcc build gmp. That is, you unpack gcc, and 
see a directory gcc-something that contains a README and plenty of files 
and subdirectories. Next to those, you unpack gmp, so you have a directory 
gmp-something. Rename it to gmp, so you now have a directory 
gcc-something/gmp. Now when you build gcc, it will handle gmp on its own.

You can do the same thing for mpfr-2.4.2 (version 3.0.0 requires a one 
line gcc patch that hasn't been accepted yet) and mpc.

> ld.so.1: /tmp/GCC/gcc-infra/gmp-4.3.2/tests/.libs/t-bswap: fatal: /usr/local/lib
> /libgcc_s.so.1: wrong ELF class: ELFCLASS32

Surely a bit of googling would point you to older messages in the archives 
of this list, where this FAQ is answered.

You are probably using a gcc installed in /usr/local. Using the system gcc 
(in /usr/sfw/bin) would work. Otherwise you need to tell your programs 
where they can find libgcc_s.so.1 at runtime, for instance with 
LDFLAGS=-R/usr/local/lib/sparcv9.

Alternatively, you can use ABI=32 to build a 32 bit version of GMP, which 
is what gcc wants anyway.

-- 
Marc Glisse


More information about the gmp-bugs mailing list