Skip to content

Install binutils-gold for ghc < 9.6 on Linux - #154

Open
ysangkok wants to merge 1 commit into
haskell-actions:mainfrom
ysangkok:install-binutils-gold
Open

ysangkok wants to merge 1 commit into
haskell-actions:mainfrom
ysangkok:install-binutils-gold

Conversation

@ysangkok

Copy link
Copy Markdown
Contributor

GHC < 9.6 bindists ship an hsc2hs wrapper with a hardcoded
"--lflag=-fuse-ld=gold". Since binutils 2.44 deprecated gold, Ubuntu
25.10 and later no longer include ld.gold in binutils, so hsc2hs fails
to link there. Install the separate binutils-gold package via apt-get
when ld.gold is missing.

This runs before the isInstalled check, so preinstalled or cached GHCs
are covered too. Failure to install only emits a warning.

See https://gitlab.haskell.org/ghc/ghc/-/work_items/26520

Tested on my atomic-write repo.

GHC < 9.6 bindists ship an hsc2hs wrapper with a hardcoded
"--lflag=-fuse-ld=gold". Since binutils 2.44 deprecated gold, Ubuntu
25.10 and later no longer include ld.gold in binutils, so hsc2hs fails
to link there. Install the separate binutils-gold package via apt-get
when ld.gold is missing.

This runs before the isInstalled check, so preinstalled or cached GHCs
are covered too. Failure to install only emits a warning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants