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: 9.6.3-binary -> 9.6.4-binary #297418

Closed

Conversation

mpscholten
Copy link
Contributor

@mpscholten mpscholten commented Mar 20, 2024

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@sternenseemann
Copy link
Member

Upgrading to 9.6.4 doesn't solve any of our problems, the problem is not a regression that was fixed in 9.6.4, but rather an issue with the bindists of 9.6 as such. The 9.6.4 bindist has a completely new issue (passes unsupported flags to our ld), so it doesn't seem worth it since none of the codegen bugs in .3 seem to affect the GHC bootstrap.

@TravisWhitaker
Copy link
Contributor

We run into a different issue with GHC 9.6.4. I'm pretty confident it's hsc2hs's fault. When building the clock package, hsc2hs passes -no_fixup_chains to ld which isn't present on darwin.

The Nixpkgs-build GHC 9.6.4 doesn't have this problem, so either it's an issue with whatever hsc2hs is in that bindist, or Nixpkgs' is hiding the problem some other way (with a patch or ld wrapper or something).

Running phase: buildPhase
Preprocessing library for clock-0.8.4..
linking dist/build/System/Clock_hsc_make.o failed (exit code 1)
rsp file was: "dist/build/System/hsc2hscall90742-2.rsp"
command was: /nix/store/0m04cmy32vs1686pzjqajsh50arbv8m4-clang-wrapper-16.0.6/bin/clang dist/build/System/Clock_hsc_make.o dist/build/System/Clock_hsc_utils.o -o dist/build/System/Clock_hsc_make --target=arm64-apple-darwin -Wl,-no_fixup_chains -Wl,-no_warn_duplicate_libraries --target=arm64-apple-darwin -L/nix/store/j3yw5w8pbdv4argnmx7i4i0lvglnh7ll-libcxx-16.0.6/lib -L/nix/store/g9x4r8l8hjk3vfj26k90p3rjc6g8j3i6-libcxxabi-16.0.6/lib -L/nix/store/v7rhm5d36dn6bgcbdc4w3dg8ym3vxb5d-compiler-rt-libc-16.0.6/lib -L/nix/store/7y2jn8rdygiy22rzy66wsz4gvrfn5hh6-apple-framework-CoreFoundation-11.0.0/lib -L/nix/store/cii11dfrz126yb3d03aqyahwq3fanl1g-libobjc-11.0.0/lib -L/nix/store/j1r1hnfk0zn4k44nm6m4a27nka35649n-ghc-binary-9.6.4/lib/ghc-9.6.4/lib/../lib/aarch64-osx-ghc-9.6.4/base-4.18.2.0 -L/nix/store/n7hyb4xfwjdcm87gbisck8pl9c2mp1qs-libiconv-50/lib -liconv -L/nix/store/j1r1hnfk0zn4k44nm6m4a27nka35649n-ghc-binary-9.6.4/lib/ghc-9.6.4/lib/../lib/aarch64-osx-ghc-9.6.4/ghc-bignum-1.3 -L/nix/store/5kg229dp8nb6a2m0hv7g1zl725kxp0nn-gmp-with-cxx-6.3.0/lib -L/nix/store/j1r1hnfk0zn4k44nm6m4a27nka35649n-ghc-binary-9.6.4/lib/ghc-9.6.4/lib/../lib/aarch64-osx-ghc-9.6.4/ghc-prim-0.10.0 -L/nix/store/0z3mx40zc1b2zf8yjlrkk0iyps3yxlil-libffi-3.4.6/lib -L/nix/store/j1r1hnfk0zn4k44nm6m4a27nka35649n-ghc-binary-9.6.4/lib/ghc-9.6.4/lib/../lib/aarch64-osx-ghc-9.6.4/rts-1.0.2 -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -lm -ldl -lffi
error: ld: unknown option: -no_fixup_chains
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)

@TravisWhitaker
Copy link
Contributor

Ah @sternenseemann you beat me to it.

Given the 9.6.x bindist issues, do you see a big problem with using the Nixpkgs-built 9.6.4 to bootstrap the 9.8.x GHCs?

@mpscholten mpscholten closed this Mar 26, 2024
@reckenrode
Copy link
Contributor

reckenrode commented Jul 28, 2024

We run into a different issue with GHC 9.6.4. I'm pretty confident it's hsc2hs's fault. When building the clock package, hsc2hs passes -no_fixup_chains to ld which isn't present on darwin.

ld64 was upgraded to 951.9 in #307880, which is the version shipped with Xcode 15. The -no_fixup_chains flag should be supported now. The bindist and bootstrap issue should also be fixed in #330559 #330560.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants