Re: GMP tests fail
Hello, maybe the first thing you could try is downloading the most recent snapshot from https://gmplib.org/download/snapshot/gmp-next/ to see if that one works better. You don't say what version of what compiler you are using, I guess the 'gcc' below actually refers to some clang/Xcode? This kind of problem is often a compiler bug, so that's very relevant. If you don't have the latest version, you could try upgrading. You could also install a true gcc from homebrew, macports or other. Messages like "Segmentation fault" are not super informative, it is useful to run the failing test in a debugger and ask the debugger what instruction caused the segfault. On Mon, 25 Jul 2022, Cao Qinxiang wrote: Dear authors of GMP, I tried to install GMP on my laptop but it fails on "make check". The first error (segmentation fault) appears in t-fib2m.c. I found that the segmentation fault happened immediately after entering the first function call in t-fib2m.c. Here is the error message: ../../test-driver: line 107: 56137 Segmentation fault: 11 "$@" > $log_file 2>&1 FAIL: t-fib2m Testsuite summary for GNU MP 6.2.1 # TOTAL: 50 # PASS: 49 # SKIP: 0 # XFAIL: 0 # FAIL: 1 # XPASS: 0 # ERROR: 0 After I manually inline those two functions in t-fib2m.c, the tests continue to fail in two later test cases. Here is the error message: ../../test-driver: line 107: 47268 Abort trap: 6 "$@" > $log_file 2>&1 FAIL: t-bit ../../test-driver: line 107: 47274 Segmentation fault: 11 "$@" > $log_file 2>&1 FAIL: t-powm Testsuite summary for GNU MP 6.2.1 # TOTAL: 64 # PASS: 62 # SKIP: 0 # XFAIL: 0 # FAIL: 2 # XPASS: 0 # ERROR: 0 My CPU and OS is: kabylake-apple-darwin19.2.0. For configuration, I use ./configure --disable-shared. I paste configure info to the end of this email. I am wondering how I can fix this so that I can continue on other dependent installations. Thank you very much. Qinxiang Cao Shanghai Jiao Tong University, John Hopcroft Center Room 1110-2, SJTUSE Building 800 Dongchuan Road, Shanghai, China, 200240 *** CONFIGURE INFO macbook-pro-8:gmp-6.2.1 Qinxiang$ ./configure --disable-shared checking build system type... kabylake-apple-darwin19.2.0 checking host system type... kabylake-apple-darwin19.2.0 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... ./install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether to enable maintainer-specific portions of Makefiles... no checking ABI=64 checking compiler gcc -O2 -pedantic -fomit-frame-pointer -m64 ... yes checking compiler gcc -O2 -pedantic -fomit-frame-pointer -m64 -mtune=skylake... yes checking compiler gcc -O2 -pedantic -fomit-frame-pointer -m64 -mtune=skylake -march=broadwell... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking for gcc option to accept ISO C99... none needed checking how to run the C preprocessor... gcc -E checking build system compiler gcc... yes checking for build system preprocessor... gcc -E checking for build system executable suffix... checking whether build system compiler is ANSI... yes checking for build system compiler math library... -lm checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E using ABI="64" CC="gcc" CFLAGS="-O2 -pedantic -fomit-frame-pointer -m64 -mtune=skylake -march=broadwell" CPPFLAGS="" MPN_PATH=" x86_64/skylake x86_64/coreibwl x86_64/coreihwl x86_64/coreisbr x86_64/coreinhm x86_64/core2 x86_64 generic" checking whether assembler supports --noexecstack option... no checking for ar... ar checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking how to print strings... printf checking for a sed that does not truncate output... /usr/local/bin/sed checking for fgrep... /usr/bin/grep -F checking for ld used by gcc...
GMP tests fail
Dear authors of GMP, I tried to install GMP on my laptop but it fails on "make check". The first error (segmentation fault) appears in t-fib2m.c. I found that the segmentation fault happened immediately after entering the first function call in t-fib2m.c. Here is the error message: ../../test-driver: line 107: 56137 Segmentation fault: 11 "$@" > $log_file 2>&1 FAIL: t-fib2m Testsuite summary for GNU MP 6.2.1 # TOTAL: 50 # PASS: 49 # SKIP: 0 # XFAIL: 0 # FAIL: 1 # XPASS: 0 # ERROR: 0 After I manually inline those two functions in t-fib2m.c, the tests continue to fail in two later test cases. Here is the error message: ../../test-driver: line 107: 47268 Abort trap: 6 "$@" > $log_file 2>&1 FAIL: t-bit ../../test-driver: line 107: 47274 Segmentation fault: 11 "$@" > $log_file 2>&1 FAIL: t-powm Testsuite summary for GNU MP 6.2.1 # TOTAL: 64 # PASS: 62 # SKIP: 0 # XFAIL: 0 # FAIL: 2 # XPASS: 0 # ERROR: 0 My CPU and OS is: kabylake-apple-darwin19.2.0. For configuration, I use ./configure --disable-shared. I paste configure info to the end of this email. I am wondering how I can fix this so that I can continue on other dependent installations. Thank you very much. Qinxiang Cao Shanghai Jiao Tong University, John Hopcroft Center Room 1110-2, SJTUSE Building 800 Dongchuan Road, Shanghai, China, 200240 *** CONFIGURE INFO macbook-pro-8:gmp-6.2.1 Qinxiang$ ./configure --disable-shared checking build system type... kabylake-apple-darwin19.2.0 checking host system type... kabylake-apple-darwin19.2.0 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... ./install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether to enable maintainer-specific portions of Makefiles... no checking ABI=64 checking compiler gcc -O2 -pedantic -fomit-frame-pointer -m64 ... yes checking compiler gcc -O2 -pedantic -fomit-frame-pointer -m64 -mtune=skylake... yes checking compiler gcc -O2 -pedantic -fomit-frame-pointer -m64 -mtune=skylake -march=broadwell... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking for gcc option to accept ISO C99... none needed checking how to run the C preprocessor... gcc -E checking build system compiler gcc... yes checking for build system preprocessor... gcc -E checking for build system executable suffix... checking whether build system compiler is ANSI... yes checking for build system compiler math library... -lm checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E using ABI="64" CC="gcc" CFLAGS="-O2 -pedantic -fomit-frame-pointer -m64 -mtune=skylake -march=broadwell" CPPFLAGS="" MPN_PATH=" x86_64/skylake x86_64/coreibwl x86_64/coreihwl x86_64/coreisbr x86_64/coreinhm x86_64/core2 x86_64 generic" checking whether assembler supports --noexecstack option... no checking for ar... ar checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking how to print strings... printf checking for a sed that does not truncate output... /usr/local/bin/sed checking for fgrep... /usr/bin/grep -F checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no checking whether ln -s works... yes checking the maximum length of command line arguments... 196608 checking how to convert kabylake-apple-darwin19.2.0 file names to kabylake-apple-darwin19.2.0 format... func_convert_file_noop checking how to convert kabylake-apple-darwin19.2.0 file names to toolchain format... func_convert_file_noop checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all