Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 924706 - >=sys-devel/llvm-18: No module named 'myst_parser' when USE="-doc"
Summary: >=sys-devel/llvm-18: No module named 'myst_parser' when USE="-doc"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: LLVM support project
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-02-16 10:33 UTC by r7l
Modified: 2024-02-18 13:23 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description r7l 2024-02-16 10:33:12 UTC
There was a bug report about this here: https://bugs.gentoo.org/915108 
This was fixed already but looking at the Ebuild the missing dependency will only be installed when having USE="doc". 

For some reason it is still required when not having "doc" USE flag set.

I've tried LLVM 18 and 19. It's the same error for both of them:

[238/2627] cd /var/tmp/portage/sys-devel/llvm-19.0.0.9999/work/llvm_build-abi_x86_64.amd64/docs && /usr/bin/cmake -E env /usr/bin/sphinx-build -b man -d /var/tmp/portage/sys-devel/llvm-19.0.0.9999/work/llvm_build-abi_x86_64.amd64/docs/_doctrees-dsymutil-man -q -t builder-man -D version=19 -D release=19.0.0git3b6e2504 /var/tmp/portage/sys-devel/llvm-19.0.0.9999/work/llvm/docs /var/tmp/portage/sys-devel/llvm-19.0.0.9999/work/llvm_build-abi_x86_64.amd64/docs/man
FAILED: docs/CMakeFiles/docs-dsymutil-man /var/tmp/portage/sys-devel/llvm-19.0.0.9999/work/llvm_build-abi_x86_64.amd64/docs/CMakeFiles/docs-dsymutil-man 
cd /var/tmp/portage/sys-devel/llvm-19.0.0.9999/work/llvm_build-abi_x86_64.amd64/docs && /usr/bin/cmake -E env /usr/bin/sphinx-build -b man -d /var/tmp/portage/sys-devel/llvm-19.0.0.9999/work/llvm_build-abi_x86_64.amd64/docs/_doctrees-dsymutil-man -q -t builder-man -D version=19 -D release=19.0.0git3b6e2504 /var/tmp/portage/sys-devel/llvm-19.0.0.9999/work/llvm/docs /var/tmp/portage/sys-devel/llvm-19.0.0.9999/work/llvm_build-abi_x86_64.amd64/docs/man

Extension error:
Could not import extension myst_parser (exception: No module named 'myst_parser')
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-17 03:07:07 UTC
It's because we normally have man pages generated so I guess it's an oversight for live ebuilds.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-02-17 07:21:36 UTC
I guess both LLVM and Clang require it now, so I should probably update the eclass.  The problem is, we have to deal with python_check_deps() too, so perhaps the whole doc build should be handled by the eclass.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-02-17 07:47:17 UTC
Hmm, actually, I don't think it should be building manpages at all with USE=-doc.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-02-17 07:50:48 UTC
Actually, I don't get that code.  I think it got very confusing at the time of introducing llvm.org.eclass.  I need to see and figure out what it's supposed to do, and possibly rewrite it all.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-02-17 09:15:23 UTC
Ok, I've figured it out.  So roughly:

1. Upstream has a single Sphinx conf.py for HTML docs and manpages, a single set of CMake options but separate build targets.

2. At some point, upstream started depending on recommonmark for .md docs.  However, they were only used to build HTML docs.

3. I've sent (and merged) a patch upstream that made it possible to build manpages without recommonmark.

4. We've eventually settled on using USE=doc to build HTML docs, and installing manpages unconditionally.  That's where the ebuilds are now.

5. Upstream replaced recommonmark with myst-parser, and bulldozed the support for making it optional while at it.
Comment 6 r7l 2024-02-17 12:38:14 UTC
Didn't think it would be such a complicated matter. Thanks allot for picking it up.
Comment 7 Larry the Git Cow gentoo-dev 2024-02-18 13:23:41 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=872ebd37dfd70471fdf200f97d8383e26198d33d

commit 872ebd37dfd70471fdf200f97d8383e26198d33d
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-02-17 19:34:26 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-02-18 13:23:29 +0000

    sys-devel/llvm: Fix myst-parser dep for manpage builds in 18+
    
    Closes: https://bugs.gentoo.org/924706
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-devel/llvm/llvm-18.1.0_rc2.ebuild         | 15 ++++++++++-----
 sys-devel/llvm/llvm-19.0.0.9999.ebuild        | 15 ++++++++++-----
 sys-devel/llvm/llvm-19.0.0_pre20240210.ebuild | 15 ++++++++++-----
 3 files changed, 30 insertions(+), 15 deletions(-)

Additionally, it has been referenced in the following commit(s):

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

commit c7529dec37244b0ec42848d1fe4effe70b9f4cf9
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-02-17 19:36:22 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-02-18 13:23:30 +0000

    sys-devel/clang: Fix missing myst-parser dep for manpage builds
    
    Bug: https://bugs.gentoo.org/924706
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-devel/clang/clang-18.1.0_rc2.ebuild         | 13 +++++++++----
 sys-devel/clang/clang-19.0.0.9999.ebuild        | 13 +++++++++----
 sys-devel/clang/clang-19.0.0_pre20240210.ebuild | 13 +++++++++----
 3 files changed, 27 insertions(+), 12 deletions(-)