Tests fail using Apple's LLVM

Corin Lawson me at corinlawson.com.au
Wed Dec 21 12:45:37 CET 2011


Hi,

Thanks for your good work on GMP, I'll try and include all the info I can
in this bug report. Maybe it has something to do with Apple's LLVM
compiler...

UPDATE: Having compiled all the info below I thought to try `CC=gcc-4.2
./configure` and all the tests pass now. Maybe you can add a quick fix to
the configure script. Thanks.

PLEASE DISREGARD BELOW

STEPS TO REPRODUCE

1. Download gmp-5.0.2.tar.bz2<ftp://ftp.gmplib.org/pub/gmp-5.0.2/gmp-5.0.2.tar.bz2>
and
unpack
2. ./configure && make
3. make check

EXPECTED OUTPUT

PASS all tests and exit

ACTUAL OUTPUT

Last few lines are:

PASS: t-tdiv_ui
PASS: t-fdiv
PASS: t-fdiv_ui
PASS: t-cdiv_ui

I left it for a day but it never exits; process called t-gcd uses a
significant amount of CPU.

Control-C outputs this:

make[4]: *** [check-TESTS] Interrupt: 2
make[3]: *** [check-am] Interrupt: 2
make[2]: *** [check-recursive] Interrupt: 2
make[1]: *** [check-recursive] Interrupt: 2
make: *** [check] Interrupt: 2

Killing the offending process(es) gives the following fails (I gave each
test at least 2 mins of CPU time):

PASS: t-cdiv_ui
/bin/sh: line 1:  9499 Terminated: 15          ${dir}$tst
FAIL: t-gcd
PASS: t-gcd_ui
/bin/sh: line 1:  9537 Terminated: 15          ${dir}$tst
FAIL: t-lcm
PASS: dive
...
PASS: t-div_2exp
/bin/sh: line 1:  7585 Terminated: 15          ${dir}$tst
FAIL: t-lcm
PASS: dive
...
PASS: t-div_2exp
/bin/sh: line 1:  9773 Terminated: 15          ${dir}$tst
/bin/sh: line 1: 10009 Terminated: 15          ${dir}$tst
FAIL: reuse
FAIL: reuse
/bin/sh: line 1: 10039 Terminated: 15          ${dir}$tst
FAIL: t-root
/bin/sh: line 1: 10035 Terminated: 15          ${dir}$tst
FAIL: t-root
PASS: t-perfsqr
PASS: t-perfsqr
/bin/sh: line 1: 10113 Terminated: 15          ${dir}$tst
/bin/sh: line 1: 10115 Terminated: 15          ${dir}$tst
FAIL: t-perfpow
FAIL: t-perfpow
/bin/sh: line 1: 10167 Terminated: 15          ${dir}$tst
/bin/sh: line 1: 10163 Terminated: 15          ${dir}$tst
FAIL: t-jac
FAIL: t-jac
PASS: t-bin
PASS: t-bin
...
PASS: t-cmp_si
/bin/sh: line 1: 10935 Segmentation fault: 11  ${dir}$tst
FAIL: t-hamdist
PASS: t-oddeven
/bin/sh: line 1: 10936 Segmentation fault: 11  ${dir}$tst
FAIL: t-hamdist
PASS: t-oddeven
/bin/sh: line 1: 10990 Segmentation fault: 11  ${dir}$tst
FAIL: t-popcount
PASS: t-set_f
/bin/sh: line 1: 11028 Segmentation fault: 11  ${dir}$tst
FAIL: t-popcount
PASS: t-set_f
check_in: return value wrong
check_in: result wrong
  i=11 zeros=1 neg=0
  got_ret  4
  want_ret 16
  got      =0x0
  want     =0x8182838485868788898A8B
/bin/sh: line 1: 11067 Abort trap: 6           ${dir}$tst
FAIL: t-io_raw
PASS: t-import
...
====================================
9 of 58 tests failed
Please report to gmp-bugs at gmplib.org
====================================
make[4]: *** [check-TESTS] Error 1
make[3]: *** [check-am] Error 2
make[2]: *** [check-recursive] Error 1
make[1]: *** [check-recursive] Error 1
make: *** [check] Error 2
gmp-5.0.2 corin$ PASS: t-io_raw
PASS: t-import
PASS: t-export
PASS: t-pprime_p
PASS: t-nextprime
====================================
8 of 58 tests failed
Please report to gmp-bugs at gmplib.org
====================================
make[4]: *** [check-TESTS] Error 1
make[3]: *** [check-am] Error 2
make[2]: *** [check-recursive] Error 1
make[1]: *** [check-recursive] Error 1
make: *** [check] Error 2

Not sure why it gives a summary twice...

ENVIRONMENT

$ gcc -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with:
/private/var/tmp/llvmgcc42/llvmgcc42-2336.1~1/src/configure
--disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2
--mandir=/share/man --enable-languages=c,objc,c++,obj-c++
--program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
--with-slibdir=/usr/lib --build=i686-apple-darwin11
--enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.1~1/dst-llvmCore/Developer/usr/local
--program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11
--target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
$ uname -a
Darwin phiware.com.au 11.2.0 Darwin Kernel Version 11.2.0: Tue Aug  9
20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64 x86_64
$ diff <(./config.guess) <(./configfsf.guess)
1c1
< core2-apple-darwin11.2.0
---
> x86_64-apple-darwin11.2.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log.bz2
Type: application/x-bzip2
Size: 32070 bytes
Desc: not available
URL: <http://gmplib.org/list-archives/gmp-bugs/attachments/20111221/eddbeedb/attachment-0001.bin>


More information about the gmp-bugs mailing list