problem building 3.0.1

72 views
Skip to first unread message

John Cremona

unread,
Nov 13, 2023, 7:17:04 AM11/13/23
to FLINT dev
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

Albin Ahlbäck

unread,
Nov 13, 2023, 10:29:27 AM11/13/23
to flint...@googlegroups.com, John Cremona
Hello John,

As hashmap.c includes flint.h that includes gmp.h that includes
stddef.h, I do not see how this problem could arise.

What version of GMP do you use? Can you verify to me that your
distribution of GMP indeed includes stddef.h?

But the problem of `./configure' on your second machine does not seem
right. Could you send me the generated `config.log' for this machine?

Best,
Albin
> (hilbert.warwick.ac.uk <http://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
>
> --
>
> ---
> You received this message because you are subscribed to the Google
> Groups "flint-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to flint-devel...@googlegroups.com
> <mailto:flint-devel...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/flint-devel/CAD0p0K5gj_oX0aBPsVLZ-DpV-Hst0gN_nVArbaC%3DcN%3DGgmFBHQ%40mail.gmail.com <https://groups.google.com/d/msgid/flint-devel/CAD0p0K5gj_oX0aBPsVLZ-DpV-Hst0gN_nVArbaC%3DcN%3DGgmFBHQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

John Cremona

unread,
Nov 13, 2023, 2:27:45 PM11/13/23
to Albin Ahlbäck, flint...@googlegroups.com
Thanks for the feedback.

On the first machine there was a problem with the gmp files, largely because I had mpir installed using the gmp-compatible option which installs files called gmp.h which are not real gmp.h but actually mpir.h.  I have sorted that out and actually built flint 3 on there now, after also doing an upgrade which upgraded gcc to 11.4.0.

On the others that might also be the issue, as I do have (on all three) files /usr/local/include/gmp.h which are actually mpir.  I cannot just delete these (and the mpir library files calling themlelves libgmp*) since other stuff was built with these and would then break (and I am not the only user!).  I will sort this out.  On two of them I get past ./configure OK but make fails as before; on the third I still get this fail on ./configure.  I have attached cofig.log from that one.

The first few lines of ./configure --disable-static are

jec@atkin:~/packages/FLINT/flint-3.0.1$ ./configure --disable-static
configure: WARNING: unrecognized options: --disable-static
./configure: line 2458: LT_INIT: command not found

which looks very wrong.  I did do ./bootstrap.sh whise output was

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force --warnings=all
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force --warnings=all
autoreconf: running: /usr/bin/autoheader --force --warnings=all
autoreconf: configure.ac: not using Automake
autoreconf: Leaving directory `.'

I'm sorry if my partly broken gmp setup is to blame, but I would like to sort this out.  No hury, as I don't expect to work more on this today.

John

config.log

John Cremona

unread,
Nov 13, 2023, 2:34:29 PM11/13/23
to Albin Ahlbäck, flint...@googlegroups.com
PS On the two machines where ./configure did not abort, one was happy with --disable-static and one was not.  On both of these machines I hid /usr/local/include/gmp.h and started again, and now the compilation is proceeding OK.

Albin Ahlbäck

unread,
Nov 13, 2023, 6:10:41 PM11/13/23
to John Cremona, flint...@googlegroups.com
You appear to be missing `libtool'. As you are on Ubuntu, I think have
to run `sudo apt install libtool-bin'.

Best,
Albin

On 11/13/23 20:27, John Cremona wrote:
> Thanks for the feedback.
>
> On the first machine there was a problem with the gmp files, largely
> because I had mpir installed using the gmp-compatible option which
> installs files called gmp.h which are not real gmp.h but actually
> mpir.h.  I have sorted that out and actually built flint 3 on there now,
> after also doing an upgrade which upgraded gcc to 11.4.0.
>
> On the others that might also be the issue, as I do have (on all three)
> files /usr/local/include/gmp.h which are actually mpir.  I cannot just
> delete these (and the mpir library files calling themlelves libgmp*)
> since other stuff was built with these and would then break (and I am
> not the only user!).  I will sort this out.  On two of them I get past
> ./configure OK but make fails as before; on the third I still get this
> fail on ./configure.  I have attached cofig.log from that one.
>
> The first few lines of ./configure --disable-static are
>
> jec@atkin:~/packages/FLINT/flint-3.0.1$ ./configure --disable-static
> configure: WARNING: unrecognized options: --disable-static
> ./configure: line 2458: LT_INIT: command not found
>
> which looks very wrong.  I did do ./bootstrap.sh whise output was
>
> autoreconf: Entering directory `.'
> autoreconf: configure.ac <http://configure.ac>: not using Gettext
> autoreconf: running: aclocal --force --warnings=all
> autoreconf: configure.ac <http://configure.ac>: tracing
> autoreconf: configure.ac <http://configure.ac>: not using Libtool
> autoreconf: running: /usr/bin/autoconf --force --warnings=all
> autoreconf: running: /usr/bin/autoheader --force --warnings=all
> autoreconf: configure.ac <http://configure.ac>: not using Automake
> <http://hilbert.warwick.ac.uk <http://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
> >
> > --
> >
> > ---
> > You received this message because you are subscribed to the Google
> > Groups "flint-devel" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send
> > an email to flint-devel...@googlegroups.com
> <mailto:flint-devel%2Bunsu...@googlegroups.com>
> > <mailto:flint-devel...@googlegroups.com
> <mailto:flint-devel%2Bunsu...@googlegroups.com>>.
> > To view this discussion on the web, visit
> >
> https://groups.google.com/d/msgid/flint-devel/CAD0p0K5gj_oX0aBPsVLZ-DpV-Hst0gN_nVArbaC%3DcN%3DGgmFBHQ%40mail.gmail.com <https://groups.google.com/d/msgid/flint-devel/CAD0p0K5gj_oX0aBPsVLZ-DpV-Hst0gN_nVArbaC%3DcN%3DGgmFBHQ%40mail.gmail.com> <https://groups.google.com/d/msgid/flint-devel/CAD0p0K5gj_oX0aBPsVLZ-DpV-Hst0gN_nVArbaC%3DcN%3DGgmFBHQ%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/flint-devel/CAD0p0K5gj_oX0aBPsVLZ-DpV-Hst0gN_nVArbaC%3DcN%3DGgmFBHQ%40mail.gmail.com?utm_medium=email&utm_source=footer>>.
>

John Cremona

unread,
Nov 14, 2023, 3:39:27 AM11/14/23
to Albin Ahlbäck, flint...@googlegroups.com
On Mon, 13 Nov 2023 at 23:10, Albin Ahlbäck <albin....@gmail.com> wrote:
You appear to be missing `libtool'. As you are on Ubuntu, I think have
to run `sudo apt install libtool-bin'.

That worked (I had to redo ./bootstrap.sh also).  It is mysterious since I use libool myself on all the machines (so I thought) as I need it for eclib.  Anyway, with this and the removal of the fake gmp.h (really mpir.h) I now have built flint-3.0.1 everywhere with all tests passing.

Thanks!

John
Reply all
Reply to author
Forward
0 new messages