-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
pkgsMusl.haskell.compiler.ghc883 is broken (bootstrap with ghc865-binary fails) #85924
Comments
@monacoremo Thanks for creating this issue. Unfortunately, we don't always check to make sure the musl builds succeed before merging stuff in. If you wanted to fix this issue, we'd happily accept a PR. Also, @nh2 is doing a lot with the musl builds, especially in https://github.com/nh2/static-haskell-nix. If you absolutely need a musl'd GHC, I'd suggest to use https://github.com/nh2/static-haskell-nix. |
To add to that: I pin a nixpkgs that works well in a submodule: and the same in the On the issue: We've seen build failures on latest nixpkgs |
Just for the record, current versions of |
Many thanks all for your help and quick responses! As @peti suggested I reverted 3c7ef6b and Edit: Confirmed, successfully built I would like to contribute a fix if possible, but I'm not sure what direction would be best to take - GHC 8.8.3 binaries are now available, would it make sense to bootstrap from there? Edit2: Maybe it just needs Edit3: Couldn't get the libtinfo.so dependency from ncurses to work for 8.6.5-binary on pkgsMusl... @dtzWill , I saw that you worked on related things, do you have an idea maybe how to solve this? |
CC @bgamari |
It looks to me like this is a bug in the |
We work around this in mpickering/ghc-artefact-nix via https://github.com/mpickering/ghc-artefact-nix/blob/99fcf89d36d306beb243acccc87d1f6e153ad50f/artifact.nix#L104. |
Collecting some info for myself:
Question: @bgamari Do you know what a fix could look like? Instead of a symlink, should it be a copy of the I don't know anything about the ncurses 5->6 switch, so I have no idea why this sophisticated mechanism is there in the first place. |
The ideal solution would be to rather use a GHC binary distribution which expects diff --git a/pkgs/development/compilers/ghc/8.6.5-binary.nix b/pkgs/development/compilers/ghc/8.6.5-binary.nix
index 97793d91289..188b12f5dad 100644
--- a/pkgs/development/compilers/ghc/8.6.5-binary.nix
+++ b/pkgs/development/compilers/ghc/8.6.5-binary.nix
@@ -1,6 +1,6 @@
{ stdenv
, fetchurl, perl, gcc
-, ncurses5, gmp, glibc, libiconv
+, ncurses6, gmp, glibc, libiconv
, llvmPackages
}:
@@ -11,7 +11,7 @@ let
useLLVM = !stdenv.targetPlatform.isx86;
libPath = stdenv.lib.makeLibraryPath ([
- ncurses5 gmp
+ ncurses6 gmp
] ++ stdenv.lib.optional (stdenv.hostPlatform.isDarwin) libiconv);
libEnvVar = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin "DY"
@@ -38,8 +38,8 @@ stdenv.mkDerivation rec {
sha256 = "1p2h29qghql19ajk755xa0yxkn85slbds8m9n5196ris743vkp8w";
};
x86_64-linux = {
- url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-deb9-linux.tar.xz";
- sha256 = "1pqlx6rdjs2110g0y1i9f8x18lmdizibjqd15f5xahcz39hgaxdw";
+ url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-fedora27-linux.tar.xz";
+ sha256 = "18dlqm5d028fqh6ghzn7pgjspr5smw030jjzl3kq6q1kmwzbay6g";
};
aarch64-linux = {
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-aarch64-ubuntu18.04-linux.tar.xz";
@@ -100,9 +100,9 @@ stdenv.mkDerivation rec {
'' +
# Rename needed libraries and binaries, fix interpreter
stdenv.lib.optionalString stdenv.isLinux ''
- find . -type f -perm -0100 -exec patchelf \
+ find . -type f -perm -0100 \
+ -exec patchelf \
--replace-needed libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5 libncurses.so \
- --replace-needed libtinfo.so libtinfo.so.5 \
--interpreter ${glibcDynLinker} {} \;
sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2 |
* include workaround for NixOS/nixpkgs#85924 * musl 1.2.0 (#98 (comment)) * workaround for fontforge execution failure due to wrong RPATH (NixOS/nixpkgs#94126) * ilmbase musl compilation error
* include workaround for NixOS/nixpkgs#85924 * musl 1.2.0 (#98 (comment)) * workaround for fontforge execution failure due to wrong RPATH (NixOS/nixpkgs#94126) * ilmbase musl compilation error (NixOS/nixpkgs#94205) * mesa: Fix `-Werror=int-conversion` build error on musl fixup! nixpkgs: Update submodule:
* include workaround for NixOS/nixpkgs#85924 * musl 1.2.0 (#98 (comment)) * workaround for fontforge execution failure due to wrong RPATH (NixOS/nixpkgs#94126) * ilmbase musl compilation error (NixOS/nixpkgs#94205) * mesa: Fix `-Werror=int-conversion` build error on musl (NixOS/nixpkgs#94207)
This is a revamp of our use of [fully static Haskell executables](NixOS/nixpkgs#43795). The main changes are: * We can now use a newer revision of Nixpkgs The current revision we're using corresponds to Nixpkgs 20.03 * We can now more easily update Nixpkgs The logic in this repository more closely tracks how `static-haskell-nix` works, so whenever that repository updates Nixpkgs we can pick up the change here, too. Note that we cannot currently use Nixpkgs `master` due to [this issue](NixOS/nixpkgs#85924), but once that is fixed when we can track Nixpkgs `master` more freely. * We no longer need to keep track of separate Nixpkgs revisions for static vs. non-static builds The two builds can also share dependencies, too. Only the top-level derivations differ now. The reason that this doesn't use `static-haskell-nix` directly is because of [`cabal2nix` evaluation failures](nh2/static-haskell-nix#73), so this change works by lifting just the minimum logic that we need from the `static-haskell-nix` repository until we can finally use that repository (or Nixpkgs directly when it's upstreamed).
This is a revamp of our use of [fully static Haskell executables](NixOS/nixpkgs#43795). The main changes are: * We can now use a newer revision of Nixpkgs The current revision we're using corresponds to Nixpkgs 20.03 * We can now more easily update Nixpkgs The logic in this repository more closely tracks how `static-haskell-nix` works, so whenever that repository updates Nixpkgs we can pick up the change here, too. Note that we cannot currently use Nixpkgs `master` due to [this issue](NixOS/nixpkgs#85924), but once that is fixed when we can track Nixpkgs `master` more freely. * We no longer need to keep track of separate Nixpkgs revisions for static vs. non-static builds The two builds can also share dependencies, too. Only the top-level derivations differ now. The reason that this doesn't use `static-haskell-nix` directly is because of [`cabal2nix` evaluation failures](nh2/static-haskell-nix#73), so this change works by lifting just the minimum logic that we need from the `static-haskell-nix` repository until we can finally use that repository (or Nixpkgs directly when it's upstreamed).
Is it feasible to add |
FWIW this also happens with the ghc-8.10.2 binary used to bootstrap ghc901:
|
I built things with @bgamari's patch above and it all went very smoothly, is there a reason against including it in nixpkgs, even if just for musl builds? |
Describe the bug
Trying to build GHC 8.8.3 on pkgsMusl (in order to build static Haskell executables) fails with:
To Reproduce
On a recent pin of nixpkgs-unstable (rev 10100a9):
Expected behavior
GHC 8.8.3 is built based on Musl
Notify maintainers
@MarcWeber @andres @peti
Metadata
"x86_64-linux"
Linux 5.0.0-38-generic, Ubuntu, 19.04 (Disco Dingo)
no
yes
nix-env (Nix) 2.3.1
"nixos-20.03pre204199.3140fa89c51, nixpkgs-20.03pre204216.cc6cf0a96a6"
/home/remo/.nix-defexpr/channels/nixpkgs
The text was updated successfully, but these errors were encountered: