-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GHC does not compile on pkgsMusl after the ld.gold change #84670
Comments
I have also seen this failure. I also believe to have posted about it on some issue, but not sure which one it was (and maybe my message did not get submitted successfully). |
Does musl support gold linker? |
Looks relevant: #49071 (ld.gold crashes or produces invalid executables when Musl is used as a libc) |
If #49071 is still current it we should use -fpie (for compiling C) and -pie for linking? Or should we disable ld.gold whith musl libc? Disabling ld.gold for musl seems like the simplest and least invasive option. Thoughts? |
ld.gold doesn't play well with musl as is documented in NixOS#49071 and https://sourceware.org/bugzilla/show_bug.cgi?id=23856
A stacktrace/coredump might be helpful. You can get one with coredumpctl usually. |
ghc: do not use ld.gold with musl libc #84670
ld.gold doesn't play well with musl as is documented in #49071 and https://sourceware.org/bugzilla/show_bug.cgi?id=23856
Did you see that on my bug report on https://sourceware.org/bugzilla/show_bug.cgi?id=23856 somebody commented:
Perhaps we could try that as well (I think that's what was suggested above)? @bgamari do you have an opinion on that? |
@nh2, that was indeed the other suggestion I meant above. For the PIE solution, wouldn't that mean all Haskell programs built by this GHC would have to be PIE too or we'd have to use a different linker when using GHC? |
I do not know the answer currently, but maybe somebody else does? |
Indeed it sounds like the proposed workaround would be to link all executables with |
Is it possible to instruct GHC to link with -fPIE by default? |
Yes, IIRC you can set |
ld.gold doesn't play well with musl as is documented in NixOS#49071 and https://sourceware.org/bugzilla/show_bug.cgi?id=23856 (cherry picked from commit 4675649)
ld.gold doesn't play well with musl as is documented in NixOS#49071 and https://sourceware.org/bugzilla/show_bug.cgi?id=23856 (cherry picked from commit 4675649)
## Motivation Dependencies should be up to date. ## Changelog for stable: Commits: [NixOS/nixpkgs@1975b868...0a40a399](NixOS/nixpkgs@1975b86...0a40a39) * [`a7ce7241`](NixOS/nixpkgs@a7ce724) sqlite: 3.32.2 -> 3.32.3 * [`58f5c238`](NixOS/nixpkgs@58f5c23) openconnect: patch CVE-2020-12105 & CVE-2020-12823 * [`5c56247b`](NixOS/nixpkgs@5c56247) nixos-generators: 1.0.0 -> 1.1.0 * [`a7447ffc`](NixOS/nixpkgs@a7447ff) fontforge: 20190413 -> 20190801 * [`99b72d22`](NixOS/nixpkgs@99b72d2) fontforge: 20190801 -> 20200314 * [`ee1640dd`](NixOS/nixpkgs@ee1640d) ansible: v2.9.10 -> v2.9.11 * [`29f57d2f`](NixOS/nixpkgs@29f57d2) ansible_2_8: v2.8.12 -> v2.8.13 * [`e8e92a84`](NixOS/nixpkgs@e8e92a8) ghc: don't use ld.gold with musl libc (fixes NixOS/nixpkgs#84670) * [`aea667b1`](NixOS/nixpkgs@aea667b) ghc: mention why ld.gold is disabled for musl libc
Describe the bug
GHC does not compile on
pkgsMusl
anymore, after #80466 is merged, failing with this error:To Reproduce
I only confirmed
ghc865
to be caused by the commit I mentioned. GHC 8.8 and GHC 8.10 also doesn't compile withpkgsMusl
currently, but I don't know if this exact commit is the cause since compiling them takes a long time.Edit: I reproduced the issue also with
ghc882
andghc8101
.cc @peti @adamse @nh2
The text was updated successfully, but these errors were encountered: