make check failed due to 32/64 bits problem

Jay jay.krell at cornell.edu
Tue Nov 4 08:32:51 CET 2008


> From: Ling  
> Subject: make check failed due to 32/64 bits problem 
> To: gmp-bugs 
> 
> make check-TESTS 
> make[4]: Entering directory 
> `/local/solaris64/apps/gmp-4.2.4/src/gmp-4.2.4/tests' 
> ld.so.1: t-bswap: fatal: /usr/sfw/lib/libgcc_s.so.1: wrong ELF class: 
> ELFCLASS32 

  I've seen this exact sort of problem, with gcc/gmp/mpfr, on Windows.


  Among gcc, gmp, mpfr, there is some disagreement in their "config.guess".
  Some are more eager to detect 64 bit processors than others, or somesuch.
  Best to run them each, decide which you think is right, and then pass it to configure explicitly.
  Or, find the one whose output you like, and copy it over the other two.


 Another option is to put the gmp/mpfr sources into the gcc tree and have it configure and build them.


You can also configure gmp and mpfr with a cpu of "none", to use just all portable C and no tuned assembly.
That is what happens when you put them into the gcc tree.
If you are just using them for gcc, this must be adequate (since it is common practise).
gcc probably only uses relatively low precisions, and benefits less from the tuning, than
more general applications.


Something similar is documented here:

http://gcc.gnu.org/install/specific.html#sparc-sun-solaris2

When configuring the GNU Multiple Precision Library (GMP) or the MPFR library on a Solaris 7 or later system, the canonical target triplet must be specified as the build parameter on the configure line. This triplet can be obtained by invoking ./config.guess in the toplevel source directory of GCC (and not that of GMP or MPFR). For example on a Solaris 7 system: 

        % ./configure --build=sparc-sun-solaris2.7 --prefix=xxx


  - Jay


More information about the gmp-bugs mailing list