Skip to content

Conversation

@vbraun
Copy link
Member

@vbraun vbraun commented Jun 15, 2025

Straightforward upgrade to the latest release

Apparently Singluar is not yet compatible with it

[singular-4.4.1] [spkg-install] /usr/bin/bash ./libtool  --tag=CXX   --mode=compile g++ -std=gnu++11 -DHAVE_CONFIG_H -I.  -I./include -I./include -I. -DFACTORY_BUILDING_DLL -I/home/vbraun/Sage/git/local/var/tmp/sage/build/singular-4.4.1/src -I/home/vbraun/Sage/git/local/var/tmp/sage/build/singular-4.4.1/src  -I/home/vbraun/Sage/git/local/include/  -I/home/vbraun/Sage/git/local/include -I/home/vbraun/Sage/git/local/include -DSING_NDEBUG -DOM_NDEBUG   -g -O2 -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-rtti -c -o FLINTconvert.lo FLINTconvert.cc
[singular-4.4.1] [spkg-install] libtool: compile:  g++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I./include -I./include -I. -DFACTORY_BUILDING_DLL -I/home/vbraun/Sage/git/local/var/tmp/sage/build/singular-4.4.1/src -I/home/vbraun/Sage/git/local/var/tmp/sage/build/singular-4.4.1/src -I/home/vbraun/Sage/git/local/include/ -I/home/vbraun/Sage/git/local/include -I/home/vbraun/Sage/git/local/include -DSING_NDEBUG -DOM_NDEBUG -g -O2 -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-rtti -c FLINTconvert.cc  -fPIC -DPIC -o .libs/FLINTconvert.o
[singular-4.4.1] [spkg-install] FLINTconvert.cc: In function 'void convertFacCFMatrix2Fq_nmod_mat_t(fq_nmod_mat_struct*, const fq_nmod_ctx_struct*, const CFMatrix&)':
[singular-4.4.1] [spkg-install] FLINTconvert.cc:655:36: error: 'struct fq_nmod_mat_struct' has no member named 'rows'
[singular-4.4.1] [spkg-install]   655 |       convertFacCF2nmod_poly_t (M->rows[i-1]+j-1, m (i,j));
[singular-4.4.1] [spkg-install]       |                                    ^~~~
[singular-4.4.1] [spkg-install] make[11]: *** [Makefile:1274: FLINTconvert.lo] Error 1
[singular-4.4.1] [spkg-install] make[10]: *** [Makefile:1379: all-recursive] Error 1
[singular-4.4.1] [spkg-install] make[9]: *** [Makefile:1041: all] Error 2
[singular-4.4.1] [spkg-install] make[8]: *** [Makefile:624: all-recursive] Error 1
[singular-4.4.1] [spkg-install] make[7]: *** [Makefile:475: all] Error 2
[singular-4.4.1] [spkg-install] *********************************************************************************************************************************************************
[singular-4.4.1] [spkg-install] Error building singular-4.4.1
[singular-4.4.1] [spkg-install] *********************************************************************************************************************************************************

See Singular/Singular#1279

Fixes #40253

@antonio-rojas
Copy link
Contributor

eclib needs patching too (builds fine but crashes at runtime) JohnCremona/eclib#87

@github-actions
Copy link

github-actions bot commented Jun 15, 2025

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

@vbraun vbraun force-pushed the update-flint-3.3.0 branch from 71228c8 to 4966f07 Compare June 15, 2025 14:22
@vbraun
Copy link
Member Author

vbraun commented Jun 15, 2025

This PR now works for me, but doesn't fix #40253 when using gcc 15

@JohnCremona
Copy link
Member

eclib needs patching too (builds fine but crashes at runtime) JohnCremona/eclib#87

I will shortly be merging @antonio-rojas 's eclib patch there, so either that patch needs to applied in Sage, or I canmake a new eclib release which Sage will need to use and make as a prerequisite for this PR. Sorry about this, there was a backwards-incompatible change in FLINT.

@vbraun
Copy link
Member Author

vbraun commented Jun 16, 2025

The eclib patch is already in this PR, fyi

@enriqueartal
Copy link
Contributor

This PR now works for me, but doesn't fix #40253 when using gcc 15

Any idea why? I got the same result, built but segfault.

@vbraun
Copy link
Member Author

vbraun commented Jun 16, 2025

We've narrowed the segfault down to flint miscompiling with gcc 15, see flintlib/flint#2340 for details

Flint miscompiles with gcc 15, workaround is to compile with -fno-strict-aliasing

This is also what Fedora does:
https://src.fedoraproject.org/rpms/flint/blob/rawhide/f/flint.spec#_97-98

See flintlib/flint#2340 for upstream bug report
@enriqueartal
Copy link
Contributor

It works for me!

@vbraun
Copy link
Member Author

vbraun commented Jun 16, 2025

I've added the -fno-strict-aliasing to the cflags, but I still get

**********************************************************************
File "src/sage/schemes/elliptic_curves/gp_simon.py", line 84, in sage.schemes.elliptic_curves.gp_simon.?
Failed example:
    E.simon_two_descent()                             # long time
Expected:
    (0, 2, [])
Got:
    (2, 2, [(-121/64*w - 2719/64 : -15555/512*w - 186181/512 : 1)])
**********************************************************************

Though not sure if its related to flint, might be another gcc 15 issue. Afaik thats just using pari so no flint involved...

@antonio-rojas
Copy link
Contributor

I've added the -fno-strict-aliasing to the cflags, but I still get

**********************************************************************
File "src/sage/schemes/elliptic_curves/gp_simon.py", line 84, in sage.schemes.elliptic_curves.gp_simon.?
Failed example:
    E.simon_two_descent()                             # long time
Expected:
    (0, 2, [])
Got:
    (2, 2, [(-121/64*w - 2719/64 : -15555/512*w - 186181/512 : 1)])
**********************************************************************

Though not sure if its related to flint, might be another gcc 15 issue...

That's a random issue, I've beed getting it occasionally for a long time

@vbraun
Copy link
Member Author

vbraun commented Jun 16, 2025

Ah true, using different random seed "fixes" the two descent ;)

So this PR is ready for review.

@antonio-rojas
Copy link
Contributor

there's now en eclib release including the patch, and also a 3.3.1 flint bugfix release.

@vbraun vbraun changed the title Upgrade to flint-3.3.0 Upgrade to flint-3.3.1 Jun 22, 2025
@vbraun
Copy link
Member Author

vbraun commented Jun 22, 2025

I've updated the patch for flint-3.3.1, though it still segfaults without -fno-strict-aliasing

The new eclib release doesn't build with gcc-14, I've opened JohnCremona/eclib#88

@vbraun vbraun force-pushed the update-flint-3.3.0 branch from 048c572 to 31faf32 Compare June 29, 2025 18:33
@vbraun
Copy link
Member Author

vbraun commented Jun 29, 2025

I've upgraded the PR to eclib 20250627, now eclib does not need the flint compatibility patch any more

It would be nice to get this reviewed so we can make a release that actually works on Fedora....

@enriqueartal
Copy link
Contributor

