cschwan / sage-on-gentoo

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

sci-mathematics/sage-doc fails to build: unable to simplify to float approximation #792

Open yamabiiko opened 1 month ago

yamabiiko commented 1 month ago

Not a duplicate of #790

[plotting ][0m39;49;00m   File "sage/libs/mpmath/utils.pyx", line 443, in sage.libs.mpmath.utils.call (/var/tmp/portage/sci-mathematics/sagemath-standard-10.4-r1/work/sagemath_standard-10.4-python3_12/build/cythonized/sage/libs/mpmath/utils.c:10173)
[plotting ][0m39;49;00m     y = mpmath_to_sage(y, prec)
[plotting ][0m39;49;00m   File "sage/libs/mpmath/utils.pyx", line 278, in sage.libs.mpmath.utils.mpmath_to_sage (/var/tmp/portage/sci-mathematics/sagemath-standard-10.4-r1/work/sagemath_standard-10.4-python3_12/build/cythonized/sage/libs/mpmath/utils.c:8651)
[plotting ][0m39;49;00m     mpfr_from_mpfval(z.__re, re)
[plotting ][0m39;49;00m   File "sage/libs/mpmath/utils.pyx", line 166, in sage.libs.mpmath.utils.mpfr_from_mpfval (/var/tmp/portage/sci-mathematics/sagemath-standard-10.4-r1/work/sagemath_standard-10.4-python3_12/build/cythonized/sage/libs/mpmath/utils.c:7600)
[plotting ][0m39;49;00m     sign, man, exp, bc = x
[plotting ][0m39;49;00m TypeError: Cannot convert gmpy2.mpz to sage.rings.integer.Integer
[plotting ][0m39;49;00m During handling of the above exception, another exception occurred:
[plotting ][0m39;49;00m Traceback (most recent call last):
[plotting ][0m39;49;00m   File "sage/symbolic/expression.pyx", line 1959, in sage.symbolic.expression.Expression.__float__ (/var/tmp/portage/sci-mathematics/sagemath-standard-10.4-r1/work/sagemath_standard-10.4-python3_12/build/cythonized/sage/symbolic/expression.cpp:52690)
[plotting ][0m39;49;00m     c = (self._eval_self(complex))
[plotting ][0m39;49;00m   File "sage/symbolic/expression.pyx", line 1627, in sage.symbolic.expression.Expression._eval_self (/var/tmp/portage/sci-mathematics/sagemath-standard-10.4-r1/work/sagemath_standard-10.4-python3_12/build/cythonized/sage/symbolic/expression.cpp:49424)
[plotting ][0m39;49;00m     res = self._convert({'parent':R_complex})
[plotting ][0m39;49;00m   File "sage/symbolic/expression.pyx", line 1701, in sage.symbolic.expression.Expression._convert (/var/tmp/portage/sci-mathematics/sagemath-standard-10.4-r1/work/sagemath_standard-10.4-python3_12/build/cythonized/sage/symbolic/expression.cpp:49928)
[plotting ][0m39;49;00m     cdef GEx res = self._gobj.evalf(0, kwds)
[plotting ][0m39;49;00m   File "/usr/lib/python3.12/site-packages/sage/functions/bessel.py", line 421, in _evalf_
[plotting ][0m39;49;00m     return _mpmath_utils_call(_mpmath_besselj, n, x, parent=parent)
[plotting ][0m39;49;00m            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[plotting ][0m39;49;00m   File "sage/libs/mpmath/utils.pyx", line 443, in sage.libs.mpmath.utils.call (/var/tmp/portage/sci-mathematics/sagemath-standard-10.4-r1/work/sagemath_standard-10.4-python3_12/build/cythonized/sage/libs/mpmath/utils.c:10173)
[plotting ][0m39;49;00m     y = mpmath_to_sage(y, prec)
[plotting ][0m39;49;00m   File "sage/libs/mpmath/utils.pyx", line 278, in sage.libs.mpmath.utils.mpmath_to_sage (/var/tmp/portage/sci-mathematics/sagemath-standard-10.4-r1/work/sagemath_standard-10.4-python3_12/build/cythonized/sage/libs/mpmath/utils.c:8651)
[plotting ][0m39;49;00m     mpfr_from_mpfval(z.__re, re)
[plotting ][0m39;49;00m   File "sage/libs/mpmath/utils.pyx", line 166, in sage.libs.mpmath.utils.mpfr_from_mpfval (/var/tmp/portage/sci-mathematics/sagemath-standard-10.4-r1/work/sagemath_standard-10.4-python3_12/build/cythonized/sage/libs/mpmath/utils.c:7600)
[plotting ][0m39;49;00m     sign, man, exp, bc = x
[plotting ][0m39;49;00m TypeError: Cannot convert gmpy2.mpz to sage.rings.integer.Integer
[plotting ][0m39;49;00m During handling of the above exception, another exception occurred:
[plotting ][0m39;49;00m Traceback (most recent call last):
[plotting ][0m39;49;00m   File "/usr/lib/python3.12/site-packages/matplotlib/sphinxext/plot_directive.py", line 552, in _run_code
[plotting ][0m39;49;00m     exec(code, ns)
[plotting ][0m39;49;00m   File "<string>", line 2, in <module>
[plotting ][0m39;49;00m   File "/usr/lib/python3.12/site-packages/sage/plot/line.py", line 311, in line
[plotting ][0m39;49;00m     return line2d(points, **kwds)
[plotting ][0m39;49;00m            ^^^^^^^^^^^^^^^^^^^^^^
[plotting ][0m39;49;00m   File "/usr/lib/python3.12/site-packages/sage/misc/decorators.py", line 658, in wrapper
[plotting ][0m39;49;00m     return func(*args, **kwds)
[plotting ][0m39;49;00m            ^^^^^^^^^^^^^^^^^^^
[plotting ][0m39;49;00m   File "/usr/lib/python3.12/site-packages/sage/misc/decorators.py", line 497, in wrapper
[plotting ][0m39;49;00m     return func(*args, **options)
[plotting ][0m39;49;00m            ^^^^^^^^^^^^^^^^^^^^^^
[plotting ][0m39;49;00m   File "/usr/lib/python3.12/site-packages/sage/plot/line.py", line 621, in line2d
[plotting ][0m39;49;00m     xdata, ydata = xydata_from_point_list(points)
[plotting ][0m39;49;00m                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[plotting ][0m39;49;00m   File "/usr/lib/python3.12/site-packages/sage/plot/plot.py", line 839, in xydata_from_point_list
[plotting ][0m39;49;00m     ydata.append(float(y))
[plotting ][0m39;49;00m                  ^^^^^^^^
[plotting ][0m39;49;00m   File "sage/symbolic/expression.pyx", line 1965, in sage.symbolic.expression.Expression.__float__ (/var/tmp/portage/sci-mathematics/sagemath-standard-10.4-r1/work/sagemath_standard-10.4-python3_12/build/cythonized/sage/symbolic/expression.cpp:52832)
[plotting ][0m39;49;00m     raise TypeError("unable to simplify to float approximation")
[plotting ][0m39;49;00m TypeError: unable to simplify to float approximation[0m39;49;00m
[plotting ][0m39;49;00m The inventory file is in ../../../build_doc/inventory/en/reference/plotting.
Error building the documentation.
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/lib/python3.12/site-packages/sage_docbuild/__main__.py", line 530, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.12/site-packages/sage_docbuild/__main__.py", line 526, in main
    builder()
  File "/usr/lib/python3.12/site-packages/sage_docbuild/builders.py", line 827, in _wrapper
    getattr(DocBuilder, build_type)(self, *args, **kwds)
  File "/usr/lib/python3.12/site-packages/sage_docbuild/builders.py", line 163, in f
    runsphinx()
  File "/usr/lib/python3.12/site-packages/sage_docbuild/sphinxbuild.py", line 319, in runsphinx
    sys.stderr.raise_errors()
  File "/usr/lib/python3.12/site-packages/sage_docbuild/sphinxbuild.py", line 255, in raise_errors
    raise OSError(self._error)
OSError: /usr/lib/python3.12/site-packages/sage/plot/line.py:docstring of sage.plot.line.line2d:223: WARNING: Exception occurred in plotting line-14

    Note: incremental documentation builds sometimes cause spurious
    error messages. To be certain that these are real errors, run
    "make doc-clean doc-uninstall" first and try again.
make[1]: *** [Makefile:28: doc-inventory--reference-plotting] Error 1
make[1]: Leaving directory '/var/tmp/portage/sci-mathematics/sage-doc-10.4/work/sage-10.4/src/doc'
make: *** [Makefile:41: doc-inventory-reference] Error 2

Full log: build.log

kiwifb commented 1 month ago

I have seen that before but have no fix apart from downgrading your mpmath to a lower version.

yamabiiko commented 1 month ago

I confirm that after downgrading mpmath from 1.4.0_alpha1 to 1.3.0-r1 the build is successful

kiwifb commented 1 month ago

Of course, it will have to be fixed properly. But the new mpmath is alpha1 which means there could be many changes before the final release, making it a potentially fast moving target.

narodnik commented 1 month ago

I tried to downgrade but I get this issue:

emovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/matroids.
sage --docbuild --no-pdf-links reference/quivers html --no-prune-empty-dirs
/usr/lib/python3.12/site-packages/sage_docbuild/builders.py:1075: FutureWarning: Ideals of non-maximal orders are an experimental feature. Be wary of bugs.
See https://github.com/sagemath/sage/issues/34198 for details.
  __import__(module_name)
sage --docbuild --no-pdf-links reference/resolutions html --no-prune-empty-dirs
[modabvar ] Extension error:
[modabvar ] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/modabvar.
[modsym   ] Extension error:
[modsym   ] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/modsym.
[noncommut] Extension error:
[noncommut] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/noncommutative_polynomial_rings.
[monoids  ] Extension error:
[monoids  ] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/monoids.
[number_fi] Extension error:
[number_fi] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/number_fields.
[modfrm   ] Extension error:
[modfrm   ] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/modfrm.
[modules  ] Extension error:
[modules  ] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/modules.
[numerical] Extension error:
[numerical] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/numerical.
[padics   ] Extension error:
[padics   ] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/padics.
[power_ser] Extension error:
[power_ser] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/power_series.
[plotting ] Extension error:
[plotting ] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/plotting.
sage --docbuild --no-pdf-links reference/riemannian_geometry html --no-prune-empty-dirs
[probabili] Extension error:
[probabili] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/probability.
sage --docbuild --no-pdf-links reference/rings html --no-prune-empty-dirs
[quadratic] Extension error:
[quadratic] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/quadratic_forms.
sage --docbuild --no-pdf-links reference/rings_numerical html --no-prune-empty-dirs
sage --docbuild --no-pdf-links reference/rings_standard html --no-prune-empty-dirs
sage --docbuild --no-pdf-links reference/sat html --no-prune-empty-dirs
[quat_alge] Extension error:
[quat_alge] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/quat_algebras.
sage --docbuild --no-pdf-links reference/schemes html --no-prune-empty-dirs
sage --docbuild --no-pdf-links reference/semirings html --no-prune-empty-dirs
sage --docbuild --no-pdf-links reference/sets html --no-prune-empty-dirs
sage --docbuild --no-pdf-links reference/stats html --no-prune-empty-dirs
sage --docbuild --no-pdf-links reference/structure html --no-prune-empty-dirs
sage --docbuild --no-pdf-links reference/valuations html --no-prune-empty-dirs
sage --docbuild --no-pdf-links reference/history_and_license html --no-prune-empty-dirs
make[1]: 'doc-html--reference-modfrm' is up to date.
make[1]: 'doc-html--reference-modules' is up to date.
[quivers  ] Extension error:
[quivers  ] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/quivers.
[resolutio] Extension error:
[resolutio] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/resolutions.
[sat      ] Extension error:
[sat      ] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/sat.
[rings_sta] Extension error:
[rings_sta] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/rings_standard.
[riemannia] Extension error:
[riemannia] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/riemannian_geometry.
[stats    ] Extension error:
[stats    ] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/stats.
[semirings] Extension error:
[semirings] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/semirings.
[rings    ] Extension error:
[rings    ] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/rings.
[rings_num] Extension error:
[rings_num] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/rings_numerical.
[valuation] Extension error:
[valuation] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/valuations.
[schemes  ] Extension error:
[schemes  ] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/schemes.
[sets     ] Extension error:
[sets     ] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/sets.
[structure] Extension error:
[structure] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/structure.
[history_a] Extension error:
[history_a] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/history_and_license.
make[1]: Leaving directory '/var/tmp/portage/sci-mathematics/sage-doc-10.4/work/sage-10.4/src/doc'
make SAGE_DOCBUILD_OPTS=" --no-prune-empty-dirs" doc-html--reference_top
make[1]: Entering directory '/var/tmp/portage/sci-mathematics/sage-doc-10.4/work/sage-10.4/src/doc'
sage --docbuild --no-pdf-links reference_top html --no-prune-empty-dirs
[reference] Extension error:
[reference] Could not import extension sage_docbuild.ext.sage_autodoc (exception: cannot import name 'RemovedInSphinx80Warning' from 'sphinx.deprecation' (/usr/lib/python3.12/site-packages/sphinx/deprecation.py))
Build finished. The built documents can be found in /var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference.
Error building the documentation.
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/lib/python3.12/site-packages/sage_docbuild/__main__.py", line 530, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.12/site-packages/sage_docbuild/__main__.py", line 526, in main
    builder()
  File "/usr/lib/python3.12/site-packages/sage_docbuild/builders.py", line 674, in html
    with open(os.path.join(reference_dir, 'index.html')) as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/var/tmp/portage/sci-mathematics/sage-doc-10.4/work/build_doc/html/en/reference/index.html'

    Note: incremental documentation builds sometimes cause spurious
    error messages. To be certain that these are real errors, run
    "make doc-clean doc-uninstall" first and try again.
make[1]: *** [Makefile:32: doc-html--reference_top] Error 1
make[1]: Leaving directory '/var/tmp/portage/sci-mathematics/sage-doc-10.4/work/sage-10.4/src/doc'
make: *** [Makefile:55: doc-html-reference] Error 2
 * ERROR: sci-mathematics/sage-doc-10.4::sage-on-gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sci-mathematics/sage-doc-10.4::sage-on-gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sci-mathematics/sage-doc-10.4::sage-on-gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sci-mathematics/sage-doc-10.4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sci-mathematics/sage-doc-10.4/temp/environment'.
 * Working directory: '/var/tmp/portage/sci-mathematics/sage-doc-10.4/work/sage-10.4/src/doc'
 * S: '/var/tmp/portage/sci-mathematics/sage-doc-10.4/work/sage-10.4'

>>> Failed to emerge sci-mathematics/sage-doc-10.4, Log file:

>>>  '/var/tmp/portage/sci-mathematics/sage-doc-10.4/temp/build.log'

 * Messages for package sci-mathematics/sage-doc-10.4:

 * ERROR: sci-mathematics/sage-doc-10.4::sage-on-gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sci-mathematics/sage-doc-10.4::sage-on-gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sci-mathematics/sage-doc-10.4::sage-on-gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sci-mathematics/sage-doc-10.4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sci-mathematics/sage-doc-10.4/temp/environment'.
 * Working directory: '/var/tmp/portage/sci-mathematics/sage-doc-10.4/work/sage-10.4/src/doc'
 * S: '/var/tmp/portage/sci-mathematics/sage-doc-10.4/work/sage-10.4'

 * GNU info directory index is up-to-date.

 * IMPORTANT: 1 news items need reading for repository 'sage-on-gentoo'.
 * IMPORTANT: 2 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.

 * After world updates, it is important to remove obsolete packages with
 * emerge --depclean. Refer to `man emerge` for more information.
kiwifb commented 1 month ago

sphinx 8 just got to stable and I have not checked it yet. But I am expecting it is the one giving you troubles. Most major bump in sphinx resulted in that kind of troubles.

kiwifb commented 1 month ago

Not stable actually but 8.0.0_rc1 is in the tree in unstable.

kiwifb commented 1 month ago

Testing a fix for sphinx8. Looks kind of ridiculous.

kiwifb commented 1 month ago

Plot twist. After I remove the offending import and the related code, there is another failure with sphinx-8.0.0_rc1. There are complaints that inspect.isNewType cannot be found in sphinx.util. And yes it appears to be present in 7.4.7 and gone in 8.0.0_rc1. The problem is that I cannot see it on https://www.sphinx-doc.org/en/master/extdev/deprecated.html - so officially it should still be there.

kiwifb commented 1 month ago

Complaining at https://github.com/sphinx-doc/sphinx/pull/12646

kiwifb commented 1 month ago

The old clone of ext/autodoc.py strikes again. This is an internal API so it should not have been used, and adapting to it will strictly tie us up to sphinx 8.0.0. which is OK.

narodnik commented 1 month ago

Ah great, lmk once it's patched. We're awaiting your orders ;)

kiwifb commented 1 month ago

Don't expect quick service on that one. It is more complicated than I want. If you want the doc quick, just mask >=dev-python/sphinx-8.0.0_rc1.

narodnik commented 1 month ago

fyi this worked! Thanks!

kiwifb commented 3 weeks ago

I have stuff brewing slowly, should I backport support for mpmath 1.4 and sphinx 8 into sage 10.4? I will probably draw the line at python 3.13 unless it turns out easy..

kiwifb commented 1 week ago

OK, I am going to merge stuff that's been included upstream shortly. Support for sphinx 8 is included same story than #794 about patching. mpmath is not coming yet, I am discussing support with upstream (mpmath that is not sagemath) a number of fixes are needed but not merged yet in mpmath. And there is one outstanding problem.

strogdon commented 1 week ago

This is the latest sage-doc-9999 for sagemath-10.5.beta3. I have sphinx-8.0.2 installed as well as mpmath-1.3.0-r1. So I get:

sage --docbuild --no-pdf-links reference/references inventory 
[reference] Warning: Sage imports in libelefun failed
[reference] Warning: Sage imports in libmpc failed
[reference] Configuration error:
[reference] There is a programmable error in your configuration file:
[reference] Traceback (most recent call last):
[reference]   File "/usr/lib/python3.12/site-packages/sphinx/config.py", line 529, in eval_config_file
[reference]     exec(code, namespace)  # NoQA: S102
[reference]     ^^^^^^^^^^^^^^^^^^^^^
[reference]   File "/var/tmp/portage/sci-mathematics/sage-doc-9999/work/sage-doc-9999/src/doc/en/reference/references/conf.py", line 19, in <module>
[reference]     for tag in feature_tags():
[reference]   File "/usr/lib/python3.12/site-packages/sage_docbuild/conf.py", line 1094, in feature_tags
[reference]     if feature.is_present():
[reference]        ^^^^^^^^^^^^^^^^^^^^
[reference]   File "/usr/lib/python3.12/site-packages/sage/features/__init__.py", line 211, in is_present
[reference]     res = self._is_present()
[reference]           ^^^^^^^^^^^^^^^^^^
[reference]   File "/usr/lib/python3.12/site-packages/sage/features/__init__.py", line 978, in _is_present
[reference]     importlib.import_module(self.name)
[reference]   File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
[reference]     return _bootstrap._gcd_import(name[level:], package, level)
[reference]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[reference]   File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
[reference]   File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
[reference]   File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
[reference]   File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
[reference]   File "<frozen importlib._bootstrap_external>", line 995, in exec_module
[reference]   File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
[reference]   File "/usr/lib/python3.12/site-packages/fpylll/__init__.py", line 3, in <module>
[reference]     from .fplll.integer_matrix import IntegerMatrix
[reference]   File "src/fpylll/fplll/integer_matrix.pyx", line 1, in init fpylll.fplll.integer_matrix
[reference]   File "src/fpylll/util.pyx", line 1, in init fpylll.util
[reference]   File "src/fpylll/fplll/gso.pyx", line 1, in init fpylll.fplll.gso
[reference]   File "src/fpylll/io.pyx", line 17, in init fpylll.io
[reference]   File "src/fpylll/numpy.pyx", line 1, in init fpylll.numpy
[reference] ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

I'm not sure where these imports are

[reference] Warning: Sage imports in libelefun failed
[reference] Warning: Sage imports in libmpc failed
kiwifb commented 1 week ago

I am going to guess some python libraries need rebuild after the upgrade to numpy 2. I would rebuild gmpy and fpylll and see if that helps.

kiwifb commented 1 week ago

Both libelefun and libmpc are from mpmath. But I cannot find a call to libmpc inside sage.

kiwifb commented 1 week ago

Some of the mpmath stuff may be too much. I may have to back-pedale until mpmath-1.4 gets into shape.

kiwifb commented 1 week ago

OK pushed to master, you'll need to rebuild sagemath-standard-9999 as I removed the patch from PR38113 which causes problems (but should not).

strogdon commented 1 week ago

sage-doc-9999 now builds as of commit https://github.com/cschwan/sage-on-gentoo/commit/3e185c1d924921342dd95961c8cf4e3fad8659bd