cschwan / sage-on-gentoo

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

docs fail to build in Prefix #745

Closed strogdon closed 1 year ago

strogdon commented 1 year ago

I usually build sage for each new beta in this Prefix. For 10.1.beta1 , sage-doc-9999 will not build. The failure is

sage --docbuild --no-pdf-links reference/documentation html --no-prune-empty-dirs
[databases] WARNING: failed to reach any of the inventories with the following issues:
[databases] intersphinx inventory 'https://www.labri.fr/perso/vdelecro/pplpy/latest/objects.inv' not fetchable due to <class 'requests.exceptions.ConnectionError'>: HTTPSConnectionPool(host='www.labri.fr', port=443): Max retries exceeded with url: /perso/vdelecro/pplpy/l
atest/objects.inv (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa79c461210>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
[databases] building [html]: targets for 15 source files that are out of date
[doctest  ] building [html]: targets for 10 source files that are out of date
[discrete_] building [html]: targets for 71 source files that are out of date
[data_stru] dumping search index in English (code: en)... done
[data_stru] The HTML pages are in ../../../build_doc/html/en/reference/data_structures.
Build finished. The built documents can be found in /storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-doc-9999/work/build_doc/html/en/reference/data_structures
sage --docbuild --no-pdf-links reference/drinfeld_modules html --no-prune-empty-dirs
[documenta] building [html]: targets for 10 source files that are out of date
[doctest  ] dumping search index in English (code: en)... done
[doctest  ] The HTML pages are in ../../../build_doc/html/en/reference/doctest.
Build finished. The built documents can be found in /storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-doc-9999/work/build_doc/html/en/reference/doctest
[databases] dumping search index in English (code: en)... done
sage --docbuild --no-pdf-links reference/euclidean_spaces html --no-prune-empty-dirs
[databases] The HTML pages are in ../../../build_doc/html/en/reference/databases.
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 "/storage/strogdon/gentoo-rap/usr/lib/python3.11/site-packages/sage_docbuild/__main__.py", line 498, in <module>
    sys.exit(main())
             ^^^^^^
  File "/storage/strogdon/gentoo-rap/usr/lib/python3.11/site-packages/sage_docbuild/__main__.py", line 495, in main
    builder()
  File "/storage/strogdon/gentoo-rap/usr/lib/python3.11/site-packages/sage_docbuild/builders.py", line 818, in _wrapper
    getattr(DocBuilder, build_type)(self, *args, **kwds)
  File "/storage/strogdon/gentoo-rap/usr/lib/python3.11/site-packages/sage_docbuild/builders.py", line 162, in f
    runsphinx()
  File "/storage/strogdon/gentoo-rap/usr/lib/python3.11/site-packages/sage_docbuild/sphinxbuild.py", line 327, in runsphinx
    sys.stderr.raise_errors()
  File "/storage/strogdon/gentoo-rap/usr/lib/python3.11/site-packages/sage_docbuild/sphinxbuild.py", line 263, in raise_errors
    raise OSError(self._error)
OSError: WARNING: failed to reach any of the inventories with the following issues:

    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-databases] Error 1
make[1]: *** Waiting for unfinished jobs....
[documenta] dumping search index in English (code: en)... done
[documenta] The HTML pages are in ../../../build_doc/html/en/reference/documentation.
Build finished. The built documents can be found in /storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-doc-9999/work/build_doc/html/en/reference/documentation
[drinfeld_] building [html]: targets for 7 source files that are out of date
[drinfeld_] dumping search index in English (code: en)... done
[drinfeld_] The HTML pages are in ../../../build_doc/html/en/reference/drinfeld_modules.
Build finished. The built documents can be found in /storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-doc-9999/work/build_doc/html/en/reference/drinfeld_modules
[euclidean] building [html]: targets for 3 source files that are out of date
[euclidean] dumping search index in English (code: en)... done
[euclidean] The HTML pages are in ../../../build_doc/html/en/reference/euclidean_spaces.
Build finished. The built documents can be found in /storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-doc-9999/work/build_doc/html/en/reference/euclidean_spaces
[discrete_] dumping search index in English (code: en)... done
[discrete_] The HTML pages are in ../../../build_doc/html/en/reference/discrete_geometry.
Build finished. The built documents can be found in /storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-doc-9999/work/build_doc/html/en/reference/discrete_geometry
[categorie] dumping search index in English (code: en)... done
[categorie] The HTML pages are in ../../../build_doc/html/en/reference/categories.
Build finished. The built documents can be found in /storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-doc-9999/work/build_doc/html/en/reference/categories
[spkg     ] dumping search index in English (code: en)... done
[spkg     ] The HTML pages are in ../../../build_doc/html/en/reference/spkg.
Build finished. The built documents can be found in /storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-doc-9999/work/build_doc/html/en/reference/spkg
[combinat ] dumping search index in English (code: en)... done
[combinat ] The HTML pages are in ../../../build_doc/html/en/reference/combinat.
Build finished. The built documents can be found in /storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-doc-9999/work/build_doc/html/en/reference/combinat
make[1]: Leaving directory '/storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-doc-9999/work/sage-doc-9999/src/doc'
make: *** [Makefile:51: doc-html-reference] Error 2