I tried this in two computers. In the second one, fresh compilation, everything is fine, only one test did not pass (as in #38544 (comment)); the compilation failed in maxima using system ecl, it worked with the spkg.
In the first computer some tests took very long time and caused crashes after stopping, e.g. src/sage/combinat/designs/incidence_structures.py.

@vbraun vbraun force-pushed the update-flint-3.3.0 branch from 31faf32 to 8253d12 Compare June 30, 2025 17:16
vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 7, 2025
Straightforward upgrade to the latest release

Apparently Singluar is not yet compatible with it
```
[singular-4.4.1] [spkg-install] /usr/bin/bash ./libtool  --tag=CXX
--mode=compile g++ -std=gnu++11 -DHAVE_CONFIG_H -I.  -I./include
-I./include -I. -DFACTORY_BUILDING_DLL
-I/home/vbraun/Sage/git/local/var/tmp/sage/build/singular-4.4.1/src
-I/home/vbraun/Sage/git/local/var/tmp/sage/build/singular-4.4.1/src
-I/home/vbraun/Sage/git/local/include/
-I/home/vbraun/Sage/git/local/include
-I/home/vbraun/Sage/git/local/include -DSING_NDEBUG -DOM_NDEBUG   -g -O2
-pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-
unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-
pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions
-fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-
loops -fno-rtti -c -o FLINTconvert.lo FLINTconvert.cc
[singular-4.4.1] [spkg-install] libtool: compile:  g++ -std=gnu++11
-DHAVE_CONFIG_H -I. -I./include -I./include -I. -DFACTORY_BUILDING_DLL
-I/home/vbraun/Sage/git/local/var/tmp/sage/build/singular-4.4.1/src
-I/home/vbraun/Sage/git/local/var/tmp/sage/build/singular-4.4.1/src
-I/home/vbraun/Sage/git/local/include/
-I/home/vbraun/Sage/git/local/include
-I/home/vbraun/Sage/git/local/include -DSING_NDEBUG -DOM_NDEBUG -g -O2
-pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-
unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-
pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions
-fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-
loops -fno-rtti -c FLINTconvert.cc  -fPIC -DPIC -o .libs/FLINTconvert.o
[singular-4.4.1] [spkg-install] FLINTconvert.cc: In function 'void
convertFacCFMatrix2Fq_nmod_mat_t(fq_nmod_mat_struct*, const
fq_nmod_ctx_struct*, const CFMatrix&)':
[singular-4.4.1] [spkg-install] FLINTconvert.cc:655:36: error: 'struct
fq_nmod_mat_struct' has no member named 'rows'
[singular-4.4.1] [spkg-install]   655 |       convertFacCF2nmod_poly_t
(M->rows[i-1]+j-1, m (i,j));
[singular-4.4.1] [spkg-install]       |
^~~~
[singular-4.4.1] [spkg-install] make[11]: *** [Makefile:1274:
FLINTconvert.lo] Error 1
[singular-4.4.1] [spkg-install] make[10]: *** [Makefile:1379: all-
recursive] Error 1
[singular-4.4.1] [spkg-install] make[9]: *** [Makefile:1041: all] Error
2
[singular-4.4.1] [spkg-install] make[8]: *** [Makefile:624: all-
recursive] Error 1
[singular-4.4.1] [spkg-install] make[7]: *** [Makefile:475: all] Error 2
[singular-4.4.1] [spkg-install] ****************************************
************************************************************************
*****************************************
[singular-4.4.1] [spkg-install] Error building singular-4.4.1
[singular-4.4.1] [spkg-install] ****************************************
************************************************************************
*****************************************
```
See Singular/Singular#1279

Fixes sagemath#40253

URL: sagemath#40259
Reported by: Volker Braun
Reviewer(s):
@vbraun
Copy link
Member Author

vbraun commented Jul 8, 2025

I've bumped the min version in build/pkgs/eclib/spkg-configure.m4 so a working eclib is required

Still needs review...

@JohnCremona
Copy link
Member

I see no problems, but I'm not sure if I can give a positive review without doing a build from scratch on a machine without lots of versions of FLINT and eclib already installed -- which I do not have. If you don't think that matters, please say so.

@enriqueartal
Copy link
Contributor

I built with the last change. Some tests failed with ./sage -t -a but they passed when run independently (Fedora 42)

@vbraun
Copy link
Member Author

vbraun commented Jul 9, 2025

I ran it on the buildbot and tests pass there...

@vbraun
Copy link
Member Author

vbraun commented Jul 16, 2025

Just a reminder that this PR is necessary to pass tests on Fedora 42... please review...

@enriqueartal
Copy link
Contributor

From my experience it builts in my installations of Fedora 42. Concerning the tests, there were some failures with ./sage - t -a, but all failed tests passed when they were run on their own. It seems fine for me but I do not know if something else is needed for a positive review.

@vbraun
Copy link
Member Author

vbraun commented Jul 18, 2025

this PR should really be uncontroversial, its just upstream updates and collecting a patch that upstream provided to work

@enriqueartal enriqueartal self-requested a review July 19, 2025 06:14
@vbraun vbraun merged commit 6d840bf into sagemath:develop Jul 25, 2025
14 of 28 checks passed
vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 26, 2025
sagemathgh-40448: Replace ci-linux-incremental by ci-linux
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

The incremental runs are supposed to test package updates - however,
exactly in those situations, they are not working since the rebuilt
sagelib is not linking correctly against the new versions. For example,
in the flint update sagemath#40259, we get
>   [sagemath_doc_html-none]   [spkg-install]     from sage.rings import
complex_interval, integer
  [sagemath_doc_html-none]   [spkg-install] ImportError: libflint.so.20:
cannot open shared object file: No such file or directory

https://github.com/sagemath/sage/actions/runs/15979364834/job/4507007300
7?pr=40259#step:11:4686

For this reason, the incremental runs are replaced here by the build-
from-zero runs. Those are a bit slower but more reliable.

### :memo: Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### :hourglass: Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#40448
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 27, 2025
sagemathgh-40448: Replace ci-linux-incremental by ci-linux
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

The incremental runs are supposed to test package updates - however,
exactly in those situations, they are not working since the rebuilt
sagelib is not linking correctly against the new versions. For example,
in the flint update sagemath#40259, we get
>   [sagemath_doc_html-none]   [spkg-install]     from sage.rings import
complex_interval, integer
  [sagemath_doc_html-none]   [spkg-install] ImportError: libflint.so.20:
cannot open shared object file: No such file or directory

https://github.com/sagemath/sage/actions/runs/15979364834/job/4507007300
7?pr=40259#step:11:4686

For this reason, the incremental runs are replaced here by the build-
from-zero runs. Those are a bit slower but more reliable.

### :memo: Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### :hourglass: Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#40448
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 28, 2025
sagemathgh-40448: Replace ci-linux-incremental by ci-linux
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

The incremental runs are supposed to test package updates - however,
exactly in those situations, they are not working since the rebuilt
sagelib is not linking correctly against the new versions. For example,
in the flint update sagemath#40259, we get
>   [sagemath_doc_html-none]   [spkg-install]     from sage.rings import
complex_interval, integer
  [sagemath_doc_html-none]   [spkg-install] ImportError: libflint.so.20:
cannot open shared object file: No such file or directory

https://github.com/sagemath/sage/actions/runs/15979364834/job/4507007300
7?pr=40259#step:11:4686

For this reason, the incremental runs are replaced here by the build-
from-zero runs. Those are a bit slower but more reliable.

### :memo: Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### :hourglass: Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#40448
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 29, 2025
sagemathgh-40448: Replace ci-linux-incremental by ci-linux
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

The incremental runs are supposed to test package updates - however,
exactly in those situations, they are not working since the rebuilt
sagelib is not linking correctly against the new versions. For example,
in the flint update sagemath#40259, we get
>   [sagemath_doc_html-none]   [spkg-install]     from sage.rings import
complex_interval, integer
  [sagemath_doc_html-none]   [spkg-install] ImportError: libflint.so.20:
cannot open shared object file: No such file or directory

https://github.com/sagemath/sage/actions/runs/15979364834/job/4507007300
7?pr=40259#step:11:4686

For this reason, the incremental runs are replaced here by the build-
from-zero runs. Those are a bit slower but more reliable.

### :memo: Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### :hourglass: Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#40448
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 1, 2025
sagemathgh-40448: Replace ci-linux-incremental by ci-linux
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

The incremental runs are supposed to test package updates - however,
exactly in those situations, they are not working since the rebuilt
sagelib is not linking correctly against the new versions. For example,
in the flint update sagemath#40259, we get
>   [sagemath_doc_html-none]   [spkg-install]     from sage.rings import
complex_interval, integer
  [sagemath_doc_html-none]   [spkg-install] ImportError: libflint.so.20:
cannot open shared object file: No such file or directory

https://github.com/sagemath/sage/actions/runs/15979364834/job/4507007300
7?pr=40259#step:11:4686

For this reason, the incremental runs are replaced here by the build-
from-zero runs. Those are a bit slower but more reliable.

### :memo: Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### :hourglass: Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#40448
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
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.

GCC 15: Segmentation fault in src/sage/schemes/curves/point.py

4 participants