Sage-10.4 fails to build

159 views
Skip to first unread message

Niranjana K M

unread,
Aug 2, 2024, 5:49:31 AM8/2/24
to sage-...@googlegroups.com
Dear Sage developers,
    Sage-10.4 fails to build on my computer running with Gentoo Linux.
It uses gcc-13.3.1 and python-3.12.3.
Sagemath is the master branch from git.
It fails to build sagelib-10.4. If i search for errors in log i could find lines related to flint.
Please help me in this regard. Build log and config log are attached herewith.

Regards
Dr. Niranjana
sagelib-10.4.log
config.log

Michael Orlitzky

unread,
Aug 2, 2024, 8:23:19 AM8/2/24
to sage-...@googlegroups.com
On 2024-08-02 15:19:03, Niranjana K M wrote:
> Dear Sage developers,
> Sage-10.4 fails to build on my computer running with Gentoo Linux.
> It uses gcc-13.3.1 and python-3.12.3.
> Sagemath is the master branch from git.
> It fails to build sagelib-10.4. If i search for errors in log i could find
> lines related to flint.

Install sci-mathematics/flint-3.1.3_p1, re-run ./configure, and try again?

Niranjana K M

unread,
Aug 2, 2024, 10:09:20 AM8/2/24
to sage-devel
At first I had flint-3.1.0 from Gentoo portage. Got same errors and build failed. The I uninstalled flint and its dependents from Gentoo and let the Sage choose its flint spkg. Again it also failed with same errors.

Matthias Koeppe

unread,
Aug 2, 2024, 2:24:45 PM8/2/24
to sage-devel
According to your log, this is a build failure using the experimental option "./configure --enable-system-site-packages".

This failure comes from use of system NumPy 2; try with https://github.com/sagemath/sage/pull/38227, which has a fix.

dim...@gmail.com

unread,
Aug 2, 2024, 2:24:56 PM8/2/24
to sage-...@googlegroups.com, Niranjana K M, Michael Orlitzky
On Fri, Aug 02, 2024 at 07:09:20AM -0700, Niranjana K M wrote:
> At first I had flint-3.1.0 from Gentoo portage. Got same errors and build
> failed. The I uninstalled flint and its dependents from Gentoo and let the
> Sage choose its flint spkg. Again it also failed with same errors.

I can confirm that on on Gentoo with sci-mathematics/flint-3.1.3_p1
installed one can build Sage 10.5.beta0 just fine.
I did not try 10.4, and I didn't try to build Sage-supplied flint.

It's another question why Sage's flint, version 3.1.3, which does not
have Gentoo-specific patches, fails to build on your system.

Just use the up to date flint from portage, not an old one, and it
should be fine to build 10.5.beta0 (the current develop branch).

HTH
Dima

>
> On Friday, August 2, 2024 at 5:53:19 PM UTC+5:30 Michael Orlitzky wrote:
>
> > On 2024-08-02 15:19:03, Niranjana K M wrote:
> > > Dear Sage developers,
> > > Sage-10.4 fails to build on my computer running with Gentoo Linux.
> > > It uses gcc-13.3.1 and python-3.12.3.
> > > Sagemath is the master branch from git.
> > > It fails to build sagelib-10.4. If i search for errors in log i could
> > find
> > > lines related to flint.
> >
> > Install sci-mathematics/flint-3.1.3_p1, re-run ./configure, and try again?
> >
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/fea89543-9fb9-4113-aa45-88916c994a76n%40googlegroups.com.

signature.asc

Michael Orlitzky

unread,
Aug 2, 2024, 3:17:45 PM8/2/24
to sage-...@googlegroups.com
On Fri, 2024-08-02 at 07:09 -0700, Niranjana K M wrote:
> At first I had flint-3.1.0 from Gentoo portage. Got same errors and build
> failed. The I uninstalled flint and its dependents from Gentoo and let the
> Sage choose its flint spkg. Again it also failed with same errors.
>

These errors,

> local/include/flint/nmod_mpoly_factor.h:366:49: error: expected ')' before '__extension__'

arise from flint's use of the variable name "I" in a few places. C99
technically forbids that IIRC. Our flint-3.1.3_p1 package (but no
earlier versions) contain a patch from Dima to fix the issue.

We were expecting people to hit this with gcc-14 which is still
unstable, but I guess some of the patches that have been backported to
your 13.3.1_p20240614 trigger it. I've filed a stabilization request
for flint-3.1.3_p1 to get ahead of the problem.


dim...@gmail.com

unread,
Aug 2, 2024, 3:46:31 PM8/2/24
to sage-...@googlegroups.com, Niranjana K M
On Fri, Aug 02, 2024 at 09:40:03AM -0700, Matthias Koeppe wrote:
> According to your log, this is a build failure using the experimental
> option "./configure --enable-system-site-packages".
>
> This failure comes from use of system NumPy 2; try with
> https://github.com/sagemath/sage/pull/38227, which has a fix.

This is already fixed in 10.5.beta0
which includes
https://github.com/sagemath/sage/pull/38250
and is enough to allow system-wide numpy 2.0

Thus, just use 10.5.beta0 (a.k.a. the latest develop branch)



>
> On Friday, August 2, 2024 at 2:49:31 AM UTC-7 Niranjana K M wrote:
>
> > Dear Sage developers,
> > Sage-10.4 fails to build on my computer running with Gentoo Linux.
> > It uses gcc-13.3.1 and python-3.12.3.
> > Sagemath is the master branch from git.
> > It fails to build sagelib-10.4. If i search for errors in log i could find
> > lines related to flint.
> > Please help me in this regard. Build log and config log are attached
> > herewith.
> >
> >
> > *Regards*
> > *Dr. Niranjana*
> >
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/0d7c313d-5d18-4d82-8d39-fdd3cbbaad34n%40googlegroups.com.

signature.asc

François Bissey

unread,
Aug 2, 2024, 3:59:10 PM8/2/24
to sage-...@googlegroups.com
Yes, that weirded me out in
https://github.com/cschwan/sage-on-gentoo/issues/789
But not everyone with a gcc-13.3.x compiler is affected, so there maybe
something more subtle at play. Maybe a compiler use flag?

Niranjana K M

unread,
Aug 2, 2024, 4:06:33 PM8/2/24
to sage-...@googlegroups.com
May be the Gentoo Hardened gcc?
  $ gcc --version
  gcc (Gentoo Hardened 13.3.1_p20240614 p17) 13.3.1 20240614


--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.

François Bissey

unread,
Aug 2, 2024, 4:11:28 PM8/2/24
to sage-...@googlegroups.com
Yes, that kind of thing is important to mention.

Niranjana K M

unread,
Aug 4, 2024, 2:41:37 AM8/4/24
to sage-...@googlegroups.com
I could build till sagelib with the patched flint.
Now I get an error in building doc.

[spkg-install] [reference] WARNING: unsupported theme option 'source_view_link' given
[spkg-install] [reference] The HTML pages are in ../../local/share/doc/sage/html/en/reference/references.
[spkg-install] Error building the documentation.
[spkg-install] Traceback (most recent call last):
[spkg-install]   File "<frozen runpy>", line 198, in _run_module_as_main
[spkg-install]   File "<frozen runpy>", line 88, in _run_code
[spkg-install]   File "/mnt/vol_05/for-gentoo/sage/sage/src/sage_docbuild/__main__.py", line 530, in <module>
[spkg-install]     sys.exit(main())
[spkg-install]              ^^^^^^
[spkg-install]   File "/mnt/vol_05/for-gentoo/sage/sage/src/sage_docbuild/__main__.py", line 526, in main
[spkg-install]     builder()
[spkg-install]   File "/mnt/vol_05/for-gentoo/sage/sage/src/sage_docbuild/builders.py", line 827, in _wrapper
[spkg-install]     getattr(DocBuilder, build_type)(self, *args, **kwds)
[spkg-install]   File "/mnt/vol_05/for-gentoo/sage/sage/src/sage_docbuild/builders.py", line 163, in f
[spkg-install]     runsphinx()
[spkg-install]   File "/mnt/vol_05/for-gentoo/sage/sage/src/sage_docbuild/sphinxbuild.py", line 319, in runsphinx
[spkg-install]     sys.stderr.raise_errors()
[spkg-install]   File "/mnt/vol_05/for-gentoo/sage/sage/src/sage_docbuild/sphinxbuild.py", line 255, in raise_errors
[spkg-install]     raise OSError(self._error)
[spkg-install] OSError: WARNING: unsupported theme option 'source_view_link' given

I am in `develop` branch 10.5.beta1 in Gentoo linux. The log files are attached herewith.

According to it, it is now fixed in furo-2024.07.18 which is also the spkg version in develop branch.
But I had furo-2024.5.6 installed through Gentoo and the build picked it up and used the system installed furo.
May be it needs furo version restriction in build scripts to avoid picking old furo.


--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
sagemath_doc_html-none.log

Niranjana K M

unread,
Aug 4, 2024, 4:21:53 AM8/4/24
to sage-...@googlegroups.com
Thank you all for your guidance and support. I could successfully build sagemath-10.5.beta1.

PS: Happy to see Gentoos in the group.

Dima Pasechnik

unread,
Aug 4, 2024, 2:04:25 PM8/4/24
to sage-...@googlegroups.com
for me, the build with Gentoo system furo-2024.5.6 works.
(your error could be due to other sphinx-related packages - I have
all the sphinx* - Sage packages coming from the system
as well)

Dima
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAMcUJ1s%2BVuOTmnCDYyQZYc2n8cTNguqh_6-A7w3tjNhx65mQEQ%40mail.gmail.com.

Niranjana K M

unread,
Aug 4, 2024, 2:34:09 PM8/4/24
to sage-...@googlegroups.com


for me, the build with Gentoo system furo-2024.5.6 works.
(your error  could be due to other sphinx-related packages - I have
all the sphinx* - Sage packages coming from the system
as well)

After updating furo alone the build completed successfully.

Now in Gentoo portage they removed all other furo leaving only the recent one. Also they removed all other flint leaving the patched one (also they marked it stable). Thank you for the patch.

Matthias Koeppe

unread,
Aug 6, 2024, 4:16:07 PM8/6/24
to sage-devel
On Saturday, August 3, 2024 at 11:41:37 PM UTC-7 Niranjana K M wrote:
I could build till sagelib with the patched flint.
Now I get an error in building doc.

[spkg-install] [reference] WARNING: unsupported theme option 'source_view_link' given
I am in `develop` branch 10.5.beta1 in Gentoo linux. The log files are attached herewith.

According to it, it is now fixed in furo-2024.07.18 which is also the spkg version in develop branch.
But I had furo-2024.5.6 installed through Gentoo and the build picked it up and used the system installed furo.
May be it needs furo version restriction in build scripts to avoid picking old furo.
Reply all
Reply to author
Forward
0 new messages