Skip to content
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

GHC 8.4.2: "Got error while processing diagnostics: unable to load package `integer-gmp-1.0.2.0'" #89

Closed
runeksvendsen opened this issue Jun 3, 2018 · 15 comments

Comments

@runeksvendsen
Copy link
Contributor

I'm getting the error below when I try to view src/Paths.hs in VS Code from the following repo/branch: https://github.com/runeksvendsen/crypto-venues/tree/graph

Got error while processing diagnostics: unable to load package 'integer-gmp-1.0.2.0'

I'm using the Stack resolver nightly-2018-05-30 (GHC 8.4.2), which matches the output of hie --compiler.

@alanz
Copy link
Collaborator

alanz commented Jun 3, 2018

Is this on macos? I think there is issue around integer-gmp on that platform and/or windows

Does the project build outside of hie?

@runeksvendsen
Copy link
Contributor Author

Oh, yes, I forgot to mention I'm on MacOS.

The aforementioned repo/branch (https://github.com/runeksvendsen/crypto-venues/tree/graph) does not build, but I've tried out-commenting the errors in src/Paths.hs, so that the project builds, and I still get the integer-gmp-related error.

@Tehnix
Copy link
Contributor

Tehnix commented Jun 4, 2018

I think the issue with integer-gmp was fixed in 8.4.3, but I’m not entirely sure. Would you be able to test against a resolver with that GHC version?

@runeksvendsen
Copy link
Contributor Author

@Tehnix How do I build hie with GHC 8.4.3 inside?

I tried changing Stack resolver for my project to nightly-2018-06-02, but now I get an error from ghc-mod:

[ghcmod]
Bad interface file: /Users/runesvendsen/.stack/snapshots/x86_64-osx/nightly-2018-06-02/8.4.3/lib/x86_64-osx-ghc-8.4.3/http-client-0.5.12.1-Jz7lKEONVEuEVWDof4BXPO/Network/HTTP/Client.hi
    mismatched interface file versions (wanted "8042", got "8043")

which, I assume, is related to the mismatch between hies compiler (ghc-8.4.2) and what's now used by my project.

@alanz
Copy link
Collaborator

alanz commented Jun 4, 2018

hie current master does support GHC 8.4.3, if you install it via the makefile, and update the vscode plugin to 0.0.18 (which has a bug for windows, must turn tracing to verbose else hie wont start, #90 )

@runeksvendsen
Copy link
Contributor Author

I updated hie to current master and built hie-8.4.3 (hie --compiler now says ghc-8.4.3), but unfortunately VS Code still gives me the error Got error while processing diagnostics: unable to load package 'integer-gmp-1.0.2.0' using vscode-hie-server version 0.0.19.

@lukel97
Copy link
Collaborator

lukel97 commented Jun 18, 2018

This is caused by a known issue with GHC, in the meantime try the workaround here: haskell/haskell-ide-engine#562

@runeksvendsen
Copy link
Contributor Author

runeksvendsen commented Jun 27, 2018

@bubba which workaround are you referring to? I’m using GHC installed by Stack, for what it’s worth.

@lukel97
Copy link
Collaborator

lukel97 commented Jun 27, 2018

@runeksvendsen The workaround I used was renaming /Users/luke/.stack/programs/x86_64-osx/ghc-8.4.3/lib/ghc-8.4.3/integer-gmp-1.0.2.0/HSinteger-gmp-1.0.2.0.o to some other random file

@runeksvendsen
Copy link
Contributor Author

Thank you @bubba! That got rid of the error.

Feel free to close this issue if you feel like it (not sure whether or not I should close it, given that a workaround is required).

@alanz
Copy link
Collaborator

alanz commented Jul 13, 2018

@bubba do we need to update the readme for this?

@lukel97
Copy link
Collaborator

lukel97 commented Jul 24, 2018

Readme was updated, I think this can be closed now

@AlexeyRaga
Copy link
Contributor

Do we have a solution for this issue?
I started having Got error while processing diagnostics: unable to load package integer-gmp-1.0.2.0'` on GHC 8.4.4 after updating to the latest commit.

I renamed all the HSinteger-gmp-1.0.2.0.o I have found for that GHC, but I am still having this problem...

At the same time, cabal new-build works fine.

@AlexeyRaga
Copy link
Contributor

Oh, actually, I have found yet another occurrence of HSinteger-gmp-1.0.2.0.o and renaming it helped.

@jneira
Copy link
Member

jneira commented Jan 9, 2020

I think we could close this one as it has a known workaround and it is documented

@jneira jneira closed this as completed Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants