Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 806318 - dev-util/cmake-3.18.5 USE=doc cannot import name 'htmlescape' from 'sphinx.util.pycompat'
Summary: dev-util/cmake-3.18.5 USE=doc cannot import name 'htmlescape' from 'sphinx.ut...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard: fixed in 3.20.5
Keywords: PullRequest
Depends on: 806490
Blocks: 789531
  Show dependency tree
 
Reported: 2021-08-03 21:37 UTC by Esteve Varela Colominas
Modified: 2021-08-05 14:36 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
cmake build log (build.log,24.96 KB, text/x-log)
2021-08-03 21:37 UTC, Esteve Varela Colominas
Details
cmake emerge --info (emerge-info,9.65 KB, text/plain)
2021-08-03 21:37 UTC, Esteve Varela Colominas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Esteve Varela Colominas 2021-08-03 21:37:33 UTC
Created attachment 729932 [details]
cmake build log

When enabling USE=doc I get the following error:

cd /home/.root/var/tmp/portage/dev-util/cmake-3.18.5/work/cmake-3.18.5_build/Utilities/Sphinx && /usr/bin/sphinx-build -c /home/.root/var/tmp/portage/dev-util/cmake-3.18.5/work/cmake-3.18.5_build/Utilities/Sphinx -d /home/.root/var/tmp/portage/dev-util/cmake-3.18.5/work/cmake-3.18.5_build/Utilities/Sphinx/doctrees -b html /home/.root/var/tmp/portage/dev-util/cmake-3.18.5/work/cmake-3.18.5/Help /home/.root/var/tmp/portage/dev-util/cmake-3.18.5/work/cmake-3.18.5_build/Utilities/Sphinx/html > build-html.log

Extension error:
No puede importar la extensión cmake (exception: cannot import name 'htmlescape' from 'sphinx.util.pycompat' (/usr/lib/python3.9/site-packages/sphinx/util/pycompat.py))

(I have no idew ahy this error is in spanish despite LC_MESSAGES=C in make.conf, it says "can't import cmake extension")

=====================================

$ emerge -pqv cmake                          
[ebuild   R   ] dev-util/cmake-3.18.5  USE="doc* ncurses -emacs -qt5 -test"
$ emerge -pqv sphinx
[ebuild   R   ] dev-python/sphinx-4.0.3  USE="-doc -latex -test" PYTHON_TARGETS="python3_9 (-pypy3) (-python3_10) -python3_8"
Comment 1 Esteve Varela Colominas 2021-08-03 21:37:51 UTC
Created attachment 729934 [details]
cmake emerge --info
Comment 2 Esteve Varela Colominas 2021-08-05 09:12:18 UTC
Apparently sphinx 4.x breaks this ebuild, it needs sphinx 3.x.
Comment 3 Andreas Sturmlechner gentoo-dev 2021-08-05 09:51:42 UTC

*** This bug has been marked as a duplicate of bug 789375 ***
Comment 4 Esteve Varela Colominas 2021-08-05 10:04:18 UTC
The error is completely different and seems unrelated. The patch referenced in the "duplicate" bug doesn't exist in the repository anymore and was never applied to the version of cmake that's being reported as broken.

Reopening.
Comment 5 Andreas Sturmlechner gentoo-dev 2021-08-05 10:08:29 UTC
Because the patch is upstream.

Please test with cmake-3.20.5.
Comment 6 Esteve Varela Colominas 2021-08-05 10:11:05 UTC
This is cmake-3.18.5, which is currently in the repository and marked stable, and I can confirm it doesn't work as-is with USE=doc...
3.20.5 works fine with sphinx-4, yes.
Comment 7 Larry the Git Cow gentoo-dev 2021-08-05 14:36:58 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7edefc2a2392e483ec628386fea4dcbe235f35a2

commit 7edefc2a2392e483ec628386fea4dcbe235f35a2
Author:     Esteve Varela Colominas <esteve.varela@gmail.com>
AuthorDate: 2021-08-05 09:46:51 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-08-05 14:36:45 +0000

    dev-util/cmake: Require sphinx <4 for cmake 3.18 or lower
    
    This was tested, sphinx 3.x still works for the newer cmake versions.
    
    Closes: https://bugs.gentoo.org/806318
    Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/21890
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/cmake/cmake-3.18.5.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)