Illegal instruction error in t-constants test

Russ Kuhn russ.kuhn at
Fri Mar 11 21:50:03 CET 2011

I used 'configure none' and the illegal instruction failures did not happen.  I did however, get 2 other failures:

PASS: t-div_2exp
rootrem.c:339: GNU MP assertion failed: bn >= qn
/bin/sh: line 5: 19773 Aborted                 ${dir}$tst
FAIL: reuse
rootrem.c:339: GNU MP assertion failed: bn >= qn
/bin/sh: line 5: 19778 Aborted                 ${dir}$tst
FAIL: t-root

The reason I included the link for the Cavium CNS2132 is that it says " If you do an objdump of your compiled binaries you should see no thumb type instructions (like B, BL, BX, BLX, and BXJ)." I don't know if that has any relevance to the problem I encountered.

Unfortunately, my time allocated to building gcc -- and therefore GMP -- has been used up (without success) and I won't be able to dedicate any more time to this.  I hope the information I provided has had some value.


On Mar 10, 2011, at 10:56 AM, Torbjorn Granlund wrote:

> Russ Kuhn <russ.kuhn at> writes:
> 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
>  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?
> FAIL: t-constants
> I don't know anything about Faraday or Cavium.
> I think that either GMP uses an arm instruction that is not implemented
> on your cpu, or gcc generates such an instruction.  It is also possible
> that the error reporting in your environment is non-standard, and that
> "Illegal instruction" means something else.
> You may want to try using 'configure none'; this will disable all
> assembly code.  If you still get "Illegal instruction", we have excluded
> one error.
> Then you need to run t-constants in a debugger.  Note that t-constants
> (if you build GMP as a shared lib) is a script, and that the real code
> is in tests/.libs/t-constants.  It might be easier to try to reproduce
> with 'configure --disable-shared none' to avoid this litte obstacle.  If
> you need to run tests/.libs/t-constants, you may need to set some
> environment variable (perhaps LD_LIBRARY_PATH) pointing to the directory
> .libs in the build dir top-level.
> Once you have plain binary that reproduces the error, fire it up inside
> a debugger.  This should show the offending instruction.
> -- 
> Torbjörn

More information about the gmp-bugs mailing list