Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at

Bug 1977317

Summary: ghc fails to build with Sphinx 4.0.2
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: ghcAssignee: Jens Petersen <petersen>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: petersen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-30 18:34:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1973718    

Description Karolina Surma 2021-06-29 13:04:09 UTC
ghc fails to build with Sphinx 4.0.2 in Fedora 35 (currently Rawhide).

/usr/bin/sphinx-build -b html -d docs/users_guide/.doctrees-html -D latex_paper_size=letter docs/users_guide docs/users_guide/build-html/users_guide
reading sources... [100%] markup
/builddir/build/BUILD/ghc-8.8.4/utils/haddock/doc/markup.rst:11: WARNING: malformed hyperlink target.
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [ 25%] index
Running Sphinx v4.0.2
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 (, line 87)
make[1]: *** [docs/users_guide/ docs/users_guide/build-html/users_guide/index.html] Error 2
make[1]: *** Waiting for unfinished jobs....
writing output... [ 50%] intro
writing output... [ 75%] invoking
writing output... [100%] markup
generating indices... /builddir/build/BUILD/ghc-8.8.4/utils/haddock/doc/invoking.rst:549: WARNING: unknown option: -cpp
/builddir/build/BUILD/ghc-8.8.4/utils/haddock/doc/markup.rst:178: WARNING: undefined label: top-level-declaration
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, 3 warnings.
The HTML pages are in .build-html.
cp -R utils/haddock/doc/.build-html utils/haddock/doc/haddock
make: *** [Makefile:128: all] Error 2

For the logs from testing build attempts, see:

You can test you package using Koji scratch build
koji build --scratch <srpm>

For details regarding the Sphinx change, see
Let us know here if you have any questions. Thank you!

Comment 1 Jens Petersen 2021-06-30 16:33:02 UTC
Thanks, for the report.

I think this is fixed already upstream in ghc-9:
hopefully a single rawstring might be enough to fix this.

Comment 2 Jens Petersen 2021-06-30 18:34:20 UTC
This should be fixed by

Since it is just a 1 char fix (a python rawstring annotation) I didn't push a build to koji.

Scratch build on x86_64: