Skip to content

SageMath 10.7 on macOS 15.5 (again) #40512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
Closed

Conversation

GMS103
Copy link
Member

@GMS103 GMS103 commented Jul 30, 2025

This follows #40501.

Includes #40501 and #40509.

@GMS103
Copy link
Member Author

GMS103 commented Jul 30, 2025

SageMath version 10.7.beta9 + #40512 gives the following.

macOS 15.6
After ./configure --enable-gap_packages --enable-libsemigroups --enable-symengine,
make succeeds.
And make ptestlong gives only 1 error:
sage -t --long --warn-long 30.0 --random-seed=… src/sage/algebras/quantum_groups/quantum_group_gap.py # 1 doctest failed
related to TikZ.

Debian 12
After ./configure --enable-gap_packages --enable-libsemigroups --enable-symengine,
make fails for qhull:

[spkg-install] Configuring qhull-2020-src-8.0.2 with cmake
[spkg-install] CMake Error at CMakeLists.txt:70 (cmake_minimum_required):
[spkg-install]   CMake 4.0 or higher is required.  You are running version 3.25.1
[spkg-install] 
[spkg-install] 
[spkg-install] -- Configuring incomplete, errors occurred!
[spkg-install] ********************************************************************************
[spkg-install] Error configuring qhull-2020-src-8.0.2 with cmake
[spkg-install] ********************************************************************************
************************************************************************
Error installing package qhull-2020-src-8.0.2
************************************************************************

After replacing minimum required cmake version 4.0 by 3.25,
make succeeds.
And make ptestlong succeeds too.
There is cmake 4.0.3-1 (experimental), I have not tried it.

@GMS103 GMS103 mentioned this pull request Jul 30, 2025
5 tasks
@dimpase
Copy link
Member

dimpase commented Jul 30, 2025

On Gentoo Linux I have a problem building guava (one of GAP packages in gap_packages). gcc-15 needs a newer version than the one in gap 4.14.0. (3.20 or newer is needed). I get

[spkg-install] cd ./src/leon; autoreconf --install --force ; ./configure; make CC="gcc" CPPFLAGS="" CFLAGS="-g -O2 -Wno-implicit-function-declaration -Wno-implicit-function-declaration -Wno-implicit-function-declaration -Wno-implicit-function-declaration -O2" LDFLAGS="-Wl,-rpath-link,/home/dima/software/sage/local/lib -L/home/dima/software/sage/local/lib -Wl,-rpath,/home/dima/software/sage/local/lib -Wl,-rpath-link,/home/dima/software/sage/local/lib -L/home/dima/software/sage/local/lib -Wl,-rpath,/home/dima/software/sage/local/lib ";
[spkg-install] In file included from src/ctjhai/minimum-weight-gf2.h:18,
[spkg-install]                  from src/ctjhai/minimum-weight.c:33:
[spkg-install] src/ctjhai/types.h:27:16: error: cannot use keyword 'false' as enumeration constant
[spkg-install]    27 | typedef enum { false = 0, true = 1 } bool;
[spkg-install]       |                ^~~~~
[spkg-install] src/ctjhai/types.h:27:16: note: 'false' is a keyword with '-std=c23' onwards
[spkg-install] src/ctjhai/types.h:27:38: error: expected ';', identifier or '(' before 'bool'
[spkg-install]    27 | typedef enum { false = 0, true = 1 } bool;
[spkg-install]       |                                      ^~~~
[spkg-install] src/ctjhai/types.h:27:38: warning: useless type name in empty declaration
[spkg-install] In file included from src/ctjhai/minimum-weight-gf2.h:18,
[spkg-install]                  from src/ctjhai/minimum-weight-gf2.c:39:
[spkg-install] src/ctjhai/types.h:27:16: error: cannot use keyword 'false' as enumeration constant
[spkg-install]    27 | typedef enum { false = 0, true = 1 } bool;
[spkg-install]       |                ^~~~~
[spkg-install] src/ctjhai/types.h:27:16: note: 'false' is a keyword with '-std=c23' onwards
[spkg-install] src/ctjhai/types.h:27:38: error: expected ';', identifier or '(' before 'bool'
[spkg-install]    27 | typedef enum { false = 0, true = 1 } bool;
[spkg-install]       |                                      ^~~~
[spkg-install] src/ctjhai/types.h:27:38: warning: useless type name in empty declaration
[spkg-install] make[3]: *** [<builtin>: src/ctjhai/minimum-weight.o] Error 1
[spkg-install] make[3]: *** Waiting for unfinished jobs....
[spkg-install] In file included from src/ctjhai/minimum-weight-gf3.h:18,
[spkg-install]                  from src/ctjhai/minimum-weight-gf3.c:57:
[spkg-install] src/ctjhai/types.h:27:16: error: cannot use keyword 'false' as enumeration constant
[spkg-install]    27 | typedef enum { false = 0, true = 1 } bool;
[spkg-install]       |                ^~~~~
[spkg-install] src/ctjhai/types.h:27:16: note: 'false' is a keyword with '-std=c23' onwards
[spkg-install] src/ctjhai/types.h:27:38: error: expected ';', identifier or '(' before 'bool'
[spkg-install]    27 | typedef enum { false = 0, true = 1 } bool;
[spkg-install]       |                                      ^~~~
[spkg-install] src/ctjhai/types.h:27:38: warning: useless type name in empty declaration
[spkg-install] make[3]: *** [<builtin>: src/ctjhai/minimum-weight-gf2.o] Error 1
[spkg-install] make[3]: *** [<builtin>: src/ctjhai/minimum-weight-gf3.o] Error 1

@GMS103
Copy link
Member Author

GMS103 commented Jul 30, 2025

Update.

With
cmake_minimum_required(VERSION 3.25...4.0.3) (present situation)
SageMath version 10.7.beta9 + #40512 gives the following after
./configure --enable-gap_packages --enable-libsemigroups --enable-symengine

macOS 15.6
make succeeds.
make ptestlong gives only 1 error:
sage -t --long --warn-long 30.0 --random-seed=… src/sage/algebras/quantum_groups/quantum_group_gap.py # 1 doctest failed
related to TikZ (in fact there are some other failed tests, but they pass standalone).

Debian 12
make succeds.
make ptestlong succeeds too.

@dimpase
Copy link
Member

dimpase commented Jul 30, 2025

you need to explicitly add --enable-semigroups !

(--enable-libsemigroups is implied then)

@GMS103
Copy link
Member Author

GMS103 commented Jul 30, 2025

you need to explicitly add --enable-semigroups !

(--enable-libsemigroups is implied then)

Sorry, last time I tried I got
real_configure: WARNING: unrecognized options: --enable-semigroups
so I thought it was a typo.

Redoing everything again.

@dimpase
Copy link
Member

dimpase commented Jul 30, 2025

you might need to run ./bootstrap

@GMS103
Copy link
Member Author

GMS103 commented Jul 30, 2025

you might need to run ./bootstrap

I always start from scratch (except that I reuse files from /upstream because unreliable mirrors delay everything).
For me is the simplest and less time consuming.

@dimpase
Copy link
Member

dimpase commented Jul 31, 2025

not sure what you mean by "from scratch", but whenever anything in build/ is changed, ./bootstrap must be successfully run to update the configure script.

inability of configure to understand the enable-semigroups option is a symptom of a stale configure script.

@enriqueartal
Copy link
Contributor

I made a change in spkg-install.in in #40484 which allowed to build guava.

On Gentoo Linux I have a problem building guava (one of GAP packages in gap_packages). gcc-15 needs a newer version than the one in gap 4.14.0. (3.20 or newer is needed). I get

[spkg-install] cd ./src/leon; autoreconf --install --force ; ./configure; make CC="gcc" CPPFLAGS="" CFLAGS="-g -O2 -Wno-implicit-function-declaration -Wno-implicit-function-declaration -Wno-implicit-function-declaration -Wno-implicit-function-declaration -O2" LDFLAGS="-Wl,-rpath-link,/home/dima/software/sage/local/lib -L/home/dima/software/sage/local/lib -Wl,-rpath,/home/dima/software/sage/local/lib -Wl,-rpath-link,/home/dima/software/sage/local/lib -L/home/dima/software/sage/local/lib -Wl,-rpath,/home/dima/software/sage/local/lib ";
[spkg-install] In file included from src/ctjhai/minimum-weight-gf2.h:18,
[spkg-install]                  from src/ctjhai/minimum-weight.c:33:
[spkg-install] src/ctjhai/types.h:27:16: error: cannot use keyword 'false' as enumeration constant
[spkg-install]    27 | typedef enum { false = 0, true = 1 } bool;
[spkg-install]       |                ^~~~~
[spkg-install] src/ctjhai/types.h:27:16: note: 'false' is a keyword with '-std=c23' onwards
[spkg-install] src/ctjhai/types.h:27:38: error: expected ';', identifier or '(' before 'bool'
[spkg-install]    27 | typedef enum { false = 0, true = 1 } bool;
[spkg-install]       |                                      ^~~~
[spkg-install] src/ctjhai/types.h:27:38: warning: useless type name in empty declaration
[spkg-install] In file included from src/ctjhai/minimum-weight-gf2.h:18,
[spkg-install]                  from src/ctjhai/minimum-weight-gf2.c:39:
[spkg-install] src/ctjhai/types.h:27:16: error: cannot use keyword 'false' as enumeration constant
[spkg-install]    27 | typedef enum { false = 0, true = 1 } bool;
[spkg-install]       |                ^~~~~
[spkg-install] src/ctjhai/types.h:27:16: note: 'false' is a keyword with '-std=c23' onwards
[spkg-install] src/ctjhai/types.h:27:38: error: expected ';', identifier or '(' before 'bool'
[spkg-install]    27 | typedef enum { false = 0, true = 1 } bool;
[spkg-install]       |                                      ^~~~
[spkg-install] src/ctjhai/types.h:27:38: warning: useless type name in empty declaration
[spkg-install] make[3]: *** [<builtin>: src/ctjhai/minimum-weight.o] Error 1
[spkg-install] make[3]: *** Waiting for unfinished jobs....
[spkg-install] In file included from src/ctjhai/minimum-weight-gf3.h:18,
[spkg-install]                  from src/ctjhai/minimum-weight-gf3.c:57:
[spkg-install] src/ctjhai/types.h:27:16: error: cannot use keyword 'false' as enumeration constant
[spkg-install]    27 | typedef enum { false = 0, true = 1 } bool;
[spkg-install]       |                ^~~~~
[spkg-install] src/ctjhai/types.h:27:16: note: 'false' is a keyword with '-std=c23' onwards
[spkg-install] src/ctjhai/types.h:27:38: error: expected ';', identifier or '(' before 'bool'
[spkg-install]    27 | typedef enum { false = 0, true = 1 } bool;
[spkg-install]       |                                      ^~~~
[spkg-install] src/ctjhai/types.h:27:38: warning: useless type name in empty declaration
[spkg-install] make[3]: *** [<builtin>: src/ctjhai/minimum-weight-gf2.o] Error 1
[spkg-install] make[3]: *** [<builtin>: src/ctjhai/minimum-weight-gf3.o] Error 1

@GMS103
Copy link
Member Author

GMS103 commented Jul 31, 2025

"from scratch" = rm -fr sage (especially when testing for somebody else).

@GMS103
Copy link
Member Author

GMS103 commented Jul 31, 2025

Now using the correct configure

With
cmake_minimum_required(VERSION 3.25...4.0.3) (present situation)
SageMath version 10.7.beta9 + #40512 gives the following after
./configure --enable-gap_packages --enable-semigroups --enable-symengine

macOS 15.6
make succeeds.
make ptestlong gives 2 errors:

(1)

sage -t --long --warn-long 30.0 --random-seed=299022206910366462203725211757600829482 src/doc/en/reference/spkg/semigroups.rst
**********************************************************************
File "src/doc/en/reference/spkg/semigroups.rst", line 15, in doc.en.reference.spkg.semigroups
Failed example:
    libgap.LoadPackage("semigroups")       # optional - semigroups
Expected:
    true
Got:
    #I  ReadPackage could not read <digraphs>/gap/doc.g
    <BLANKLINE>
    true
**********************************************************************
1 item had failures:
   1 of   3 in doc.en.reference.spkg.semigroups
    [2 tests, 1 failure, 1.32s wall]
----------------------------------------------------------------------
sage -t --long --warn-long 30.0 --random-seed=… src/doc/en/reference/spkg/semigroups.rst  # 1 doctest failed
----------------------------------------------------------------------

as indicated by DIma.
(2)

sage -t --long --warn-long 30.0 --random-seed=… src/sage/algebras/quantum_groups/quantum_group_gap.py  # 1 doctest failed

related to TikZ (in fact there are some other failed tests, but they pass standalone).

Debian 12
make succeds.
make ptestlong gives the same semigroups.rst error (in fact there are some other failed tests, but they pass standalone).

@dimpase: What do you think?

@GMS103
Copy link
Member Author

GMS103 commented Jul 31, 2025

@dimpase
In config.log:

real_configure:126448: result: gap_packages:                   optional, SPKG version 4.14.0 will be installed
real_configure:140672: result: libsemigroups:                  no suitable system package; optional, use "./configure --enable-libsemigroups" to install SPKG version 2.7.4
real_configure:154427: result: planarity:                      no suitable system package; standard, SPKG version 4.0.0.0 will be installed
real_configure:170594: result: semigroups:                     optional, SPKG version 5.5.3 will be installed

This is incoherent for libsemigroups, do you think you could correct it?

@enriqueartal
Copy link
Contributor

I have the same error with semigroups.srt, I thought that it may come from having system gap but with the package is the same thing. I deduce that you can build guava as it is; can you with my modification? In linux gcc-15, it is not possible. For the config.log, I got the same thing but the package was installed, maybe because of dependencies.

@dimpase
Copy link
Member

dimpase commented Jul 31, 2025

@dimpase
In config.log:

real_configure:126448: result: gap_packages:                   optional, SPKG version 4.14.0 will be installed
real_configure:140672: result: libsemigroups:                  no suitable system package; optional, use "./configure --enable-libsemigroups" to install SPKG version 2.7.4
real_configure:154427: result: planarity:                      no suitable system package; standard, SPKG version 4.0.0.0 will be installed
real_configure:170594: result: semigroups:                     optional, SPKG version 5.5.3 will be installed

This is incoherent for libsemigroups, do you think you could correct it?

apart from different log formatting there seems to be no issue.

PS. libsemigroups is a dependency of semigroups, so it gets installed before the latter

@dimpase
Copy link
Member

dimpase commented Jul 31, 2025

I have the same error with semigroups.srt, I thought that it may come from having system gap but with the package is the same thing. I deduce that you can build guava as it is; can you with my modification? In linux gcc-15, it is not possible. For the config.log, I got the same thing but the package was installed, maybe because of dependencies.

this is an OS-dependent race condition, it appears.

@GMS103 GMS103 mentioned this pull request Jul 31, 2025
@dimpase
Copy link
Member

dimpase commented Jul 31, 2025

in a chain of PRs, each should either be positively reviewed, or closed

@GMS103
Copy link
Member Author

GMS103 commented Jul 31, 2025

Thanks, Dima.

@tobiasdiez
Copy link
Contributor

Why is conftest.py deleted here? This seems to be a mistake.

@GMS103
Copy link
Member Author

GMS103 commented Aug 1, 2025

Why is conftest.py deleted here? This seems to be a mistake.

Sorry, it is surely my fault, but I do not know how I did it.
Should be back now.

@dimpase
Copy link
Member

dimpase commented Aug 1, 2025

the usual git commit -a mistake.

The latter stages all the known to got changed files, and confest.py is left deleted whenever make invokes ./configure (something that's an off label use of GNU toolchain).

Please restore conftest.py here and elsewhere.

@GMS103
Copy link
Member Author

GMS103 commented Aug 1, 2025

the usual git commit -a mistake. Please restore conftest.py here and elsewhere.

You must be right.
As I said, it should be back. Could you verify?

@GMS103
Copy link
Member Author

GMS103 commented Aug 1, 2025

Thanks Dima.

Would you give me a pointer to "the usual git commit -a mistake"?
I have much to learn yet…

@vbraun
Copy link
Member

vbraun commented Aug 2, 2025

Merge conflict, please fix

@enriqueartal
Copy link
Contributor

If I am not wrong #40519 contains all the changes of this pull request and also those of #40509. Is it better to merge just #40519? Maybe with a change of title.

@vbraun
Copy link
Member

vbraun commented Aug 2, 2025

can do but #40519 has the same conflict

@dimpase
Copy link
Member

dimpase commented Aug 2, 2025

@GMS103 - if you give me write access to your sage develop branch then I could fix these easily.

@dimpase
Copy link
Member

dimpase commented Aug 2, 2025

anyway, a conflict is in src/doc/en/prep/Logging-On.rst - the problem there was fixed in develop branch, so this file should be just left alone.

@GMS103
Copy link
Member Author

GMS103 commented Aug 2, 2025

@vbraun
Please do not merge this, but #40519 (I am testing it ATM).

Copy link

github-actions bot commented Aug 2, 2025

Documentation preview for this PR (built with commit eccbb0f; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@vbraun
Copy link
Member

vbraun commented Aug 3, 2025

Closing in favor of #40519

@vbraun vbraun closed this Aug 3, 2025
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 3, 2025
This tries to take into account sagemath#40484.

@enriqueartal: Could you test it?

### ⌛ Dependencies

Built on top of sagemath#40512.

URL: sagemath#40519
Reported by: Guillermo Moreno-Socías
Reviewer(s): Dima Pasechnik, Enrique Manuel Artal Bartolo
@GMS103
Copy link
Member Author

GMS103 commented Aug 3, 2025

Thanks.

vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 3, 2025
This tries to take into account sagemath#40484.

@enriqueartal: Could you test it?

### ⌛ Dependencies

Built on top of sagemath#40512.

URL: sagemath#40519
Reported by: Guillermo Moreno-Socías
Reviewer(s): Dima Pasechnik, Enrique Manuel Artal Bartolo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants