-
Notifications
You must be signed in to change notification settings - Fork 244
Cannot build packages depending on ghc #313
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
Comments
It requires a recompilation but it usually works if you specify
as a module. |
Thanks, this helped! import TcPluginM ( FindResult(..) ) to one of my sources. The same project is built successfully with Full logbuilding '/nix/store/9frfqvc70crsgvnsyynxcpd1lgvjfl0c-git-ls-files.drv'... trace: Using index-state: 2019-10-20T00:00:00Z for alex trace: Using index-state: 2019-10-20T00:00:00Z for happy trace: Using index-state: 2019-10-20T00:00:00Z for hscolour trace: Cleaning component source not supported for hpack package: foo-0.1.0.0 trace: Cleaning component source not supported for hpack package: foo-0.1.0.0 these derivations will be built: /nix/store/d7hngzv1bzdb8ihz86i66484zgkl4b3h-foo-0.1.0.0-lib-foo.drv /nix/store/ddqsbgjjzy1q2c6dlkaricf72d99ggqy-foo-0.1.0.0-test-foo-test-config.drv /nix/store/mjg5mrgm3qw4v2r36bfhgj24bkzdws1q-foo-0.1.0.0-test-foo-test-ghc-8.6.5.drv /nix/store/p94s5hi6ggwfgdaffnn83fpk2hwgq23h-foo-0.1.0.0-test-foo-test.drv building '/nix/store/d7hngzv1bzdb8ihz86i66484zgkl4b3h-foo-0.1.0.0-lib-foo.drv'... unpacking sources unpacking source archive /nix/store/hv95ijnqzgrn3mxmd3fh5541i8nf3hp9-foo source root is foo patching sources generated foo.cabal configuring Configure flags: --prefix=/nix/store/ib1nich455gpf05hy3p7qkkzyirp2ac0-foo-0.1.0.0-lib-foo lib:foo --package-db=clear --package-db=/nix/store/bcii13rxwffb4xfji0g6crz8l0i0g9w6-foo-0.1.0.0-lib-foo-config/package.conf.d --exact-configuration --dependency=ghc=ghc-8.6.5-HvYRTommLnF4kf1hWuE8GL --dependency=rts=rts --dependency=ghc-heap=ghc-heap-8.6.5 --dependency=ghc-prim=ghc-prim-0.5.3 --dependency=integer-gmp=integer-gmp-1.0.2.0 --dependency=base=base-4.12.0.0 --dependency=deepseq=deepseq-1.4.4.0 --dependency=array=array-0.5.3.0 --dependency=ghc-boot-th=ghc-boot-th-8.6.5 --dependency=pretty=pretty-1.1.3.6 --dependency=template-haskell=template-haskell-2.14.0.0 --with-ghc=ghc --with-ghc-pkg=ghc-pkg --with-hsc2hs=hsc2hs --with-gcc=cc --with-ld=ld --with-ar=ar --with-strip=strip --disable-executable-stripping --disable-library-stripping --disable-library-profiling --disable-executable-profiling --docdir=/nix/store/agb7a181hvwpsavwc9kjn0q14ma4lmgy-foo-0.1.0.0-lib-foo-doc/share/doc/foo Configuring library for foo-0.1.0.0.. Warning: The flag --disable-executable-profiling is deprecated. Please use --disable-profiling instead. building Preprocessing library for foo-0.1.0.0.. Building library for foo-0.1.0.0.. [1 of 2] Compiling Lib ( src/Lib.hs, dist/build/Lib.o ) |
Fixed by removing I will keep this issue open in case you want to include the patch by default, for me the problem has been resolved. |
@rtimush interesting. So we fail to build I guess you could alternatively do
or
the more confusing part though is that I thought we already removed all the GHCI def checks from ghc. Maybe that only ended up in 8.8? That's definetly worth an invesitgation. |
At least in head there is no https://gitlab.haskell.org/ghc/ghc/blob/master/compiler/typecheck/TcPluginM.hs |
@angerman I first tried |
We also experience this with ghcide-nix. I've tried it with haskell.nix master, but the ghc isn't right.
results in
whereas without
|
@roberth the first issue with lib-ghc failing sounds like the the ghci-flag is not picked up correctly. That is rather confusing. Do you happen to have the full log for |
The following change seems to have resolved the issue @roberth has been seeing:
|
I was able to fix libiserv breakage in a cross-compiling build by adding to my module inputs to stackProject, though I simply wrote |
I've bumped into the same problem in a cross-compiling build as well (GHC 8.6.5), but I had to add the following flag to make it work: |
I'm also having trouble with |
That is odd. How did you pass it? It needs to be in the
|
Thanks, that was the hint I needed. I had it one level up alongside the |
I am going to close this as |
Projects that have
ghc
as a dependency cannot be built (in my case it's a transitive dependency ofpolysemy-plugin
).I reproduced it by running
stack new
, addingdefault.nix
and addingghc
topackage.yaml
, but probably the exact setup doesn't matter too much here.The full log:
The text was updated successfully, but these errors were encountered: