I'm trying to install v3.1.2 of flint into my account on the MPCDF HPC cluster.
I managed to install GMP 6.3.0, MPFR 4.2.1 in my home directory with ./configure --prefix=$HOME/software/<packagename> for the two packages.
From the flint directory,I followed the online docs and manage to get till the ./configure step using:
>>> cd flint/
>>> ./bootstrap.sh
>>> ./configure --prefix=$HOME/software/flint/ --with-gmp-include=$HOME/software/gmp-6.3.0/include/ --with-gmp-lib=$HOME/software/gmp-6.3.0/lib/ --with-mpfr-include=$HOME/software/mpfr-4.2.1/include/ --with-mpfr-lib=$HOME/software/mpfr-4.2.1/lib/
However, when I move to the make step, I get this output:
/usr/bin/mkdir -p build/generic_files
CC generic_files/inlines.c
CC generic_files/profiler.c
CC generic_files/sprintf.c
CC generic_files/fscanf.c
CC generic_files/memory_manager.c
In file included from ./src/thread_pool.h:15:0,
from src/generic_files/memory_manager.c:18:
./src/flint.h:154:28: error: unknown type name ‘_Thread_local’
# define FLINT_TLS_PREFIX _Thread_local
^
src/generic_files/memory_manager.c:340:1: note: in expansion of macro ‘FLINT_TLS_PREFIX’
FLINT_TLS_PREFIX size_t flint_num_cleanup_functions = 0;
^
src/generic_files/memory_manager.c:340:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘flint_num_cleanup_functions’
FLINT_TLS_PREFIX size_t flint_num_cleanup_functions = 0;
^
In file included from ./src/thread_pool.h:15:0,
from src/generic_files/memory_manager.c:18:
./src/flint.h:154:28: error: unknown type name ‘_Thread_local’
# define FLINT_TLS_PREFIX _Thread_local
^
src/generic_files/memory_manager.c:342:1: note: in expansion of macro ‘FLINT_TLS_PREFIX’
FLINT_TLS_PREFIX flint_cleanup_function_t * flint_cleanup_functions = NULL;
^
src/generic_files/memory_manager.c:342:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
FLINT_TLS_PREFIX flint_cleanup_function_t * flint_cleanup_functions = NULL;
^
src/generic_files/memory_manager.c: In function ‘flint_register_cleanup_function’:
src/generic_files/memory_manager.c:358:5: error: ‘flint_cleanup_functions’ undeclared (first use in this function)
flint_cleanup_functions = flint_realloc(flint_cleanup_functions,
^
src/generic_files/memory_manager.c:358:5: note: each undeclared identifier is reported only once for each function it appears in
src/generic_files/memory_manager.c:359:10: error: ‘flint_num_cleanup_functions’ undeclared (first use in this function)
(flint_num_cleanup_functions + 1) * sizeof(flint_cleanup_function_t));
^
src/generic_files/memory_manager.c: In function ‘_flint_cleanup’:
src/generic_files/memory_manager.c:380:21: error: ‘flint_num_cleanup_functions’ undeclared (first use in this function)
for (i = 0; i < flint_num_cleanup_functions; i++)
^
src/generic_files/memory_manager.c:381:9: error: ‘flint_cleanup_functions’ undeclared (first use in this function)
flint_cleanup_functions[i]();
^
src/generic_files/memory_manager.c: At top level:
cc1: warning: unrecognized command line option "-Wno-stringop-overread" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-stringop-overflow" [enabled by default]
Makefile:615: recipe for target 'build/generic_files/memory_manager.lo' failed
make: *** [build/generic_files/memory_manager.lo] Error 1
Can someone help me figure out where the problem is?
For now the solution seemed to be to use an older release v3.0.1. Running through the same steps stated above lead to a succesful installation. I did do one thing slightly different - which is to load the OpenMP module, but I'm not sure if this makes any difference. For now I'm happily able to use
python-flintafter installing v3.0.1Details - following accepted answer above
The key factor was indeed the
gccversion in play as suggested by John Bollinger. The defaultgccis version 4 point something, which is already very old (the last v4 release, 4.8.5 was back in 2015).Once I used
gcc-13withmodule load gcc/13and ranmake, the process continued as expected (without the need to alter theconfigurestep.