Summary: | dev-lang/ghc-9.0.2-r4[doc]: fails to compile with dev-python/sphinx-6.0.0? (UndefinedError("'style' is undefined")) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Andrew Cameron <apcameron> |
Component: | Current packages | Assignee: | Gentoo's Haskell Language team <haskell> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | audvare, chris, doug.hunley, francoisvalenduc, gentoo, gentoo, hololeap, leonchik1976, nbowler, sam, silvio.gerli, solpeth |
Priority: | Normal | Keywords: | PATCH, PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/gentoo/gentoo/pull/33254 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
pqv log
Info log Environment ebuild build log patch for building with sphinx-7 |
Description
Andrew Cameron
2023-05-19 14:52:43 UTC
Created attachment 862006 [details]
pqv log
Created attachment 862007 [details]
Info log
Created attachment 862008 [details]
Environment
Created attachment 862010 [details]
ebuild build log
Same here, but only with USE=doc, so you can set USE=-doc for a temporary workaround. Thanks It compiled with -doc but that still needs to be fixed (In reply to Andrew Cameron from comment #6) > Thanks It compiled with -doc but that still needs to be fixed Yes, obviously. Maybe this is a solution: https://github.com/readthedocs/sphinx_rtd_theme/issues/1465 Here someone describes how he fixed it for an other project. Actual fix was https://paste.xinu.at/JfsPm/ For ghc this would be: cd ghc-9.0.2 find . -name layout.html |while read i ; do sed -i 's/style\, 1/styles[-1], 1/g' $i ; done Corresponding diff: --- a/docs/users_guide/rtd-theme/layout.html 2021-07-06 11:42:06.000000000 +0200 +++ b/docs/users_guide/rtd-theme/layout.html 2023-08-03 19:27:51.863465637 +0200 @@ -64,7 +64,7 @@ {%- endif %} {# CSS #} - <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" /> + <link rel="stylesheet" href="{{ pathto('_static/' + styles[-1], 1) }}" type="text/css" /> <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" /> {%- for css in css_files %} {%- if css|attr("rel") %} Created attachment 867142 [details, diff] patch for building with sphinx-7 I just followed https://wiki.gentoo.org/wiki/Creating_a_patch to create a patch. To verify that this is a fix for you: ebuild /var/db/repos/gentoo/dev-lang/ghc/ghc-9.0.2-r4.ebuild clean unpack cd /var/tmp/portage/dev-lang/ghc-9.0.2-r4/work/ghc-9.0.2 patch -p1 </tmp/ghc-9.0.2-sphinx-7.patch cd ebuild /var/db/repos/gentoo/dev-lang/ghc/ghc-9.0.2-r4.ebuild prepare configure compile If it is a fix, the the last line should be >>> Source compiled. This patch indeed fix the problem, but it is much easier if you use user patches (https://wiki.gentoo.org/wiki//etc/portage/patches) to apply it. You can then use emerge to install the package as usual. Thanks for the tip with user patches. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d53d537ffcafbf92c3d364db95427303ecf6aed1 commit d53d537ffcafbf92c3d364db95427303ecf6aed1 Author: hololeap <hololeap@protonmail.com> AuthorDate: 2023-10-08 19:56:47 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-10-14 00:47:05 +0000 dev-lang/ghc: Use system sphinx-rtd-theme This allows sphinx-7 to build the GHC user's guide The upstream rtd-theme that is bundled with GHC has been updated but none of our GHC versions contain this fix. See: https://gitlab.haskell.org/ghc/ghc/-/commit/70526f5bd8886126f49833ef20604a2c6477780a Closes: https://bugs.gentoo.org/906784 Signed-off-by: hololeap <hololeap@protonmail.com> Signed-off-by: Sam James <sam@gentoo.org> dev-lang/ghc/ghc-9.0.2-r4.ebuild | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6cdfe59ec13e0d30a22750ebbdd97e7693ab2b5 commit f6cdfe59ec13e0d30a22750ebbdd97e7693ab2b5 Author: hololeap <hololeap@protonmail.com> AuthorDate: 2023-10-03 05:03:54 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-10-14 00:46:55 +0000 dev-lang/ghc: Turn USE=doc off by default This flag has been turned on by default historically, but has been causing problems due to compatibility issues with newer sphinx. Other packages in dev-lang do not have USE=doc turned on by default. Bug: https://bugs.gentoo.org/906784 Signed-off-by: hololeap <hololeap@protonmail.com> Signed-off-by: Sam James <sam@gentoo.org> dev-lang/ghc/ghc-8.10.6-r3.ebuild | 2 +- dev-lang/ghc/ghc-9.0.2-r3.ebuild | 2 +- dev-lang/ghc/ghc-9.0.2-r4.ebuild | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) |