Help stabilising mini-gmp

Niels Möller nisse at lysator.liu.se
Sat Nov 19 08:35:54 UTC 2016


tg at gmplib.org (Torbjörn Granlund) writes:

> I made that and another change to now get the test to run on the
> majority of our systems.  The other change was this one:
>
>   https://gmplib.org/repo/gmp/rev/88fead579828
>
> This makes sure linking knows the ABI. 

To make sure I understand the issue, this is to get flags like -m32
passed on to the linker?

> I am not sure there are no side-effects conflicting with the author's
> intended Makefile behaviour.

I don't think so. But I think the right way is to simply add $(CFLAGS)
to the linker command line. That's the usual way to use it, right? And
omitting it in the linking rule in mini-gmp/tests/Makefile is a bug.

> Another problem with the Makefile.am check-mini-gmp code has surfaced.
> It overrides LD_LIBRARY_PATH (and DYLD_LIBRARY_PATH) for the entire
> mini-gmp build.  That includes gcc, which as you know is linked to GMP.
> The result is compilation problems on at least one platform.

Ah, that's an interesting side effect. To do something more specific to
the tests, how should that be named? Should we adopt the EMULATOR
variable (from automake, not sure if it's still in the current version)?
Then one would set

  EMULATOR="LD_LIBRARY_PATH=... DYLD_LIBRARY_PATH=..." \
      $(MAKE) ...
 
when running mini-gmp tests. I think EMULATOR is already supported by
the version of run-tests script which is in mini-gmp, it runs the test
programs ("$1" is the executable to be run) using 

  if [ -z "$EMULATOR" ] || head -1 "$1" | grep '^#!' > /dev/null; then
    "$1" $testflags
  else
    $EMULATOR "$1" $testflags
  fi

> There is also a problem with t-signed on ppc64 machines.

I noticed one of those failures, and it was't trivially reproducible on
x86_64. Needs some investigation.

The first failure was also a bit interesting, an internal compiler error
with gcc-6.

In file included from gmp/mini-gmp/tests/testutils.c:24:0:
gmp/mini-gmp/tests/../mini-gmp.c: In function 'mpz_set_d':
gmp/mini-gmp/tests/../mini-gmp.c:1647:3: internal compiler error:
Aborted
   if (x != x || x == x * 0.5)
   ^~

https://gmplib.org/devel/tm/gmp/build/failure/sky.gmplib.org-dyn-fat-fake:64.txt

Begs for a proper gcc bug report, I guess. I fail to log in to sky, via
nshell, at the moment ("ssh -p 2222 localhost" on shell fails with
connection refused). And this failure was on the non-virtualized host
sky, right, not on one of the vms?

/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.


More information about the gmp-devel mailing list