-
Notifications
You must be signed in to change notification settings - Fork 251
Description
This template is a guide only, feel free add or omit sections as appropriate.
Describe the bug
haskell.nix seems unable to compile a project using the polysemy-plugin
with 9.8.1, but the same project can be built with cabal (using GHC installed via ghcup).
I am using MacOS Sonoma (14.2.1).
Steps To Reproduce
The repo at https://github.com/m4dc4p/haskell-nix-9.8 reproduces the problem.
To reproduce, run nix-build
. Eventually, compilation will fail with the error:
Building library for test-0.1.0.0..
<no location info>: error:
Failed to load interface for ‘GHC.Driver.Plugins’.
no unit id matching ‘ghc-9.8.1-inplace’ was found
Using cabal build
(with a GHC installed via ghcup), the library does compile.
Additional context
default.nix
takes a compiler-nix-name
argument, and the project does build successfully with 9.6. (nix-build --argstr compiler-nix-version ghc96
will show. that).
Output for all three types of builds are included in the repo:
- cabal.out - Shows that cabal can build the library
- haskell-nix-96.out - Shows that haskell.nix can build the library with GHC 9.6.
- haskell-nix-98.out - Shows the build failure with GHC 9.8.
Note that I reproduced this bug with two plugins (first, polysemy-plugin
, then breakpoint
) and the build failed in both cases.
An earlier bug (#2096) mentioned this behavior only occurred when using -fplugin
in the cabal file, but here it happens even when using OPTIONS_GHC
in the source file.
Here is the content of haskell-nix-98.out
in case it helps:
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/pjv9dmysj98hv7y8psr8qs0ki3i83v42-source-root-lib-test
source root is source-root-lib-test
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
Configure flags:
--prefix=/nix/store/xp4dx3sy524fh68lip4fxakz10qmhb8z-test-lib-test-0.1.0.0 lib:test --package-db=clear --package-db=/private/tmp/nix-build-test-lib-test-0.1.0.0.drv-3/tmp.UQbj0NdDDd/lib/ghc-9.8.1/lib/package.conf.d --exact-configuration --dependency=breakpoint=breakpoint-0.1.3.0-47vtNTUqfrv2CUBzz1Y9DC --dependency=ansi-terminal=ansi-terminal-1.0.2-2BqNc65ocHa9MjQf0YNPwR --dependency=ansi-terminal-types=ansi-terminal-types-0.11.5-2a2fmPlNFqF1DlTktOKqnN --dependency=colour=colour-2.3.6-EA4HrM2YyXcEiOsPwT8hJY --dependency=colour=colour-2.3.6-EA4HrM2YyXcEiOsPwT8hJY --dependency=containers=containers-0.6.8-BF5T8j1nt6wFZ2QObZv3OP --dependency=ghc=ghc-9.8.1-92mlnX6DBeJCuIXDEq7pgN --dependency=binary=binary-0.8.9.1-9lCdVEP65H5GTZZtoj7Tga --dependency=bytestring=bytestring-0.12.0.2-5uFzxwiI635Kl8cAv8M0vo --dependency=bytestring=bytestring-0.12.0.2-5uFzxwiI635Kl8cAv8M0vo --dependency=directory=directory-1.3.8.1-BVz0G5efthg8T3yjMBXBrk --dependency=filepath=filepath-1.4.100.4-6CCwe3vrrs2K41ASxAJsYs --dependency=exceptions=exceptions-0.10.7-6pSXCzitm7KEMaXpXZ8zM4 --dependency=mtl=mtl-2.3.1-5knlLISMTSUCeMFmP1LKid --dependency=transformers=transformers-0.6.1.0-DNBHcTfMygjJfIziyxxmzg --dependency=stm=stm-2.5.2.1-6NnRD0WpVKDIiCABQcKiUW --dependency=time=time-1.12.2-4Pf2fTyj17B8XjSRNW4gXI --dependency=unix=unix-2.8.3.0-D4EMilNHDHdFN0ynrY6Fmy --dependency=ghc-boot=ghc-boot-9.8.1-LxLxDg5bNMI5j8QoYWIcg2 --dependency=ghc-heap=ghc-heap-9.8.1-7ZcuGr1at912RxNBhhw7Nq --dependency=ghci=ghci-9.8.1-HNirO0XD90u1CRFZKmU7TY --dependency=hpc=hpc-0.7.0.0-69ZiMuwkkStFNXCeE43VKh --dependency=process=process-1.6.18.0-3wCtVntuQMTDeQG6XWooHM --dependency=semaphore-compat=semaphore-compat-1.0.0-5yEZCV2GhvhACQGXRwZE5l --dependency=haskeline=haskeline-0.8.2.1-54508oHY2uu90IyJi6xT2o --dependency=terminfo=terminfo-0.4.1.6-4sH8hE3ZS9uCJHJP0XXvFk --dependency=pretty-simple=pretty-simple-4.1.2.0-3HJW6icd2LJDR7Oj5dus4M --dependency=prettyprinter-ansi-terminal=prettyprinter-ansi-terminal-1.1.3-FDk6eETZMifDXWxkkr0b0f --dependency=prettyprinter=prettyprinter-1.7.1-3qpod2QeSZuW8EdJO2ntt --dependency=text=text-2.1-8CrHUcaV7TWDMTpHjOxz6D --dependency=text=text-2.1-8CrHUcaV7TWDMTpHjOxz6D --dependency=array=array-0.5.6.0-inplace --dependency=base=base-4.19.0.0-inplace --dependency=deepseq=deepseq-1.5.0.0-inplace --dependency=ghc-bignum=ghc-bignum-1.3-inplace --dependency=ghc-boot-th=ghc-boot-th-9.8.1-inplace --dependency=ghc-prim=ghc-prim-0.11.0-inplace --dependency=integer-gmp=integer-gmp-1.1-inplace --dependency=pretty=pretty-1.1.3.6-inplace --dependency=rts=rts-1.0.2 --dependency=system-cxx-std-lib=system-cxx-std-lib-1.0 --dependency=template-haskell=template-haskell-2.21.0.0-inplace --with-ghc=ghc --with-ghc-pkg=ghc-pkg --with-hsc2hs=hsc2hs --with-gcc=cc --with-ar=ar --with-strip=strip --with-ld=ld --disable-executable-stripping --disable-library-stripping --disable-library-profiling --disable-profiling --enable-static --enable-shared --disable-executable-dynamic --disable-coverage --enable-library-for-ghci --datadir=/nix/store/av1hm26caykzhqxy4h66vlzl2szj3wby-test-lib-test-0.1.0.0-data/share/ghc-9.8.1
Configuring library for test-0.1.0.0..
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Preprocessing library for test-0.1.0.0..
Building library for test-0.1.0.0..
�[;1m<no location info>: �[;1m�[31merror�[0m�[0m�[;1m:�[0m�[0m�[;1m
Failed to load interface for ‘GHC.Driver.Plugins’.
no unit id matching ‘ghc-9.8.1-inplace’ was found�[0m�[0m