-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
haskell.compiler.ghc865Binary: disable stripping once again on ARMv8 #98265
Conversation
There seems to be a latent bug with strip + patchelf on the GHC stage2 binary which got triggered again by patchelf 0.12. Until this is properly fixed in patchelf, re-disable stripping. Fixes NixOS#97407.
Hmm, I'm confused as to why there's a diff on Darwin and why ofborg seems to be trying to rebuild some x86_64 targets. I was expecting this to only cause rebuilds on ARMv8. Evaluation also fails on ARMv8 and it seems to be for a completely unrelated reason :( |
I think this is causing rebuilds because it defines $ git checkout PARENT_COMMIT_OF_THIS_PR # the parent commit of ab85f1b
$ nix-instantiate -A haskell.compiler.ghc865Binary
/nix/store/pz3g8s49cz7y7pq1lw04ssgl9f01fk5p-ghc-8.6.5-binary.drv
$ git checkout ab85f1b # the commit from this PR
$ nix-instantiate -A haskell.compiler.ghc865Binary
/nix/store/h3hbi22nns76xszisi5hwg5j087m4z1r-ghc-8.6.5-binary.drv
$ nix-diff /nix/store/pz3g8s49cz7y7pq1lw04ssgl9f01fk5p-ghc-8.6.5-binary.drv /nix/store/h3hbi22nns76xszisi5hwg5j087m4z1r-ghc-8.6.5-binary.drv
- /nix/store/pz3g8s49cz7y7pq1lw04ssgl9f01fk5p-ghc-8.6.5-binary.drv:{out}
+ /nix/store/h3hbi22nns76xszisi5hwg5j087m4z1r-ghc-8.6.5-binary.drv:{out}
• The environments do not match:
+ dontStrip= The above is on Linux x86_64. You can see that In the future, if you wanted to do this without causing a mass rebuild, most people optionally append the attribute: stdenv.mkDerivation ({
...
} // lib.optional stdenv.hostPlatform.isAarch64 {
dontStrip = true;
}) This avoids the mass rebuild on platforms other than aarch64. However, in the Haskell case, we normally send all PRs to the So can you change the base branch for this PR to |
Yes. However, stdenv.mkDerivation {
# ...
dontStrip = if stdenv.hostPlatform.isAarch64 then true else null;
} |
But, to be clear... this commit doesn't fix the bootstrap for me:
( |
Oh yeah, good memory. This does sound familiar. I think you're right here. This appears to be the issue where it was discussed: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that PR actually helps. I have applied this patch to a current version of master
--- a/pkgs/development/compilers/ghc/8.6.5-binary.nix
+++ b/pkgs/development/compilers/ghc/8.6.5-binary.nix
@@ -55,6 +55,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ perl ];
propagatedBuildInputs = stdenv.lib.optionals useLLVM [ llvmPackages.llvm ];
+ dontStrip = true;
+
# Cannot patchelf beforehand due to relative RPATHs that anticipate
# the final install location/
${libEnvVar} = libPath;
and then tried to build pandoc
, but without success. The build of ghc-8.6.5-binary
now succeeds, but it fails quickly trying to build hscolour
:
[ 1 of 16] Compiling Language.Haskell.HsColour.Classify ( Language/Haskell/HsColour/Classify.hs, dist/build/Language/Haskell/HsColour/Classify.o )
/nix/store/k832pghqg9z887j8py47ddhwzrn4yj1f-stdenv-linux/setup: line 1302: 226 Bus error (core dumped) ./Setup build
builder for '/nix/store/a4b1pcyf3js8dlsfaigafdkffwvycmr3-hscolour-1.24.4.drv' failed with exit code 135
cannot build derivation '/nix/store/ldnrk1wbwk93c938sw16zj9q4gnyv12c-hscolour-1.24.4.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/hjljkfwkd4bki9lzn9yx61xc54ypf17z-ghc-8.10.2.drv': 1 dependencies couldn't be built
error: build of '/nix/store/hjljkfwkd4bki9lzn9yx61xc54ypf17z-ghc-8.10.2.drv' failed
The same thing happens when trying to compile pandoc with ghc-8.8.4
with that patch applied.
EDIT: For what it's worth, I tried that build on a Raspberry Pi 4b running nixos-unstable
.
I'm still not sure why this seems to completely solve the problem when building on my ec2 aarch64 builder but not elsewhere... I'll close this PR for now and will focus on trying to actually fix patchelf instead of working around the issue. |
Motivation for this change
There seems to be a latent bug with strip + patchelf on the GHC stage2
binary which got triggered again by patchelf 0.12. Until this is
properly fixed in patchelf, re-disable stripping.
Not going through staging since all the rebuilds are currently broken at head anyway.
Fixes #97407.
@GrahamcOfBorg build pandoc
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)