I want to install flint-3.0.1 on machines running Ubuntu 20.04.6 LTS with gcc version 9.4.0. On the first, I did ./bootstrap.sh and ./configure --disapble-static and then make, but have this failure:
jec@fermat:~/packages/FLINT/flint-3.0.1$ make
CC generic_files/hashmap.lo
src/generic_files/hashmap.c: In function ‘hashmap1_find’:
src/generic_files/hashmap.c:131:20: error: ‘NULL’ undeclared (first use in this function)
131 | (*ptr) = NULL;
| ^~~~
src/generic_files/hashmap.c:14:1: note: ‘NULL’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
13 | #include "hashmap.h"
+++ |+#include <stddef.h>
14 |
src/generic_files/hashmap.c:131:20: note: each undeclared identifier is reported only once for each function it appears in
131 | (*ptr) = NULL;
| ^~~~
src/generic_files/hashmap.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-stringop-overread’
make: *** [Makefile:533: build/generic_files/hashmap.lo] Error 1
On a second machine (same ubuntu version and same gcc version) it did not get past ./configure:
(...)
checking stdarg.h usability... no
checking stdarg.h presence... yes
configure: WARNING: stdarg.h: present but cannot be compiled
configure: WARNING: stdarg.h: check for missing prerequisite headers?
configure: WARNING: stdarg.h: see the Autoconf documentation
configure: WARNING: stdarg.h: section "Present But Cannot Be Compiled"
configure: WARNING: stdarg.h: proceeding with the compiler's result
configure: WARNING: ## -------------------------------------------------------- ##
configure: WARNING: ## Report this to
https://github.com/flintlib/flint/issues/ ##
configure: WARNING: ## -------------------------------------------------------- ##
checking for stdarg.h... no
configure: error: Could not find a mandatory header!
On the 3rd and 4th machines, configure is OK but I get the smae compiler error as on the first.
The good news is that on may laptop which runs ubuntu Ubuntu 22.04.3 LTS and gcc 11.4.0 all is well. I could (and one day will) upgrade the other machines to this ubuntu version but I am nervous about doing that as they have other users (who need warning) and the machines are quite old (respectively 2010, 2013*2 and 2016). Sadly, our other 2010 machine (
hilbert.warwick.ac.uk) on which Bill did a lot of early FLINT development died during the pandemic and there is no-one able or available to try to revive it.
John