Hi, I am trying to install a package and so far fail in the "stack setup" step. Here is the error:
$ stack setup
The GHC located at /home/ss839/.stack/programs/x86_64-linux/ghc-gmp4-8.0.1/bin/ghc failed to compile a sanity check. Please see:
for more information. Exception was:
Running /home/ss839/.stack/programs/x86_64-linux/ghc-gmp4-8.0.1/bin/ghc /tmp/stack-sanity-check30968/Main.hs -no-user-package-db in directory /tmp/stack-sanity-check30968/ exited with ExitFailure 1
[1 of 1] Compiling Main ( /tmp/stack-sanity-check30968/Main.hs, /tmp/stack-sanity-check30968/Main.o )
Linking /tmp/stack-sanity-check30968/Main ...
/usr/bin/ld: cannot find -lgmp
collect2: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
The problem is that libgmp is in a non-standard location: /opt/gmp-6.1.1/lib. I know how I can point "stack build" to that location, using --extra-lib-dirs. But there doesn't seem to be such an option for stack setup, is there?
Any help is much appreciated, thanks!
Stephan