繁体   English   中英

Haskell Stack的ghc-mod安装在旧时间和时钟失败

[英]Haskell Stack install of ghc-mod fails at old time and clock

通过堆栈安装ghc-mod失败。 我尝试了所有我发现无法通过谷歌搜索的解决方案。 我安装了快乐和亚历克斯。 我发现的所有其他解决方案都已使用1-2年,与升级到GHC 8有关。

错误输出

堆栈安装ghc-mod

时钟-0.7.2:配置

时钟0.7.2:建立

old-time-1.1.0.3:配置

旧时日志

 -- While building custom Setup.hs for package old-time-1.1.0.3 using: /tmp/stack23769/old-time-1.1.0.3/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/setup/setup --builddir=.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0 configure --with-ghc=/home/ian/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/bin/ghc --with-ghc-pkg=/home/ian/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/home/ian/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.18/8.0.2/pkgdb --libdir=/home/ian/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.18/8.0.2/lib --bindir=/home/ian/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.18/8.0.2/bin --datadir=/home/ian/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.18/8.0.2/share --libexecdir=/home/ian/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.18/8.0.2/libexec --sysconfdir=/home/ian/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.18/8.0.2/etc --docdir=/home/ian/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.18/8.0.2/doc/old-time-1.1.0.3 --htmldir=/home/ian/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.18/8.0.2/doc/old-time-1.1.0.3 --haddockdir=/home/ian/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.18/8.0.2/doc/old-time-1.1.0.3 --dependency=base=base-4.9.1.0 --dependency=old-locale=old-locale-1.0.0.7-KGBP1BSKxH5GCm0LnZP04j Process exited with code: ExitFailure 1 Logs have been written to: /home/ian/.stack/global-project/.stack-work/logs/old-time-1.1.0.3.log [1 of 2] Compiling Main ( /tmp/stack23769/old-time-1.1.0.3/Setup.hs, /tmp/stack23769/old-time-1.1.0.3/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/setup/Main.o ) [2 of 2] Compiling StackSetupShim ( /home/ian/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /tmp/stack23769/old-time-1.1.0.3/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/setup/StackSetupShim.o ) Linking /tmp/stack23769/old-time-1.1.0.3/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/setup/setup ... Configuring old-time-1.1.0.3... configure: WARNING: unrecognized options: --with-compiler checking for gcc... /usr/bin/gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... configure: error: in `/tmp/stack23769/old-time-1.1.0.3': configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details 

时钟记录

 -- While building custom Setup.hs for package clock-0.7.2 using: /home/ian/.stack/setup-exe-cache/x86_64-linux-tinfo6-nopie/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0 build --ghc-options " -ddump-hi -ddump-to-file" Process exited with code: ExitFailure 1 Logs have been written to: /home/ian/.stack/global-project/.stack-work/logs/clock-0.7.2.log Configuring clock-0.7.2... Building clock-0.7.2... Preprocessing library clock-0.7.2... /tmp/stack23769/clock-0.7.2/Clock.hsc:44:0: warning: "hsc_alignment" redefined /tmp/stack23769/clock-0.7.2/In file included from .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/build/System/Clock_hsc_make.c:1:0: /home/ian/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/lib/ghc-8.0.2/template-hsc.h:88:0: note: this is the location of the previous definition #define hsc_alignment(t...) \\ /usr/bin/ld: .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/build/System/Clock_hsc_make.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status linking .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/build/System/Clock_hsc_make.o failed (exit code 1) command was: /usr/bin/gcc .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/build/System/Clock_hsc_make.o .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/build/System/Clock_hsc_utils.o -o .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/build/System/Clock_hsc_make -fno-PIE -fno-stack-protector -L/home/ian/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/lib/ghc-8.0.2/base-4.9.1.0 -Wl,-R,/home/ian/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/lib/ghc-8.0.2/base-4.9.1.0 -L/home/ian/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/lib/ghc-8.0.2/integer-gmp-1.0.0.1 -Wl,-R,/home/ian/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/lib/ghc-8.0.2/integer-gmp-1.0.0.1 -lgmp -L/home/ian/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/lib/ghc-8.0.2/ghc-prim-0.5.0.0 -Wl,-R,/home/ian/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/lib/ghc-8.0.2/ghc-prim-0.5.0.0 -L/home/ian/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/lib/ghc-8.0.2/rts -Wl,-R,/home/ian/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/lib/ghc-8.0.2/rts -lm -lrt -ldl -lpthread 

您在使用arch Linux吗? 这是解决此问题的新方法: https : //github.com/commercialhaskell/stack/blob/2a715639fe20b5dccb84f6a37ed54d650fdcf119/doc/faq.md#i-get-strange-ld-errors-about-recompiling-with--fpic

解决此问题的旧方法是将ghc-build: tinfo6添加到~/.stack/config.yaml ,但这需要再次下载并安装ghc。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM