Skip to content

ghc-9.2.8: loadArchive: Neither an archive, nor a fat archive: `/nix/store/.../bin/clang++'

Summary

cabal build -j3 cabal-tests cabal fails in a compiler panic in current most recent version of Cabal sources. This seems related to the fact that clang is managed by nix and not Xcode on my machine ...

Steps to reproduce

Checkout on current last commit of Cabal repository (667be46823f1f243ffb6d3c8205537bdb79f5b3a) and after a cabal clean, I got this compiler panic while doing make cabal-install-test:

Configuring library for parsers-0.12.11..
Preprocessing library for parsers-0.12.11..
Building library for parsers-0.12.11..
[1 of 8] Compiling Text.Parser.Combinators ( src/Text/Parser/Combinators.hs, dist/build/Text/Parser/Combinators.o, dist/build/Text/Parser/Combinators.dyn_o )
[2 of 8] Compiling Text.Parser.Char ( src/Text/Parser/Char.hs, dist/build/Text/Parser/Char.o, dist/build/Text/Parser/Char.dyn_o )
ghc-9.2.8: loadArchive: Neither an archive, nor a fat archive: `/nix/store/d0haqsm4256q6ligbcpbndr6s8z13vma-clang-wrapper-11.1.0/bin/clang++'
ghc-9.2.8: panic! (the 'impossible' happened)
  (GHC version 9.2.8:
	loadArchive "/nix/store/d0haqsm4256q6ligbcpbndr6s8z13vma-clang-wrapper-11.1.0/bin/clang++": failed

Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug

Expected behavior

The 'impossible' shouldn't happen!

Environment

  • GHC version used: 9.2.8

Optional:

  • Operating System: macOS 13.4.1
  • System Architecture: aarch64-darwin
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information