cschwan / sage-on-gentoo

(Unofficial) Gentoo Overlay for Sage- and Sage-related ebuilds
78 stars 26 forks source link

vanilla sage checks for system singular built with flint #755

Closed strogdon closed 10 months ago

strogdon commented 10 months ago

This is not really a s-o-g issue but I wanted some feedback.

Gentoo clearly builds singular-4.3.2_p1 with flint. Vanilla sage checks for this and I get

## --------------------------------------------------------- ##
## Checking whether SageMath should install SPKG singular... ##
## --------------------------------------------------------- ##
configure:44379: checking whether any of gmp ntl flint readline mpfr cddlib is installed as or will be installed as SPKG
configure:44389: result: no
configure:44395: checking for Singular
configure:44418: found /usr/bin/Singular
configure:44430: result: /usr/bin/Singular
configure:44446: checking for SINGULAR
configure:44453: $PKG_CONFIG --exists --print-errors "Singular >= 4.2.1"
configure:44456: $? = 0
configure:44470: $PKG_CONFIG --exists --print-errors "Singular >= 4.2.1"
configure:44473: $? = 0
configure:44515: result: yes
configure:44518: checking whether Singular is built with FLINT
configure:44537: g++ -std=gnu++11 -c    -Dlinux   -I/usr/include conftest.cpp >&5
conftest.cpp:65: error: unterminated #if
   65 |             #if !defined(HAVE_FLINT)
      |

...

configure:44560: result: no
configure:44594: no suitable system package found for SPKG singular

Vanilla provides spkg-configure.m4. Is Vanilla correctly checking for things?

kiwifb commented 10 months ago

This is an error in spkg-configure.m4 for singular. It is as the compiler says, it is missing an #endif line. It should be

          AC_LANG_PROGRAM([
            #include <singular/singularconfig.h>
            #if !defined(HAVE_FLINT)
            #  error "Need Singular compiled with FLINT"
            #endif
          ], [])

or something like that. An issue should be filled.

strogdon commented 10 months ago

Fixed with https://github.com/sagemath/sage/issues/36193