Skip to content

haskell.compiler.ghc9123: Don't apply backported ppc64 ELFv1 patch - #482251

Merged
vcunat merged 1 commit into
NixOS:staging-nextfrom
OPNA2608:fix/ghc9123-ppc64-elfv1-patch
Jan 22, 2026
Merged

vcunat merged 1 commit into
NixOS:staging-nextfrom
OPNA2608:fix/ghc9123-ppc64-elfv1-patch

Conversation

@OPNA2608

@OPNA2608 OPNA2608 commented Jan 21, 2026 •

Copy link
Copy Markdown
Contributor

#462247 (comment)

Doesn't fail during the patchPhase anymore.

nix-repl> lib.filter (x: lib.hasInfix "powerpc64" (toString x)) haskell.compiler.ghc910.src.patches
[
  «derivation /nix/store/2md7qdqi2s7n3kxr61igmfdxpgq241cj-ghc-ppc-support-elf-v2-on-powerpc64-big-endian.patch.drv»
  «derivation /nix/store/al7a1bp1asnwwda3dbh5g2w93j6y9zw8-ghc-rts-Fix-compile-on-powerpc64-elf-v1.patch.drv»
]

nix-repl> lib.filter (x: lib.hasInfix "powerpc64" (toString x)) haskell.compiler.ghc912.src.patches 
[
  «derivation /nix/store/al7a1bp1asnwwda3dbh5g2w93j6y9zw8-ghc-rts-Fix-compile-on-powerpc64-elf-v1.patch.drv»
]

nix-repl> lib.filter (x: lib.hasInfix "powerpc64" (toString x)) haskell.compiler.ghc9123.src.patches
[ ]

nix-repl> lib.filter (x: lib.hasInfix "powerpc64" (toString x)) haskell.compiler.ghc914.src.patches  
[ ]

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 6.topic: haskell General-purpose, statically typed, purely functional programming language labels Jan 21, 2026
@OPNA2608

Copy link
Copy Markdown
Contributor Author

pkgsCross.ppc64-elfv1.haskell.packages.ghc9123.hello seems borked:

# cabal-configure (for _build/stage1/rts/setup-config)
Configuring rts-1.0.2...
Error: [Cabal-1008]
The program 'ghc' version >=7.0.1 is required but the version of /build/ghc-9.12.3-source/_build/stage0/bin/powerpc64-unknown-linux-gnuabielfv1-ghc could not be determined.

ExitFailure 1
Build failed.

But this seems to be neither the only version, nor the only cross situation/target with this kind of error:

↪ file /nix/var/nix/b/0jwhn56vh60801arpnvcvpz063/b/ghc-9.12.3-source/_build/stage0/bin/powerpc64-unknown-linux-gnuabielfv1-ghc
/nix/var/nix/b/0jwhn56vh60801arpnvcvpz063/b/ghc-9.12.3-source/_build/stage0/bin/powerpc64-unknown-linux-gnuabielfv1-ghc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /nix/store/wb6rhpznjfczwlwx23zmdrrw74bayxw4-glibc-2.42-47/lib/ld-linux-x86-64.so.2, for GNU/Linux 3.10.0, not stripped

↪ /nix/var/nix/b/0jwhn56vh60801arpnvcvpz063/b/ghc-9.12.3-source/_build/stage0/bin/powerpc64-unknown-linux-gnuabielfv1-ghc
/nix/var/nix/b/0jwhn56vh60801arpnvcvpz063/b/ghc-9.12.3-source/_build/stage0/bin/powerpc64-unknown-linux-gnuabielfv1-ghc: error while loading shared libraries: /nix/store/9wfixkvsljqsj30d0yf7wr5v3mkwnfcl-libffi-powerpc64-unknown-linux-gnuabielfv1-3.5.2/lib/libffi.so.8: ELF file data encoding not little-endian

↪ file (realpath /nix/store/9wfixkvsljqsj30d0yf7wr5v3mkwnfcl-libffi-powerpc64-unknown-linux-gnuabielfv1-3.5.2/lib/libffi.so.8)
/nix/store/9wfixkvsljqsj30d0yf7wr5v3mkwnfcl-libffi-powerpc64-unknown-linux-gnuabielfv1-3.5.2/lib/libffi.so.8.2.0: ELF 64-bit MSB shared object, 64-bit PowerPC or cisco 7500, Power ELF V1 ABI, version 1 (SYSV), dynamically linked, not stripped

So this might need a more general fix somewhere… But this PR should be fine for now ig.

@vcunat
vcunat added this pull request to the merge queue Jan 22, 2026
Merged via the queue into NixOS:staging-next with commit 521f37c Jan 22, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: haskell General-purpose, statically typed, purely functional programming language 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants