#66680 closed defect (fixed)
ghc: fails to build because of error in sphinx/ext/extlinks
Reported by: | jowens (John Owens) | Owned by: | essandess (Steve Smith) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | ghc |
Description
:info:build Command line: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_ghc/ghc/work/bin/sphinx-build -b html -d _build/doc/html/users_guide/.doctrees-html -n -w _build/doc/html/users_guide/.log docs/users_guide _build/doc/html/users_guide :info:build ===> Command failed with error code: 2 :info:build Exception occurred: :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/sphinx/ext/extlinks.py", line 103, in role :info:build title = caption % part :info:build TypeError: not all arguments converted during string formatting
Pretty sure it's this error in sphinx (https://github.com/sphinx-doc/sphinx/issues/11094) but it appears in the ghc build, so I'm filing it as ghc. Sphinx v6.1.2, according to the build log for ghc.
Ventura 13.1, selfupdate ran today (just migrated to Ventura)
Attachments (3)
Change History (20)
comment:1 Changed 22 months ago by jowens (John Owens)
Summary: | ghc: fails to build because of error in sphinx/ext/exlinks → ghc: fails to build because of error in sphinx/ext/extlinks |
---|
comment:2 Changed 22 months ago by kencu (Ken)
comment:3 Changed 22 months ago by essandess (Steve Smith)
I do not see this across multiple builds on different boxes, including an arm64
install on 13.1 today. The buildbots seem to be doing fine as well: https://ports.macports.org/port/ghc/details/. But py-sphinx
was upgraded 4 days ago: https://github.com/macports/macports-ports/blob/master/python/py-sphinx/Portfile. Is this new version the cause?
comment:4 Changed 22 months ago by jmroot (Joshua Root)
The upstream issue says the problem is incorrectly formatted extlinks in conf.py
.
Changed 22 months ago by jmroot (Joshua Root)
Attachment: | fix_extlinks.patch added |
---|
comment:5 Changed 22 months ago by jmroot (Joshua Root)
That should be the correct usage according to the docs (untested).
comment:6 Changed 22 months ago by kickingvegas (Charles Choi)
Seeing same issue on Ventura 13.1, MacPorts 2.8.0.
comment:8 Changed 22 months ago by kencu (Ken)
yes, that patch from Josh does fix ghc:
% port -v installed ghc The following ports are currently installed: ghc @9.4.4_0 (active) requested_variants='' platform='darwin 22' archs='arm64' date='2023-01-14T11:32:47-0800'
but soon after, a similar issue arises with cabal-install, which will likely have a similar fix:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_cabal/cabal/work/dist/build/aarch64-osx/ghc-9.4.4/cabal-install-3.8.1.0/doc/html/cabal-install/index.html Configuring executable 'cabal' for cabal-install-3.8.1.0.. Preprocessing executable 'cabal' for cabal-install-3.8.1.0.. Building executable 'cabal' for cabal-install-3.8.1.0.. [1 of 1] Compiling Main ( main/Main.hs, /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_cabal/cabal/work/dist/build/aarch64-osx/ghc-9.4.4/cabal-install-3.8.1.0/x/cabal/build/cabal/cabal-tmp/Main.o ) [2 of 2] Linking /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_cabal/cabal/work/dist/build/aarch64-osx/ghc-9.4.4/cabal-install-3.8.1.0/x/cabal/build/cabal/cabal Running Sphinx v6.1.3 making output directory... done building [mo]: targets for 0 po files that are out of date writing output... building [html]: targets for 18 source files that are out of date updating environment: [new config] 18 added, 0 changed, 0 removed reading sources... [ 5%] bugs-and-stability reading sources... [ 11%] buildinfo-fields-reference reading sources... [ 16%] cabal-commands reading sources... [ 22%] cabal-config-and-commands reading sources... [ 27%] cabal-package Exception occurred: File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/sphinx/ext/extlinks.py", line 103, in role title = caption % part TypeError: not all arguments converted during string formatting The full traceback has been saved in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_cabal/cabal/work/.tmp/sphinx-err-r6b8uobb.log, if you want to report the issue to the developers. Please also report this if it was a user error, so that a better error message can be provided next time. A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks! Command failed: sphinx-build-3.10 -n --keep-going -E doc /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_cabal/cabal/work/dist/doc/users-guide
comment:9 Changed 22 months ago by kencu (Ken)
I rolled back to the previous sphinx until these issues get sorted out:
py310-sphinx @5.3.0_0 (active)
and everything ghc installed without any trouble doing that.
comment:10 Changed 22 months ago by essandess (Steve Smith)
Please see https://github.com/macports/macports-ports/pull/17336, which simply applies jmroot's patch. I also created the this upstream issue: https://gitlab.haskell.org/ghc/ghc/-/issues/22766.
comment:11 Changed 22 months ago by Steve Smith <essandess@…>
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:13 Changed 22 months ago by wcvinyard (Bill)
Replying to kencu:
cabal next?
Please:
:debug:build system -W /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_cabal/cabal/work/cabal-install-3.8.1.0: sphinx-build-3.10 -n --keep-going -E doc /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_cabal/cabal/work/dist/doc/users-guide :info:build Running Sphinx v6.1.3 :info:build making output directory... done :info:build building [mo]: targets for 0 po files that are out of date :info:build writing output... :info:build building [html]: targets for 18 source files that are out of date :info:build updating environment: [new config] 18 added, 0 changed, 0 removed :info:build reading sources... [ 5%] bugs-and-stability :info:build reading sources... [ 11%] buildinfo-fields-reference :info:build reading sources... [ 16%] cabal-commands :info:build reading sources... [ 22%] cabal-config-and-commands :info:build reading sources... [ 27%] cabal-package :info:build Exception occurred: :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/sphinx/ext/extlinks.py", line 103, in role :info:build title = caption % part :info:build TypeError: not all arguments converted during string formatting :info:build The full traceback has been saved in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_cabal/cabal/work/.tmp/sphinx-err-d5bw2bl5.log, if you want to report the issue to the developers. :info:build Please also report this if it was a user error, so that a better error message can be provided next time. :info:build A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks! :info:build Command failed: sphinx-build-3.10 -n --keep-going -E doc /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_cabal/cabal/work/dist/doc/users-guide :info:build Exit code: 2 :error:build Failed to build cabal: command execution failed :debug:build Error code: NONE :debug:build Backtrace: command execution failed :debug:build while executing :debug:build "$post $targetname" :error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_cabal/cabal/main.log for details.
comment:14 Changed 22 months ago by essandess (Steve Smith)
This cut-and-paste patch from jmroot's patch above fixes the issue. I'll post a PR.
Changed 22 months ago by essandess (Steve Smith)
Attachment: | patch-doc_conf_py.diff added |
---|
I saw the same, couldn't build ghc (and so couldn't confirm that pandoc would build arm64 either) due a sphinx error.