GHC in aarch64 edge repo has missing dependency
If I install ghc
in a clean arm64v8/alpine:edge
container and use it to link an executable, the linking step fails with:
<no location info>: error:
Warning: Couldn't figure out linker information!
Make sure you're using GNU ld, GNU gold or the built in OS X linker, etc.
collect2: fatal error: cannot find 'ld'
compilation terminated.
ghc-9.4.5: `gcc' failed in phase `Linker'. (Exit code: 1)
The output of ghc --info
suggests the package assumes ld.gold
:
$ ghc --info
,("C compiler link flags","-fuse-ld=gold -Wl,-z,noexecstack")
,("ld command","ld.gold")
Indeed, installing binutils-gold
fixes the issue.
It seems to me that binutils-gold
should be explicitly declared as a dependency of ghc
, or ghc
should be configured with --disable-ld-override
to avoid the ld.gold
dependency.