Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 792558 - dev-lang/ghc-8.10.4[doc]: 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)
Summary: dev-lang/ghc-8.10.4[doc]: There is a syntax error in your configuration file:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Haskell Language team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-27 22:38 UTC by Andrew Savchenko
Modified: 2021-06-06 11:36 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.gz (build.log.gz,421.04 KB, application/gzip)
2021-05-27 22:38 UTC, Andrew Savchenko
Details
emerge --info (emerge.info,12.87 KB, text/plain)
2021-05-27 22:39 UTC, Andrew Savchenko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Savchenko gentoo-dev 2021-05-27 22:38:30 UTC
Created attachment 711816 [details]
build.log.gz

Hi!

While building dev-lang/ghc-8.10.4 with docs using sphinx-4.0.2 I got:

/usr/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
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 (conf.py, line 103)

make[1]: *** [docs/users_guide/ghc.mk:16: docs/users_guide/build-html/users_guide/index.html] Error 2

Sadly, but without USE=doc there are no manual pages for ghc. Maybe build man pages unconditionally?
Comment 1 Andrew Savchenko gentoo-dev 2021-05-27 22:39:04 UTC
Created attachment 711819 [details]
emerge --info
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2021-06-06 09:40:41 UTC
"""
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)

make[1]: *** [docs/users_guide/ghc.mk:28:
"""

That must be a fresh python error. The bug here is a lack of \u escape:

"""
latex_elements = {
    'inputenc': '',
    'utf8extra': '',
    'preamble': '''
\usepackage{fontspec}
\usepackage{makeidx}
\setsansfont{DejaVu Sans}
\setromanfont{DejaVu Serif}
\setmonofont{DejaVu Sans Mono}
\setlength{\\tymin}{45pt}
''',
}
"""
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2021-06-06 09:41:36 UTC
(In reply to Andrew Savchenko from comment #0)
> Sadly, but without USE=doc there are no manual pages for ghc. Maybe build
> man pages unconditionally?

I'd like to have an option to avoid heavyweight sphinx depend if possible. We can enable USE=doc by default.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2021-06-06 09:46:07 UTC
Quoting was fixed upstream in https://gitlab.haskell.org/ghc/ghc/-/commit/83407ffc7acc00cc025b9f6ed063add9ab9f9bcc
Comment 5 Larry the Git Cow gentoo-dev 2021-06-06 10:01:05 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=014738239a0908d3bdb47240c54bf04411cdaf31

commit 014738239a0908d3bdb47240c54bf04411cdaf31
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2021-06-06 09:57:22 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2021-06-06 10:01:03 +0000

    dev-lang/ghc: backport sphinx quoting fix
    
    Reported-by: Andrew Savchenko
    Closes: https://bugs.gentoo.org/792558
    Package-Manager: Portage-3.0.19, Repoman-3.0.3
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 dev-lang/ghc/files/ghc-8.10.4-sphinx-quote.patch | 27 ++++++++++++++++++++++++
 dev-lang/ghc/ghc-8.10.4.ebuild                   |  1 +
 2 files changed, 28 insertions(+)
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2021-06-06 10:01:41 UTC
Next ghc-8.10.5 will enable docs by default: https://github.com/gentoo-haskell/gentoo-haskell/commit/a4cea7a1310655b4bb05f8a9ec105799d17398d0
Comment 7 Andrew Savchenko gentoo-dev 2021-06-06 11:36:34 UTC
(In reply to Sergei Trofimovich from comment #3)
> (In reply to Andrew Savchenko from comment #0)
> > Sadly, but without USE=doc there are no manual pages for ghc. Maybe build
> > man pages unconditionally?
> 
> I'd like to have an option to avoid heavyweight sphinx depend if possible.
> We can enable USE=doc by default.

Ah, I missed that even man pages generation requires sphinx :(

(In reply to Larry the Git Cow from comment #5)
> The bug has been closed via the following commit(s):
> 
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=014738239a0908d3bdb47240c54bf04411cdaf31
> 
> commit 014738239a0908d3bdb47240c54bf04411cdaf31
> Author:     Sergei Trofimovich <slyfox@gentoo.org>
> AuthorDate: 2021-06-06 09:57:22 +0000
> Commit:     Sergei Trofimovich <slyfox@gentoo.org>
> CommitDate: 2021-06-06 10:01:03 +0000
> 
>     dev-lang/ghc: backport sphinx quoting fix

Thanks!