Bug 257412 - math/sage: to be upgraded
Summary: math/sage: to be upgraded
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Thierry Thomas
URL:
Keywords:
Depends on: 257460 264679
Blocks:
  Show dependency treegraph
 
Reported: 2021-07-25 12:39 UTC by Danilo G. Baio
Modified: 2023-05-22 14:46 UTC (History)
1 user (show)

See Also:
thierry: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Danilo G. Baio freebsd_committer freebsd_triage 2021-07-25 12:39:25 UTC
cd ../.. && sage-logger -p './sage --docbuild --no-pdf-links all html ' logs/dochtml.log
[dochtml] 
[dochtml] Building reference manual, first pass.
[dochtml] 
[dochtml] Unable to init server: Could not connect to 127.0.0.1: Connection refused
[dochtml] Unable to init server: Could not connect to 127.0.0.1: Connection refused
[dochtml] [reference] building [inventory]: targets for 1 source files that are out of date
[dochtml] [reference] updating environment: [new config] 1 added, 0 changed, 0 removed
[dochtml] [reference] The inventory files are in ../build/usr/local/share/doc/sage/inventory/en/reference/references.
[dochtml] Build finished. The built documents can be found in /wrkdirs/usr/ports/math/sage/work/build/usr/local/share/doc/sage/inventory/en/reference/references
[dochtml] Unable to init server: Could not connect to 127.0.0.1: Connection refused
[dochtml] Unable to init server: Could not connect to 127.0.0.1: Connection refused
[dochtml] [spkg     ] building [inventory]: targets for 273 source files that are out of date
[dochtml] [spkg     ] updating environment: [new config] 273 added, 0 changed, 0 removed
[dochtml] [spkg     ] The inventory files are in ../build/usr/local/share/doc/sage/inventory/en/reference/spkg.
[dochtml] Build finished. The built documents can be found in /wrkdirs/usr/ports/math/sage/work/build/usr/local/share/doc/sage/inventory/en/reference/spkg
[dochtml] Unable to init server: Could not connect to 127.0.0.1: Connection refused
[dochtml] Unable to init server: Could not connect to 127.0.0.1: Connection refused
[dochtml] [manifolds] building [inventory]: targets for 78 source files that are out of date
[dochtml] [manifolds] updating environment: [new config] 78 added, 0 changed, 0 removed
[dochtml] [manifolds] Exception occurred:
[dochtml] [manifolds]   File "/wrkdirs/usr/ports/math/sage/work/sage-9.2/src/sage_setup/docbuild/ext/sage_autodoc.py", line 540, in add_content
[dochtml] [manifolds]     encoding = self.analyzer and self.analyzer._encoding
[dochtml] [manifolds] AttributeError: 'ModuleAnalyzer' object has no attribute '_encoding'
[dochtml] [manifolds] The full traceback has been saved in /tmp/sphinx-err-gefxxl_h.log, if you want to report the issue to the developers.
[dochtml] [manifolds] Please also report this if it was a user error, so that a better error message can be provided next time.
[dochtml] [manifolds] A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
[dochtml] Error building the documentation.
[dochtml] Traceback (most recent call last):
[dochtml]   File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
[dochtml]     return _run_code(code, main_globals, None,
[dochtml]   File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
[dochtml]     exec(code, run_globals)
[dochtml]   File "/wrkdirs/usr/ports/math/sage/work/build/usr/local/lib/python3.8/site-packages/sage_setup/docbuild/__main__.py", line 2, in <module>
[dochtml]     main()
[dochtml]   File "/wrkdirs/usr/ports/math/sage/work/build/usr/local/lib/python3.8/site-packages/sage_setup/docbuild/__init__.py", line 1729, in main
[dochtml]     builder()
[dochtml]   File "/wrkdirs/usr/ports/math/sage/work/build/usr/local/lib/python3.8/site-packages/sage_setup/docbuild/__init__.py", line 344, in _wrapper
[dochtml]     getattr(get_builder(document), 'inventory')(*args, **kwds)
[dochtml]   File "/wrkdirs/usr/ports/math/sage/work/build/usr/local/lib/python3.8/site-packages/sage_setup/docbuild/__init__.py", line 570, in _wrapper
[dochtml]     self._build_everything_except_bibliography(lang, format, *args, **kwds)
[dochtml]   File "/wrkdirs/usr/ports/math/sage/work/build/usr/local/lib/python3.8/site-packages/sage_setup/docbuild/__init__.py", line 556, in _build_everything_except_bibliography
[dochtml]     build_many(build_ref_doc, non_references)
[dochtml]   File "/wrkdirs/usr/ports/math/sage/work/build/usr/local/lib/python3.8/site-packages/sage_setup/docbuild/__init__.py", line 296, in build_many
[dochtml]     _build_many(target, args, processes=NUM_THREADS)
[dochtml]   File "/wrkdirs/usr/ports/math/sage/work/build/usr/local/lib/python3.8/site-packages/sage_setup/docbuild/utils.py", line 289, in build_many
[dochtml]     raise worker_exc.original_exception
[dochtml] OSError: Exception occurred:
gmake[2]: *** [Makefile:1876: doc-html] Error 1
gmake[2]: Leaving directory '/wrkdirs/usr/ports/math/sage/work/sage-9.2/build/make'
Comment 1 Thierry Thomas freebsd_committer freebsd_triage 2021-07-25 15:29:24 UTC
Thanks for the report. Indeed, sage-math-9.2 (the version of the port) requires sphinx 3.1.2 (it works with 3.5.2).

I have not been able to upgrade math/sage to 9.3 for other reasons, but it would also require sphinx 3.x.

Sage-9.4 (to be released soon, ATM sage-9.4.beta6), is written for Sphinx-4.0.1: I'll try it with your patch available in PR 257116.
Comment 2 Danilo G. Baio freebsd_committer freebsd_triage 2021-08-11 00:25:48 UTC
(In reply to Thierry Thomas from comment #1)

Hi Thierry.

Just to check, is there a way to disable the documentation build? If yes, is this reasonable until Sage is updated to 9.4?

Thanks!
Comment 3 Thierry Thomas freebsd_committer freebsd_triage 2022-01-10 16:32:56 UTC
(In reply to Danilo G. Baio from comment #2)

Hi Danilo: sorry for the late answer. I have been trying to fix or upgrade math/sage with various patches, but without success ATM (See PR 260809).

I'm reluctant to disable the documentation build to "fix" the port, because Sage is used to build its documentation: if it cannot, that means that the port builds
but is buggy.

But one thing is sure: the encountered problem does not depend on the sphinx version: do not retain this PR for math/sage, and do not hesitate to commit it when it's ready!
Comment 4 Danilo G. Baio freebsd_committer freebsd_triage 2022-01-10 23:20:35 UTC
(In reply to Thierry Thomas from comment #3)

Oh, good to know it's not related to the Sphinx update. Thanks for the feedback.
Comment 5 Thierry Thomas freebsd_committer freebsd_triage 2022-09-23 15:58:37 UTC
Trying to upgrade Sage to 9.7 fails because it requires a newer math/py-matplotlib:

[sagemath_doc_html-none] [dynamics ] Traceback (most recent call last):
[sagemath_doc_html-none] [dynamics ]   File "/usr/local/lib/python3.9/site-packages/matplotlib/sphinxext/plot_directive.py", line 484, in run_code
[sagemath_doc_html-none] [dynamics ]     exec(code, ns)
[sagemath_doc_html-none] [dynamics ]   File "<string>", line 4, in <module>
[sagemath_doc_html-none] [dynamics ]   File "<string>", line 32, in sphinx_plot
[sagemath_doc_html-none] [dynamics ]   File "/usr/ports/math/sage-9.7/work/sage-9.7/src/sage/plot/graphics.py", line 2767, in matplotlib
[sagemath_doc_html-none] [dynamics ]     g._render_on_subplot(subplot)
[sagemath_doc_html-none] [dynamics ]   File "/usr/ports/math/sage-9.7/work/sage-9.7/src/sage/plot/matrix_plot.py", line 175, in _render_on_subplot
[sagemath_doc_html-none] [dynamics ]     cmap = get_cmap(options.pop('cmap',None))
[sagemath_doc_html-none] [dynamics ]   File "/usr/ports/math/sage-9.7/work/sage-9.7/src/sage/plot/colors.py", line 1379, in get_cmap
[sagemath_doc_html-none] [dynamics ]     from matplotlib import colormaps
[sagemath_doc_html-none] [dynamics ] ImportError: cannot import name 'colormaps' from 'matplotlib' (/usr/local/lib/python3.9/site-packages/matplotlib/__init__.py)

colormaps is part of matplotlib 3.5.2.
Comment 6 Thierry Thomas freebsd_committer freebsd_triage 2023-05-22 14:46:56 UTC
Still trying to upgrade Sage to the latest (10.0 ATM).
No more problem with matplotlib, bur I am fighting against Singular…