Skip to content
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 bootstrap binary in Nixpkgs is corrupt with recent patchelf. #593

Open
alyssais opened this issue Apr 2, 2025 · 0 comments
Open

GHC bootstrap binary in Nixpkgs is corrupt with recent patchelf. #593

alyssais opened this issue Apr 2, 2025 · 0 comments
Labels

Comments

@alyssais
Copy link
Member

alyssais commented Apr 2, 2025

Describe the bug

Since #469, the latest version of patchelf produces corrupt binaries when used in the GHC bootstrap binary in Nixpkgs, resulting in the bootstrap binary derivation failing to build in installCheckPhase:

ghc-binary> Patchelfing /nix/store/j5rc4lw27h55kl3na2kb9vp2207dplzn-ghc-binary-9.6.3/lib/ghc-9.6.3/lib/x86_64-linux-ghc-9.6.3/libHSfilepath-1.4.100.4-ghc9.6.3.so
ghc-binary> Patchelfing /nix/store/j5rc4lw27h55kl3na2kb9vp2207dplzn-ghc-binary-9.6.3/lib/ghc-9.6.3/lib/bin/ghc-iserv-prof
ghc-binary> Patchelfing /nix/store/j5rc4lw27h55kl3na2kb9vp2207dplzn-ghc-binary-9.6.3/lib/ghc-9.6.3/lib/bin/ghc-iserv-dyn
ghc-binary> Patchelfing /nix/store/j5rc4lw27h55kl3na2kb9vp2207dplzn-ghc-binary-9.6.3/lib/ghc-9.6.3/lib/bin/ghc-iserv
ghc-binary> Patchelfing /nix/store/j5rc4lw27h55kl3na2kb9vp2207dplzn-ghc-binary-9.6.3/lib/ghc-9.6.3/lib/bin/unlit
ghc-binary> /nix/store/9r1nl9ksiyszy4qzzg6y2gcdkca0xmhy-stdenv-linux/setup: line 276: 50496 Segmentation fault      (core dumped) "$out/bin/ghc-pkg" --package-db="$package_db" recache

Steps To Reproduce

  1. Add patchelfUnstable to nativeBuildInputs in pkgs/development/compilers/ghc/9.6.3-binary.nix in Nixpkgs. I used NixOS/nixpkgs@3bdd07d0eea6.
  2. Try building ghc

Expected behavior

Bulid succeeds.

patchelf --version output

patchelf 0.18.0

Additional context

cc @brenoguim @Mic92

This does not appear to be the same issue as #568, because the test case given there works for me on the commit I bisected to.

@alyssais alyssais added the bug label Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant