gmp-4.2.4 failures with Solaris 10 AMD64 and Studio Express 03/09

Torbjorn Granlund tg at swox.com
Mon Apr 6 10:30:54 CEST 2009


Dennis Clarke <dclarke at blastwave.org> writes:

  >> Everything was going well until I ran make check.
  >
  > it seems to be a big-endian vs little-endian issue. Maybe the configure
  > script
  > was fooled by the combination Solaris - AMD64.
  
  Why would that be a problem? Solaris has been 64-bit on AMD64 for years.
  
And GMP's configure should not have any problems with this particular
combination.

  I just did a full re-compile again. No optimization and nothing fancy.
  Same code segfaults and dumps core over and over.
  
How did you disable optimization?  Some compilers are hard to persuade
to not optimize.

I tried gmp 4.2.4 on a Slowaris 11 (uname says 5.11 snv_105) system
now, forcing it to use cc instead of gcc:

tray$ cc -V
cc: Sun Ceres C 5.10 SunOS_i386 2008/10/22
usage: cc [ options] files.  Use 'cc -flags' for details

I started with:

tray$ path-to-gmp-4.2.4/configure CC=cc --disable-static >&cfg.log
tray$ gmake
tray$ gmake check

This failed because configure doesn't know how to put the compiler in
64-bit mode.  For sparc-slowris, one needs to pass an ISA option
"-xarch=v9" for choosing ABI, very odd.  But here the right option is
apparently "-m64".  GMP's configure doesn't know that.  Let's therefore
add it manually:

tray$ path-to-gmp-4.2.4/configure CC="cc -m64" --disable-shared >&cfg.log
tray$ gmake
tray$ gmake check

This worked.  I also tried a shared build:

tray$ path-to-gmp-4.2.4/configure CC="cc -m64" --disable-static >&cfg.log
tray$ gmake
tray$ gmake check

This worked too.

  I'll try to focus on one test at a time and see if I can single step into
  this.
  
Yes, I suppose you need to debug this.  The odds are on a compiler (or
assembler or linker) bug.

-- 
Torbjörn


More information about the gmp-bugs mailing list