ghc failed to compile a sanity check

I've recently been trying to use haskell-stack, but whenever i try to do stack setup i get

The GHC located at /home/piotrek/.stack/programs/x86_64-linux/ghc-8.0.1/bin/ghc failed to compile a sanity check. Please see:

http://docs.haskellstack.org/en/stable/install_and_upgrade/

for more information. Exception was: Running /home/piotrek/.stack/programs/x86_64-linux/ghc-8.0.1/bin/ghc /tmp/stack-sanity-check3118/Main.hs -no-user-package-db in directory /tmp/stack-sanity-check3118/ exited with ExitFailure 1

[1 of 1] Compiling Main ( /tmp/stack-sanity-check3118/Main.hs, /tmp/stack-sanity-check3118/Main.o ) Linking /tmp/stack-sanity-check3118/Main ...

/usr/bin/ld: /tmp/stack-sanity-check3118/Main.o: relocation R_X86_64_32S against symbol `stg_bh_upd_frame_info' can not be used when making a shared object; recompile with -fPIC

and many other messages like the last one about relocation. I use ubuntu 16.10, installed stack by apt-get.

链接地址: http://www.djcxy.com/p/43412.html

上一篇: 学习编写一个编译器

下一篇: ghc未能编制完整性检查