make check failed due to 32/64 bits problem

Ling Shi ling at csse.unimelb.edu.au
Mon Nov 3 04:05:39 CET 2008


Hi,

I'm building gcc 4.3.2 under Solaris 10/x64, and it requires gmp so I
downloaded gmp 4.2.4. `configure --prefix=/xxx` and `make` ran Ok but
`make check` failed:

  :
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
/bin/bash: line 1: 18761 Killed                  ${dir}$tst
FAIL: t-bswap
ld.so.1: t-constants: fatal: /usr/sfw/lib/libgcc_s.so.1: wrong ELF 
class: ELFCLASS32
/bin/bash: line 1: 18782 Killed                  ${dir}$tst
FAIL: t-constants
ld.so.1: t-count_zeros: fatal: /usr/sfw/lib/libgcc_s.so.1: wrong ELF 
class: ELFCLASS32
/bin/bash: line 1: 18803 Killed                  ${dir}$tst
FAIL: t-count_zeros
ld.so.1: t-gmpmax: fatal: /usr/sfw/lib/libgcc_s.so.1: wrong ELF class: 
ELFCLASS32
/bin/bash: line 1: 18823 Killed                  ${dir}$tst
FAIL: t-gmpmax
ld.so.1: t-hightomask: fatal: /usr/sfw/lib/libgcc_s.so.1: wrong ELF 
class: ELFCLASS32
/bin/bash: line 1: 18843 Killed                  ${dir}$tst
FAIL: t-hightomask
ld.so.1: t-modlinv: fatal: /usr/sfw/lib/libgcc_s.so.1: wrong ELF class: 
ELFCLASS32
/bin/bash: line 1: 18863 Killed                  ${dir}$tst
FAIL: t-modlinv
ld.so.1: t-popc: fatal: /usr/sfw/lib/libgcc_s.so.1: wrong ELF class: 
ELFCLASS32
/bin/bash: line 1: 18883 Killed                  ${dir}$tst
FAIL: t-popc
ld.so.1: t-parity: fatal: /usr/sfw/lib/libgcc_s.so.1: wrong ELF class: 
ELFCLASS32
/bin/bash: line 1: 18906 Killed                  ${dir}$tst
FAIL: t-parity
ld.so.1: t-sub: fatal: /usr/sfw/lib/libgcc_s.so.1: wrong ELF class: 
ELFCLASS32
/bin/bash: line 1: 18926 Killed                  ${dir}$tst
FAIL: t-sub
==================================
9 of 9 tests failed
Please report to gmp-bugs at swox.com
==================================
   :

Run `ldd` on newly built libgmp:

[ling at mure] .libs [2:1396] ldd libgmp.so.3.4.4
         libc.so.1 =>     /lib/64/libc.so.1
         libgcc_s.so.1 =>         /usr/sfw/lib/libgcc_s.so.1  - wrong 
ELF class: ELFCLASS32
         libm.so.2 =>     /lib/64/libm.so.2

`file` tells one is 32bits the other is 64 bits:

[ling at mure] .libs [2:1397] file /usr/sfw/lib/libgcc_s.so.1
/usr/sfw/lib/libgcc_s.so.1:     ELF 32-bit LSB dynamic lib 80386 Version 
1, dynamically linked, not stripped, no debugging information available
[ling at mure] .libs [2:1398] file libgmp.so.3.4.4
libgmp.so.3.4.4:        ELF 64-bit LSB dynamic lib AMD64 Version 1, 
dynamically linked, not stripped, no debugging information available

System info:

[ling at mure] .libs [2:1399] uname -a
SunOS mure 5.10 Generic_137112-02 i86pc i386 i86pc

(gcc is provided by Sun)
[ling at mure] .libs [2:1400] gcc -v
Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/specs
Configured with: /builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/configure 
--prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as 
--with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++ 
--enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)

[ling at mure] gmp-4.2.4 [2:1403] ./config.guess
core2-pc-solaris2.10

I don't have a 64 bits gcc yet. If you have a "force to 32 bits" option,
that'd fix the problem.

BTW, I tried using Sun Studio 12 instead of gcc,

[ling at mure] gmp-4.2.4 [2:1406] CC=cc ./configure 
--prefix=/usr/local/apps/gmp-4.2.4
   :
checking size of mp_limb_t... 4
configure: error: Oops, mp_limb_t is 32 bits, but the assembler code
in this configuration expects 64 bits.

[ling at mure] gmp-4.2.4 [2:1415] cc -V
cc: Sun C 5.9 SunOS_i386 Patch 124868-01 2007/07/12

config.log from this run is attached.

-- 
Regards,
Ling Shi
(sysad, CSSE, UniMelb)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log.gz
Type: application/gzip
Size: 15758 bytes
Desc: not available
Url : http://gmplib.org/list-archives/gmp-bugs/attachments/20081103/cac675d1/attachment.bin 


More information about the gmp-bugs mailing list