Tool installation fails because `system-ghc` is configured for dynamic linking.
See original GitHub issueOn loading a stack project, the plugin attempts to install tools, when I get the following error:
Executing `/usr/bin/stack --system-ghc -j1 --stack-root /home/daniel/.cache/intellij-haskell/lts-13 --resolver lts-13 --local-bin-path /home/daniel/.cache/intellij-haskell/lts-13/bin install hlint` failed: /usr/bin/stack --system-ghc -j1 --stack-root /home/daniel/.cache/intellij-haskell/lts-13 --resolver lts-13 --local-bin-path /home/daniel/.cache/intellij-haskell/lts-13/bin install hlint:
Selected resolver: lts-13.27
[1 of 2] Compiling Main ( /home/daniel/.cache/intellij-haskell/lts-13/setup-exe-src/setup-mPHDZzAJ.hs, /home/daniel/.cache/intellij-haskell/lts-13/setup-exe-src/setup-mPHDZzAJ.o )
/home/daniel/.cache/intellij-haskell/lts-13/setup-exe-src/setup-mPHDZzAJ.hs:1:1: error:
Could not find module ‘Prelude’
There are files missing in the ‘base-4.12.0.0’ package.
The error arises because my system GHC is configured for dynamic linking, so the dynamic versions of all the needed libraries are registered, but Stack expects the (default) static libraries to be registered. The fix is either to (1) remove the system-ghc
option from the Stack invocation so that Stack will use a sandboxed compiler for tool building, or (2) add the GHC option -dynamic
to the Stack invocation, so that the build will expect the registered dynamic libraries. Unfortunately, I can’t find in my IntelliJ settings how to set the invocation.
Is the particular invocation for tool installation configurable by the user, and if so, how may I configure it?
Issue Analytics
- State:
- Created 4 years ago
- Comments:31 (19 by maintainers)
Top GitHub Comments
@friedbrice I want to prevent downloading and installing GHC (again) when it’s already available.
If you specify all four paths, then it won’t build anything (except your project, of course)