It appears as if the build is attempting to make an internet connection? The Prefix is on a fairly old machine and that may be the issue. However, I have tried building the docs several times with the same failure.

kiwifb commented 1 year ago

The internet thing is new I think [I think I saw a PR for it] but should only happen if pplpy doc is not found locally. So, we should look at why it is not picked up in the first place. May be it is not found properly in the prefix?

kiwifb commented 1 year ago

This is https://github.com/sagemath/sage/pull/35536 - it should have worked if it was not for the internet connection issue. It could be a glitch, we have a report of DNS issues at the national level in NZ in the last 12 hours.

Nevertheless, I need to check what PPLPY_DOCS is for you and whether it is wrong.

kiwifb commented 1 year ago

OK can you can check the value of PPLPY_DOCS in usr/lib/python3.11/site-packages/_sage_conf/_conf.py in your prefix? And whether that folder does contain objects.inv?

strogdon commented 1 year ago
PPLPY_DOCS   = "/storage/strogdon/gentoo-rap/usr/share/doc//html"

This is not correct. It should be

PPLPY_DOCS   = "/storage/strogdon/gentoo-rap/usr/share/doc/pplpy-0.8.7/html"

There is an objects.inv in the correct folder.

kiwifb commented 1 year ago

For that to happen, pplpy has to be missing when installing sage-conf and I clearly put pplpy in DEPENDS.

kiwifb commented 1 year ago

Can you check your install of pplpy and then remerge sage-conf to see if this persist?

strogdon commented 1 year ago

I have pplpy installed and the docs are installed:

$ eix -I pplpy
[I] dev-python/pplpy [1]
     Available versions:  (~)0.8.7(0/0.8.7) {doc PYTHON_TARGETS="python3_10 python3_11"}
     Installed versions:  0.8.7(0/0.8.7)(09:30:09 PM 04/07/2023)(doc PYTHON_TARGETS="python3_11 -python3_9 -python3_10")
     Homepage:            https://github.com/sagemath/pplpy
     Description:         A Python wrapper for the Parma Polyhedra Library (PPL)

[1] "sage-on-gentoo" /var/lib/layman/sage-on-gentoo

Perhaps something is not quite correct with the intersphinx stuff in sage-conf?

strogdon commented 1 year ago

The above eix was not for prefix. It should be

$ eix -I pplpy
[I] dev-python/pplpy [1]
     Available versions:  (~)0.8.7(0/0.8.7) {doc PYTHON_TARGETS="python3_10 python3_11"}
     Installed versions:  0.8.7(0/0.8.7)(07:32:11 PM 11/23/2022)(doc PYTHON_TARGETS="python3_10 python3_11 -python3_8 -python3_9")
     Homepage:            https://github.com/sagemath/pplpy
     Description:         A Python wrapper for the Parma Polyhedra Library (PPL)

[1] "sage-on-gentoo" /storage/strogdon/gentoo-rap/var/db/repos/sage-on-gentoo
strogdon commented 1 year ago

From the sage-conf-9999 ebuild:

$ equery -q l -F '$name-$fullversion' pplpy:0
Traceback (most recent call last):
  File "/storage/strogdon/gentoo-rap/usr/lib/python-exec/python3.10/equery", line 31, in <module>
    from gentoolkit import equery, errors
  File "/storage/strogdon/gentoo-rap/usr/lib/python3.10/site-packages/gentoolkit/equery/__init__.py", line 26, in <module>
    import portage
ModuleNotFoundError: No module named 'portage'
kiwifb commented 1 year ago

I thought it could be the issue. A bug in gentoolkit on prefix. I am not sure what to replace gentoolkit with to make it more bullet proof, I was never completely happy to depend on it. I have to think.

strogdon commented 1 year ago

I had an old version of gentoolkit installed. After updating gentoolkit it now works

$ equery -q l -F '$name-$fullversion' pplpy:0
pplpy-0.8.7

I will now reinstall sage-conf.

kiwifb commented 1 year ago

I still think that should go. I may be able to (ab)use a proper ebuild query function for my purpose.

strogdon commented 1 year ago

PPLPY_DOCS is now correct

PPLPY_DOCS   = "/storage/strogdon/gentoo-rap/usr/share/doc/pplpy-0.8.7/html"
kiwifb commented 1 year ago

There is now a gentoolkit less version of sage-conf-9999 in the overlay (in both branch). Let me know if it works for you in prefix.

strogdon commented 1 year ago

The changes work in Prefix.

kiwifb commented 1 year ago

cool. Closing.