gmp 5.1.0, gcc 4.2.4, x86_64 Linux: make check 5 of 62 tests failed
Eric Branlund
eric at msg.ucsf.edu
Fri Jan 17 03:12:16 UTC 2014
This is likely a problem in the compiler rather than gmp. I'm
reporting it since it had a different pattern of test failures than
reports I could find in a web search and might affect someone else
trying to build gmp on an old version of Linux in order to build a
modern version of gcc.
GMP version:
gmp 5.1.0 compiled from source without patches.
Test program:
The tests, t-fac_ui, t-mfac_uiui, t-primorial_ui, t-hamdist, and t-
popcount, from tests/mpz in the gmp distribution failed.
What is wrong:
Ran the following to configure, compile, and check gmp 5.1.0:
CC=/home/eric/extern/gcc-4.2.4-glibc2.3-x86_64/bin/gcc4.2 ./
configure \
--prefix=/home/eric/extern/gmp-5.1.0-glibc2.3-x86_64
make
make check
The last step failed in tests/mpz. The messages from the tests that
failed were
GNU MP: Cannot allocate memory (size=6148914691236517072)
FAIL: t-fac_ui
GNU MP: Cannot allocate memory (size=6148914691236517200)
FAIL: t-mfac_uiui
mpz_primorial_ui(191) wrong
got
107205023164680908544420594712018941361070500961255899986938003315732462
\
190
want
103089314192586000849956088883567437099862384829959097519276671552027932
\
9390
FAIL: t-primorial_ui
mpz_hamdist wrong on 2 bits pos/pos
i 0
j 64
got 1
want 2
x =0x1
y =0x10000000000000000
FAIL: t-hamdist
mpz_popcount wrong on single bit at 0
got 72, want 1
Configure output:
I've attached it as configure_stdout.txt.
Compiler:
/home/eric/extern/gcc-4.2.4-glibc2.3-x86_64/bin/gcc4.2 -v reports:
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /var/tmp/gcc-4.2.4/configure --prefix=/home/eric/
extern/gcc-4.\
2.4-glibc2.3-x86_64 -program-suffix=4.2
Thread model: posix
gcc version 4.2.4
System:
uname -a reports
Linux localhost.localdomain 2.4.21-50.EL #1 SMP Mon Jun 11 17:25:39
EDT 2007
x86_64 x86_64 x86_64 GNU/Linux
./config.guess reports
core2-unknown-linux-gnu
sh configfsf.guess reports
x86_64-unknown-linux-gnu
It is the x86_64 version of CentOS 3.9 running in a virtual machine
(Parallels Desktop 4.0 on top of Mac OS X 10.5.8). The processor is
an Intel Core 2 Duo.
Workaround:
Removing mpn/x86_64core2/popcount.asm prior to running configure,
make, and make check allowed make check to complete with all tests
passed.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: configure_stdout.txt
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20140116/cda48c80/attachment-0001.txt>
-------------- next part --------------
More information about the gmp-bugs
mailing list