looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 0%] 9.0.1-notes Theme error: An error happened in rendering the page 9.0.1-notes. Reason: UndefinedError("'style' is undefined") "inplace/bin/ghc-stage1" -hisuf dyn_hi -osuf dyn_o -hcsuf dyn_hc -fPIC -dynamic -H32m -O -optc-mabi=lp64d -opta-mabi=lp64d -optc-march=rv64imafdc_zba_zbb -opta-march=rv64imafdc_zba_zbb -optc-mcpu=sifive-u74 -opta-mcpu=sifive-u74 -optc-mtune=sifive-7-series -opta-mtune=sifive-7-series -optl-Wl,-O1 -optl-Wl,--as-needed -Wall -hide-all-packages -package-env - -i -iutils/hpc/. -iutils/hpc/dist-install/build -Iutils/hpc/dist-install/build -iutils/hpc/dist-install/build/hpc/autogen -Iutils/hpc/dist-install/build/hpc/autogen -optP-include -optPutils/hpc/dist-install/build/hpc/autogen/cabal_macros.h -package-id array-0.5.4.0 -package-id base-4.15.1.0 -package-id containers-0.6.4.1 -package-id directory-1.3.6.2 -package-id filepath-1.4.2.1 -package-id hpc-0.6.1.0 -XHaskell2010 -no-user-package-db -rtsopts -Wnoncanonical-monad-instances -outputdir utils/hpc/dist-install/build -c utils/hpc/./HpcParser.hs -o utils/hpc/dist-install/build/HpcParser.dyn_o "inplace/bin/ghc-stage1" -hisuf dyn_hi -osuf dyn_o -hcsuf dyn_hc -fPIC -dynamic -H32m -O -optc-mabi=lp64d -opta-mabi=lp64d -optc-march=rv64imafdc_zba_zbb -opta-march=rv64imafdc_zba_zbb -optc-mcpu=sifive-u74 -opta-mcpu=sifive-u74 -optc-mtune=sifive-7-series -opta-mtune=sifive-7-series -optl-Wl,-O1 -optl-Wl,--as-needed -Wall -hide-all-packages -package-env - -i -iutils/hpc/. -iutils/hpc/dist-install/build -Iutils/hpc/dist-install/build -iutils/hpc/dist-install/build/hpc/autogen -Iutils/hpc/dist-install/build/hpc/autogen -optP-include -optPutils/hpc/dist-install/build/hpc/autogen/cabal_macros.h -package-id array-0.5.4.0 -package-id base-4.15.1.0 -package-id containers-0.6.4.1 -package-id directory-1.3.6.2 -package-id filepath-1.4.2.1 -package-id hpc-0.6.1.0 -XHaskell2010 -no-user-package-db -rtsopts -Wnoncanonical-monad-instances -outputdir utils/hpc/dist-install/build -c utils/hpc/./HpcDraft.hs -o utils/hpc/dist-install/build/HpcDraft.dyn_o make[1]: *** [docs/users_guide/ghc.mk:16: docs/users_guide/build-html/users_guide/index.html] Error 2 make[1]: *** Waiting for unfinished jobs.... done build succeeded, 19 warnings. The manual pages are in docs/users_guide/build-man. make: *** [Makefile:128: all] Error 2 * ERROR: dev-lang/ghc-9.0.2-r4::gentoo failed (compile phase): * emake failed
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(-)