Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 890563 - dev-lang/ghc-9.0.2-r3 failed to build with dev-python/sphinx 6.0, 6.1 (TypeError: not all arguments converted during string formatting)
Summary: dev-lang/ghc-9.0.2-r3 failed to build with dev-python/sphinx 6.0, 6.1 (TypeEr...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 Linux
: Normal normal (vote)
Assignee: Gentoo's Haskell Language team
URL: https://gitlab.haskell.org/ghc/ghc/-/...
Whiteboard:
Keywords: PATCH
: 890648 892830 (view as bug list)
Depends on:
Blocks: 890634 893524
  Show dependency tree
 
Reported: 2023-01-12 02:13 UTC by anzela.minosi
Modified: 2023-02-07 18:13 UTC (History)
12 users (show)

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


Attachments
Make file (make.conf,1.95 KB, text/plain)
2023-01-12 02:13 UTC, anzela.minosi
Details
build.log (build.log.gz,316.13 KB, application/gzip)
2023-01-16 06:13 UTC, hanetzer
Details
emerge --info (file_890563.txt,9.24 KB, text/plain)
2023-01-16 06:14 UTC, hanetzer
Details
Possible patch to fix issue. (ghc-9.0.2-fix-gentoo-bug-890563.patch,642 bytes, patch)
2023-02-04 22:45 UTC, Paul Preney
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description anzela.minosi 2023-01-12 02:13:00 UTC
Created attachment 848297 [details]
Make file

In order to compile ghc-9.0.2 I used my raspberry pi 4 containing 4 GB of ram. I used the following command under gentoo:

# emerge -tav dev-lang/ghc

All in all it took my raspberry pi 4 roughly 24 hours to compile ghc successfully. However, during the last part, after about 22 hours, the emerge of ghc failed due to the following reason having to do with a python configuration in the ghc package:

Exception occurred:
    File "/usr/lib/python310/site-packages/sphinx/ext/extlinks.py", line 101, in role
      title = caption % part
              ~~~~~~~~^~~~~~
  TypeError: not all arguments converted during string formatting

I fixed this bug, by applying the necessary changes mentioned on the haskell gitlab page having the following commit id: 00dc51060881df81258ba3b3bdf447294618a4de

I edited the file docs/users_guide/ghc_config.py.in:
"extlinks = {
-    'ghc-ticket': ('...%s', '#'),
-    'ghc-wiki': ('...%s', '#'),
+    'ghc-ticket': ('...%s', '%s'),
+    'ghc-wiki': ('...', '#%s'),
}

libs_base_uri = '../libraries'"

Unfortunately, I've already deleted the build.log. So, I can't upload this file. But my setting was as follows:
gcc: 12.2.1_p20221126
selected python: python3.10
sphinx: 6.0.0
Comment 1 Mike Gilbert gentoo-dev 2023-01-12 20:51:28 UTC
Do not CC arches on bug reports.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-13 11:34:43 UTC
*** Bug 890648 has been marked as a duplicate of this bug. ***
Comment 3 hanetzer 2023-01-16 06:13:22 UTC
Created attachment 848639 [details]
build.log

Just ran into this today, attached is build.log
Comment 4 hanetzer 2023-01-16 06:14:08 UTC
Created attachment 848641 [details]
emerge --info
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-02 20:55:47 UTC
*** Bug 892830 has been marked as a duplicate of this bug. ***
Comment 6 Paul Preney 2023-02-04 22:45:37 UTC
Created attachment 849874 [details, diff]
Possible patch to fix issue.

This patch has not been looked at for correctness in terms of its content, rather, it was created to enable GHC to be built and install as a package.
Comment 7 Paul Preney 2023-02-04 22:47:13 UTC
Using ~amd64, I also was unable to build ghc-9.0.2-r3 for the same reason as the original post. 

The original post mentioned a fix but did not provide a patch file. I created one albeit it is not the same as mentioned in the original post but does allow GHC to build and install. I have uploaded a patch ( see Possible patch to fix issue ).

NOTE: I have not explored how correct or not this patch is... my aim was to have  the ghc-9.0.2-r3 build and install.
Comment 8 Larry the Git Cow gentoo-dev 2023-02-04 23:11:11 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a6e2ac2de6dfe8c28396239cc5d41a1f441a64a

commit 9a6e2ac2de6dfe8c28396239cc5d41a1f441a64a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-02-04 23:10:36 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-02-04 23:10:36 +0000

    dev-lang/ghc: fix build w/ sphinx 6
    
    Closes: https://bugs.gentoo.org/890563
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-lang/ghc/files/ghc-9.0.2-sphinx-6.patch | 41 +++++++++++++++++++++++++++++
 dev-lang/ghc/ghc-9.0.2-r3.ebuild            |  1 +
 2 files changed, 42 insertions(+)
Comment 9 Larry the Git Cow gentoo-dev 2023-02-05 15:19:03 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=978a89b79928342990c7da40c43a1cc9b84d3e7e

commit 978a89b79928342990c7da40c43a1cc9b84d3e7e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-02-05 15:18:33 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-02-05 15:18:58 +0000

    dev-lang/ghc: unconditionally apply sphinx patch
    
    Closes: https://bugs.gentoo.org/890563
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-lang/ghc/ghc-9.0.2-r3.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)