I have an issue with building a haskell package because haskellPackages.ghc-internal
has been marked as broken. When deleting this markation locally I am getting the following response:
error: builder for '/nix/store/yzciqmpxm9w4lgnb7qvb7c262ag6lwla-ghc-internal-9.1201.0.drv' failed with exit code 1;
last 21 log lines:
> Running phase: setupCompilerEnvironmentPhase
> Build with /nix/store/cx1pk3j091vfwkn36y8wbwdvizvma6ms-ghc-9.6.6.
> Running phase: unpackPhase
> unpacking source archive /nix/store/7a6k9vs641042b7s4id7y4hgbqfc5ani-ghc-internal-9.1201.0.tar.gz
> source root is ghc-internal-9.1201.0
> setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file "ghc-internal-9.1201.0/src/GHC/Internal/Word.hs"
> Running phase: patchPhase
> Running phase: compileBuildDriverPhase
> setupCompileFlags: -package-db=/build/tmp.v5RrWenP9H/setup-package.conf.d -threaded
> [1 of 2] Compiling Main ( Setup.hs, /build/tmp.v5RrWenP9H/Main.o )
> [2 of 2] Linking Setup
> Running phase: updateAutotoolsGnuConfigScriptsPhase
> Running phase: configurePhase
> configureFlags: --verbose --prefix=/nix/store/1w0iw3nc8kvjlaigqa6jvbxv0l9ydc9f-ghc-internal-9.1201.0 --libdir=$prefix/lib/$compiler/lib --libsubdir=$abi/$libname --docdir=/nix/store/bbbvkb3wkxvjmcbvjvb920vkksnci0v5-ghc-internal-9.1201.0-doc/share/doc/ghc-internal-9.1201.0 --with-gcc=gcc --package-db=/build/tmp.v5RrWenP9H/package.conf.d --ghc-option=-j12 --ghc-option=+RTS --ghc-option=-A64M --ghc-option=-RTS --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --enable-split-sections --enable-library-stripping --enable-executable-stripping --ghc-option=-haddock --extra-lib-dirs=/nix/store/zk8k3jn46g6zxysccq3pbj8n9mr1ggi8-ncurses-6.4.20221231/lib --extra-lib-dirs=/nix/store/af26rdavng72z6qi08p52jhg5qynlg7n-libffi-3.4.6/lib --extra-lib-dirs=/nix/store/anj79qqjcz0g69qp032jkmq2ka30x88b-elfutils-0.192/lib --extra-lib-dirs=/nix/store/4yv04mylgabfi1vdnl0cr83q5qax4ch7-gmp-with-cxx-6.3.0/lib
> Using Parsec parser
> Configuring ghc-internal-9.1201.0...
> CallStack (from HasCallStack):
> withMetadata, called at libraries/Cabal/Cabal/src/Distribution/Simple/Utils.hs:368:14 in Cabal-3.10.3.0:Distribution.Simple.Utils
> Error: Setup: Encountered missing or private dependencies:
> ghc-prim >=0.11 && <0.14
>
For full logs, run 'nix log /nix/store/yzciqmpxm9w4lgnb7qvb7c262ag6lwla-ghc-internal-9.1201.0.drv'.
It seems ghc-internal is not getting its dependency ghc-prim minimum version 0.11 even though it should be available according to nixpkgs search even though building it inside the repo causes an even weirder response:
error: builder for '/nix/store/rywxyj132x4fnn3p91ri6876d7knvzqs-ghc-prim-0.13.0.drv' failed with exit code 1;
last 25 log lines:
> Using haddock version 2.29.2 found on system at:
> /nix/store/cx1pk3j091vfwkn36y8wbwdvizvma6ms-ghc-9.6.6/bin/haddock-ghc-9.6.6
> No happy found
> Using haskell-suite found on system at: haskell-suite-dummy-location
> Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
> No hmake found
> Using hpc version 0.68 found on system at:
> /nix/store/cx1pk3j091vfwkn36y8wbwdvizvma6ms-ghc-9.6.6/bin/hpc-ghc-9.6.6
> Using hsc2hs version 0.68.9 found on system at:
> /nix/store/cx1pk3j091vfwkn36y8wbwdvizvma6ms-ghc-9.6.6/bin/hsc2hs-ghc-9.6.6
> Using hscolour version 1.25 found on system at:
> /nix/store/f7lyfcfgdm98p25wnkhpq7xgn6l6837z-hscolour-1.25/bin/HsColour
> No jhc found
> Using ld found on system at:
> /nix/store/xxwkjlfikd5q8nnpyysnx4dla8r54w56-binutils-wrapper-2.43.1/bin/ld.gold
> No pkg-config found
> Using runghc version 9.6.6 found on system at:
> /nix/store/cx1pk3j091vfwkn36y8wbwdvizvma6ms-ghc-9.6.6/bin/runghc-9.6.6
> Using strip version 2.43 found on system at:
> /nix/store/591apldfgm1gr238rbfc8ib0y1z8ng2y-gcc-wrapper-14-20241116/bin/strip
> Using tar found on system at:
> /nix/store/s6zpdhyi00867afvsyg8hf54q5llkffl-gnutar-1.35/bin/tar
> No uhc found
> Running phase: buildPhase
> /bin/sh: can't open ../../compiler/prelude/primops.txt: no such file
For full logs, run 'nix log /nix/store/rywxyj132x4fnn3p91ri6876d7knvzqs-ghc-prim-0.13.0.drv'.
It’s difficult to understand how the file that defines those packages is getting used.
So I am at a loss here now