Illegal instruction error in t-constants test

Russ Kuhn russ.kuhn at thermyos.com
Thu Mar 10 15:06:57 CET 2011


In building gmp-5.0.1, the make check reported an illegal instruction failure.  The build is on a Technologic TS-7553 SBC that uses a Cavium CNS2132 with a Faraday FA-526 core as described in http://wiki.openembedded.net/index.php/TS-7500.  I'm actually in the process of building gcj, which requires building a new gcc, which requires GMP and MPFR.  (The MPFR check also reported 108 of 156 tests failed with an illegal instruction error.)  Can I just plow ahead with building gcc, or am I out of luck because the gcc that came with the TS-7553 is emitting bad code?

ts7500:/mnt/bigmac/gmp-5.0.1/build# make check
make  check-recursive
make[1]: Entering directory `/mnt/bigmac/gmp-5.0.1/build'
Making check in tests
make[2]: Entering directory `/mnt/bigmac/gmp-5.0.1/build/tests'
Making check in .
make[3]: Entering directory `/mnt/bigmac/gmp-5.0.1/build/tests'
make  libtests.la t-bswap t-constants t-count_zeros t-gmpmax t-hightomask t-modlinv t-popc t-parity t-sub
make[4]: Entering directory `/mnt/bigmac/gmp-5.0.1/build/tests'
/bin/sh ../libtool --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../..    -O2 -pedantic -fomit-frame-pointer -c -o memory.lo ../../tests/memory.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../.. -O2 -pedantic -fomit-frame-pointer -c ../../tests/memory.c  -fPIC -DPIC -o .libs/memory.o
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../.. -O2 -pedantic -fomit-frame-pointer -c ../../tests/memory.c -o memory.o >/dev/null 2>&1
/bin/sh ../libtool --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../..    -O2 -pedantic -fomit-frame-pointer -c -o misc.lo ../../tests/misc.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../.. -O2 -pedantic -fomit-frame-pointer -c ../../tests/misc.c  -fPIC -DPIC -o .libs/misc.o
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../.. -O2 -pedantic -fomit-frame-pointer -c ../../tests/misc.c -o misc.o >/dev/null 2>&1
/bin/sh ../libtool --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../..    -O2 -pedantic -fomit-frame-pointer -c -o refmpf.lo ../../tests/refmpf.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../.. -O2 -pedantic -fomit-frame-pointer -c ../../tests/refmpf.c  -fPIC -DPIC -o .libs/refmpf.o
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../.. -O2 -pedantic -fomit-frame-pointer -c ../../tests/refmpf.c -o refmpf.o >/dev/null 2>&1
/bin/sh ../libtool --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../..    -O2 -pedantic -fomit-frame-pointer -c -o refmpn.lo ../../tests/refmpn.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../.. -O2 -pedantic -fomit-frame-pointer -c ../../tests/refmpn.c  -fPIC -DPIC -o .libs/refmpn.o
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../.. -O2 -pedantic -fomit-frame-pointer -c ../../tests/refmpn.c -o refmpn.o >/dev/null 2>&1
/bin/sh ../libtool --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../..    -O2 -pedantic -fomit-frame-pointer -c -o refmpq.lo ../../tests/refmpq.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../.. -O2 -pedantic -fomit-frame-pointer -c ../../tests/refmpq.c  -fPIC -DPIC -o .libs/refmpq.o
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../.. -O2 -pedantic -fomit-frame-pointer -c ../../tests/refmpq.c -o refmpq.o >/dev/null 2>&1
/bin/sh ../libtool --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../..    -O2 -pedantic -fomit-frame-pointer -c -o refmpz.lo ../../tests/refmpz.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../.. -O2 -pedantic -fomit-frame-pointer -c ../../tests/refmpz.c  -fPIC -DPIC -o .libs/refmpz.o
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../.. -O2 -pedantic -fomit-frame-pointer -c ../../tests/refmpz.c -o refmpz.o >/dev/null 2>&1
/bin/sh ../libtool --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../..    -O2 -pedantic -fomit-frame-pointer -c -o spinner.lo ../../tests/spinner.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../.. -O2 -pedantic -fomit-frame-pointer -c ../../tests/spinner.c  -fPIC -DPIC -o .libs/spinner.o
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../.. -O2 -pedantic -fomit-frame-pointer -c ../../tests/spinner.c -o spinner.o >/dev/null 2>&1
/bin/sh ../libtool --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../..    -O2 -pedantic -fomit-frame-pointer -c -o trace.lo ../../tests/trace.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../.. -O2 -pedantic -fomit-frame-pointer -c ../../tests/trace.c  -fPIC -DPIC -o .libs/trace.o
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../.. -O2 -pedantic -fomit-frame-pointer -c ../../tests/trace.c -o trace.o >/dev/null 2>&1
/bin/sh ../libtool --tag=CC   --mode=link gcc -std=gnu99  -O2 -pedantic -fomit-frame-pointer   -o libtests.la  memory.lo misc.lo refmpf.lo refmpn.lo refmpq.lo refmpz.lo spinner.lo trace.lo  ../libgmp.la 
libtool: link: ar cq .libs/libtests.a .libs/memory.o .libs/misc.o .libs/refmpf.o .libs/refmpn.o .libs/refmpq.o .libs/refmpz.o .libs/spinner.o .libs/trace.o 
libtool: link: ranlib .libs/libtests.a
libtool: link: ( cd ".libs" && rm -f "libtests.la" && ln -s "../libtests.la" "libtests.la" )
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../..    -O2 -pedantic -fomit-frame-pointer -c ../../tests/t-bswap.c
/bin/sh ../libtool --tag=CC   --mode=link gcc -std=gnu99  -O2 -pedantic -fomit-frame-pointer   -o t-bswap t-bswap.o libtests.la ../libgmp.la 
libtool: link: gcc -std=gnu99 -O2 -pedantic -fomit-frame-pointer -o .libs/t-bswap t-bswap.o  ./.libs/libtests.a /mnt/bigmac/gmp-5.0.1/build/.libs/libgmp.so ../.libs/libgmp.so
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../..    -O2 -pedantic -fomit-frame-pointer -c ../../tests/t-constants.c
/bin/sh ../libtool --tag=CC   --mode=link gcc -std=gnu99  -O2 -pedantic -fomit-frame-pointer   -o t-constants t-constants.o libtests.la ../libgmp.la 
libtool: link: gcc -std=gnu99 -O2 -pedantic -fomit-frame-pointer -o .libs/t-constants t-constants.o  ./.libs/libtests.a /mnt/bigmac/gmp-5.0.1/build/.libs/libgmp.so ../.libs/libgmp.so
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../..    -O2 -pedantic -fomit-frame-pointer -c ../../tests/t-count_zeros.c
/bin/sh ../libtool --tag=CC   --mode=link gcc -std=gnu99  -O2 -pedantic -fomit-frame-pointer   -o t-count_zeros t-count_zeros.o libtests.la ../libgmp.la 
libtool: link: gcc -std=gnu99 -O2 -pedantic -fomit-frame-pointer -o .libs/t-count_zeros t-count_zeros.o  ./.libs/libtests.a /mnt/bigmac/gmp-5.0.1/build/.libs/libgmp.so ../.libs/libgmp.so
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../..    -O2 -pedantic -fomit-frame-pointer -c ../../tests/t-gmpmax.c
/bin/sh ../libtool --tag=CC   --mode=link gcc -std=gnu99  -O2 -pedantic -fomit-frame-pointer   -o t-gmpmax t-gmpmax.o libtests.la ../libgmp.la 
libtool: link: gcc -std=gnu99 -O2 -pedantic -fomit-frame-pointer -o .libs/t-gmpmax t-gmpmax.o  ./.libs/libtests.a /mnt/bigmac/gmp-5.0.1/build/.libs/libgmp.so ../.libs/libgmp.so
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../..    -O2 -pedantic -fomit-frame-pointer -c ../../tests/t-hightomask.c
/bin/sh ../libtool --tag=CC   --mode=link gcc -std=gnu99  -O2 -pedantic -fomit-frame-pointer   -o t-hightomask t-hightomask.o libtests.la ../libgmp.la 
libtool: link: gcc -std=gnu99 -O2 -pedantic -fomit-frame-pointer -o .libs/t-hightomask t-hightomask.o  ./.libs/libtests.a /mnt/bigmac/gmp-5.0.1/build/.libs/libgmp.so ../.libs/libgmp.so
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../..    -O2 -pedantic -fomit-frame-pointer -c ../../tests/t-modlinv.c
/bin/sh ../libtool --tag=CC   --mode=link gcc -std=gnu99  -O2 -pedantic -fomit-frame-pointer   -o t-modlinv t-modlinv.o libtests.la ../libgmp.la 
libtool: link: gcc -std=gnu99 -O2 -pedantic -fomit-frame-pointer -o .libs/t-modlinv t-modlinv.o  ./.libs/libtests.a /mnt/bigmac/gmp-5.0.1/build/.libs/libgmp.so ../.libs/libgmp.so
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../..    -O2 -pedantic -fomit-frame-pointer -c ../../tests/t-popc.c
/bin/sh ../libtool --tag=CC   --mode=link gcc -std=gnu99  -O2 -pedantic -fomit-frame-pointer   -o t-popc t-popc.o libtests.la ../libgmp.la 
libtool: link: gcc -std=gnu99 -O2 -pedantic -fomit-frame-pointer -o .libs/t-popc t-popc.o  ./.libs/libtests.a /mnt/bigmac/gmp-5.0.1/build/.libs/libgmp.so ../.libs/libgmp.so
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../..    -O2 -pedantic -fomit-frame-pointer -c ../../tests/t-parity.c
/bin/sh ../libtool --tag=CC   --mode=link gcc -std=gnu99  -O2 -pedantic -fomit-frame-pointer   -o t-parity t-parity.o libtests.la ../libgmp.la 
libtool: link: gcc -std=gnu99 -O2 -pedantic -fomit-frame-pointer -o .libs/t-parity t-parity.o  ./.libs/libtests.a /mnt/bigmac/gmp-5.0.1/build/.libs/libgmp.so ../.libs/libgmp.so
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../tests -I.. -I../..    -O2 -pedantic -fomit-frame-pointer -c ../../tests/t-sub.c
/bin/sh ../libtool --tag=CC   --mode=link gcc -std=gnu99  -O2 -pedantic -fomit-frame-pointer   -o t-sub t-sub.o libtests.la ../libgmp.la 
libtool: link: gcc -std=gnu99 -O2 -pedantic -fomit-frame-pointer -o .libs/t-sub t-sub.o  ./.libs/libtests.a /mnt/bigmac/gmp-5.0.1/build/.libs/libgmp.so ../.libs/libgmp.so
make[4]: Leaving directory `/mnt/bigmac/gmp-5.0.1/build/tests'
make  check-TESTS
make[4]: Entering directory `/mnt/bigmac/gmp-5.0.1/build/tests'
make[4]: Warning: File `t-sub' has modification time 0.87 s in the future
PASS: t-bswap
/bin/sh: line 5: 18037 Illegal instruction     ${dir}$tst
FAIL: t-constants
PASS: t-count_zeros
PASS: t-gmpmax
PASS: t-hightomask
PASS: t-modlinv
PASS: t-popc
PASS: t-parity
PASS: t-sub
====================================
1 of 9 tests failed
Please report to gmp-bugs at gmplib.org
====================================
make[4]: *** [check-TESTS] Error 1
make[4]: Leaving directory `/mnt/bigmac/gmp-5.0.1/build/tests'
make[3]: *** [check-am] Error 2
make[3]: Leaving directory `/mnt/bigmac/gmp-5.0.1/build/tests'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory `/mnt/bigmac/gmp-5.0.1/build/tests'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/mnt/bigmac/gmp-5.0.1/build'
make: *** [check] Error 2

ts7500:~# gcc -v
Using built-in specs.
Target: arm-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --disable-libssp --enable-checking=release --build=arm-linux-gnu --host=arm-linux-gnu --target=arm-linux-gnu
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1.1) 

ts7500:~# uname -a
Linux ts7500 2.6.24.4 #1 Thu Aug 5 09:30:24 MST 2010 armv4l GNU/Linux

ts7500:/mnt/bigmac/gmp-5.0.1# ./config.guess
armv4l-unknown-linux-gnu


-Russ





More information about the gmp-bugs mailing list