Bug 257411

Summary: lang/ghc: Doesn't build with newer Sphinx
Product: Ports & Packages Reporter: Danilo G. Baio <dbaio>
Component: Individual Port(s)Assignee: freebsd-haskell (Nobody) <haskell>
Status: Closed FIXED    
Severity: Affects Many People CC: arrowd
Priority: --- Flags: arrowd: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 257116    

Description Danilo G. Baio freebsd_committer 2021-07-25 12:35:58 UTC
"inplace/bin/mkdirhier" libraries/stm/dist-install/doc/html/stm//.
"inplace/bin/mkdirhier" libraries/exceptions/dist-install/doc/html/exceptions//.
  HC [stage 1] libraries/haskeline/dist-install/build/cbits/h_wcwidth.p_o
"inplace/bin/mkdirhier" libraries/haskeline/dist-install/doc/html/haskeline//.
"inplace/bin/mkdirhier" libraries/ghci/dist-install/doc/html/ghci//.
"inplace/bin/mkdirhier" libraries/libiserv/dist-install/doc/html/libiserv//.
gmake -C utils/haddock/doc html SPHINX_BUILD=/usr/local/bin/sphinx-build
/usr/local/bin/sphinx-build -b html . .build-html
  HC [stage 1] compiler/stage2/build/parser/cutils.p_o
  HC [stage 1] compiler/stage2/build/ghci/keepCAFsForGHCi.p_o
Running Sphinx v4.0.3
loading translations [en]... done
  HC [stage 1] compiler/stage2/build/cbits/genSym.p_o
"inplace/bin/mkdirhier" compiler/stage2/doc/html/ghc//.
"inplace/bin/mkdirhier" utils/hsc2hs/dist-install/build/cbits//.
"inplace/bin/mkdirhier" utils/hsc2hs/dist-install/build/tmp//.
"inplace/bin/mkdirhier" utils/ghc-pkg/dist-install/build/tmp//.
"inplace/bin/mkdirhier" utils/check-api-annotations/dist-install/build/tmp//.
"inplace/bin/mkdirhier" utils/check-ppr/dist-install/build/tmp//.
"inplace/bin/mkdirhier" utils/ghc-cabal/dist-install/build/tmp//.
"inplace/bin/mkdirhier" utils/hpc/dist-install/build/tmp//.
"inplace/bin/mkdirhier" utils/runghc/dist-install/build/tmp//.
/usr/local/bin/sphinx-build -b html -d docs/users_guide/.doctrees-html -w docs/users_guide/.log -n -D latex_paper_size=letter docs/users_guide docs/users_guide/build-html/users_guide
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 4 source files that are out of date
updating environment: [new config] 4 added, 0 changed, 0 removed
reading sources... [ 25%] index
reading sources... [ 50%] intro
reading sources... [ 75%] invoking
reading sources... [100%] markup
Running Sphinx v4.0.3

Configuration error:
There is a syntax error in your configuration file: (unicode error) 'unicodeescape' codec can't decode bytes in position 1-2: truncated \uXXXX escape (conf.py, line 103)

gmake[2]: *** [docs/users_guide/ghc.mk:16: docs/users_guide/build-html/users_guide/index.html] Error 2
gmake[2]: *** Waiting for unfinished jobs....

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [ 25%] index
writing output... [ 50%] intro
writing output... [ 75%] invoking
writing output... [100%] markup

generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in .build-html.
cp -R utils/haddock/doc/.build-html utils/haddock/doc/haddock
gmake[1]: *** [Makefile:128: all] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/lang/ghc/work/ghc-8.10.5'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Comment 1 Gleb Popov freebsd_committer 2021-07-26 08:43:48 UTC
How can I reproduce this? Do you have the new Sphinx port somewhere?

If this is the only blocker, just push your update and I will fix the fallout in my ports.
Comment 2 Danilo G. Baio freebsd_committer 2021-07-26 10:55:15 UTC
(In reply to Gleb Popov from comment #1)


There are other ports blocking and we need another exp-run. Patch is on bug 257116, I'll update it soon with another Sphinx version, but seems it has the same issue.

Thanks for your prompt reply.
Comment 3 commit-hook freebsd_committer 2021-07-27 18:51:47 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3036f585e6b6af48cb255acf2cdc156c243afe95

commit 3036f585e6b6af48cb255acf2cdc156c243afe95
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2021-07-27 18:49:07 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2021-07-27 18:50:20 +0000

    lang/ghc: Fix build with new Sphinx.

    PR:             257411

 lang/ghc/files/patch-sphinx-fix.diff (new) | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
Comment 4 Danilo G. Baio freebsd_committer 2021-08-06 22:56:17 UTC
(In reply to commit-hook from comment #3)

Thank you =)