stack setup fails with libgmp in nonstandard location

65 views
Skip to first unread message

Stephan Schiffels

unread,
Apr 11, 2017, 3:18:52 PM4/11/17
to haskell-stack
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

Stephan Schiffels

unread,
Jun 2, 2017, 10:37:22 AM6/2/17
to haskell-stack
Sorry, but does someone know any help here? 

Michael Snoyman

unread,
Jun 5, 2017, 5:44:50 AM6/5/17
to Stephan Schiffels, haskell-stack
Does setting LD_LIBRARY_PATH fix the problem?

--
You received this message because you are subscribed to the Google Groups "haskell-stack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haskell-stack+unsubscribe@googlegroups.com.
To post to this group, send email to haskel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/haskell-stack/040525cf-98e4-4715-834b-67fea3554aad%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages