haskell - 堆栈安装在几乎任何东西上崩溃

标签 haskell crash haskell-stack

我正在尝试使用stack install tidal通过堆栈安装潮汐周期。
前几个依赖项的安装过程很顺利,但现在我明白了。

04:24 ~ stack install tidal
mersenne-random-pure64-0.2.2.0: configure
mersenne-random-pure64-0.2.2.0: build
network-2.6.3.2: configure
zlib-0.6.1.2: configure
zlib-0.6.1.2: build
Progress: 3/7
--  While building custom Setup.hs for package zlib-0.6.1.2 using:
      /home/mn/.stack/setup-exe-cache/x86_64-linux-tinfo6-nopie/Cabal-simple_mPHDZzAJ_2.0.1.0_ghc-8.2.2 --builddir=.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.1.0 build --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
    Logs have been written to: /home/mn/.stack/global-project/.stack-work/logs/zlib-0.6.1.2.log

    Configuring zlib-0.6.1.2...
    Preprocessing library for zlib-0.6.1.2..
    /usr/bin/ld.gold: error: .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.1.0/build/Codec/Compression/Zlib/Stream_hsc_make.o: requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
    /usr/bin/ld.gold: error: .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.1.0/build/Codec/Compression/Zlib/Stream_hsc_utils.o: requires dynamic R_X86_64_PC32 reloc against 'vprintf' which may overflow at runtime; recompile with -fPIC
    collect2: error: ld returned 1 exit status
    linking .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.1.0/build/Codec/Compression/Zlib/Stream_hsc_make.o failed (exit code 1)
    command was: /usr/bin/gcc .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.1.0/build/Codec/Compression/Zlib/Stream_hsc_make.o .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.1.0/build/Codec/Compression/Zlib/Stream_hsc_utils.o -o .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.1.0/build/Codec/Compression/Zlib/Stream_hsc_make -fuse-ld=gold -fno-PIE -fno-stack-protector -fuse-ld=gold -lz -L/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/bytestring-0.10.8.2 -Wl,-R,/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/bytestring-0.10.8.2 -L/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/deepseq-1.4.3.0 -Wl,-R,/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/deepseq-1.4.3.0 -L/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/array-0.5.2.0 -Wl,-R,/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/array-0.5.2.0 -L/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/base-4.10.1.0 -Wl,-R,/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/base-4.10.1.0 -L/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/integer-gmp-1.0.1.0 -Wl,-R,/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/integer-gmp-1.0.1.0 -lgmp -L/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/ghc-prim-0.5.1.1 -Wl,-R,/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/ghc-prim-0.5.1.1 -L/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/rts -Wl,-R,/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/rts -lm -lrt -ldl -lpthread


--  While building custom Setup.hs for package network-2.6.3.2 using:
      /tmp/stack17553/network-2.6.3.2/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.1.0/setup/setup --builddir=.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.1.0 configure --with-ghc=/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/bin/ghc --with-ghc-pkg=/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/home/mn/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-10.0/8.2.2/pkgdb --libdir=/home/mn/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-10.0/8.2.2/lib --bindir=/home/mn/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-10.0/8.2.2/bin --datadir=/home/mn/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-10.0/8.2.2/share --libexecdir=/home/mn/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-10.0/8.2.2/libexec --sysconfdir=/home/mn/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-10.0/8.2.2/etc --docdir=/home/mn/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-10.0/8.2.2/doc/network-2.6.3.2 --htmldir=/home/mn/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-10.0/8.2.2/doc/network-2.6.3.2 --haddockdir=/home/mn/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-10.0/8.2.2/doc/network-2.6.3.2 --dependency=base=base-4.10.1.0 --dependency=bytestring=bytestring-0.10.8.2 --dependency=unix=unix-2.7.2.2
    Process exited with code: ExitFailure 1
    Logs have been written to: /home/mn/.stack/global-project/.stack-work/logs/network-2.6.3.2.log

    [1 of 2] Compiling Main             ( /tmp/stack17553/network-2.6.3.2/Setup.hs, /tmp/stack17553/network-2.6.3.2/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.1.0/setup/Main.o )
    [2 of 2] Compiling StackSetupShim   ( /home/mn/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /tmp/stack17553/network-2.6.3.2/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.1.0/setup/StackSetupShim.o )
    Linking /tmp/stack17553/network-2.6.3.2/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.1.0/setup/setup ...
    Configuring network-2.6.3.2...
    configure: WARNING: unrecognized options: --with-compiler
    checking build system type... x86_64-pc-linux-gnu
    checking host system type... x86_64-pc-linux-gnu
    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/stack17553/network-2.6.3.2':
    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 mersenne-random-pure64-0.2.2.0 using:
      /home/mn/.stack/setup-exe-cache/x86_64-linux-tinfo6-nopie/Cabal-simple_mPHDZzAJ_2.0.1.0_ghc-8.2.2 --builddir=.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.1.0 build --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
    Logs have been written to: /home/mn/.stack/global-project/.stack-work/logs/mersenne-random-pure64-0.2.2.0.log

    Configuring mersenne-random-pure64-0.2.2.0...
    Preprocessing library for mersenne-random-pure64-0.2.2.0..
    /usr/bin/ld.gold: error: .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.1.0/build/System/Random/Mersenne/Pure64/Base_hsc_make.o: requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
    /usr/bin/ld.gold: error: .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.1.0/build/System/Random/Mersenne/Pure64/Base_hsc_utils.o: requires dynamic R_X86_64_PC32 reloc against 'vfprintf' which may overflow at runtime; recompile with -fPIC
    collect2: error: ld returned 1 exit status
    linking .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.1.0/build/System/Random/Mersenne/Pure64/Base_hsc_make.o failed (exit code 1)
    command was: /usr/bin/gcc .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.1.0/build/System/Random/Mersenne/Pure64/Base_hsc_make.o .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.1.0/build/System/Random/Mersenne/Pure64/Base_hsc_utils.o -o .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.1.0/build/System/Random/Mersenne/Pure64/Base_hsc_make -fuse-ld=gold -fno-PIE -fno-stack-protector -fuse-ld=gold -L/home/mn/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-10.0/8.2.2/lib/x86_64-linux-ghc-8.2.2/random-1.1-LLUGZ7T9DqQ5vN0Jbcd0We -Wl,-R,/home/mn/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-10.0/8.2.2/lib/x86_64-linux-ghc-8.2.2/random-1.1-LLUGZ7T9DqQ5vN0Jbcd0We -L/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/time-1.8.0.2 -Wl,-R,/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/time-1.8.0.2 -L/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/deepseq-1.4.3.0 -Wl,-R,/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/deepseq-1.4.3.0 -L/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/array-0.5.2.0 -Wl,-R,/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/array-0.5.2.0 -L/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/base-4.10.1.0 -Wl,-R,/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/base-4.10.1.0 -L/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/integer-gmp-1.0.1.0 -Wl,-R,/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/integer-gmp-1.0.1.0 -lgmp -L/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/ghc-prim-0.5.1.1 -Wl,-R,/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/ghc-prim-0.5.1.1 -L/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/rts -Wl,-R,/home/mn/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.2/lib/ghc-8.2.2/rts -lm -lrt -ldl -lpthread
✘ 04:24 ~ 

谷歌搜索了一下,发现了一些东西,尝试了一些东西,但是都没有用,我迷路了。

任何帮助表示赞赏,谢谢。

最佳答案

我猜您正在使用Arch Linux。

我正在尝试针对stack setup中的此问题和相关问题提出全面的解决方案,但是我相信最简单的操作方法是将其添加到~/.stack/config.yaml中:

ghc-build: tinfo6

您可能需要运行stack setup --reinstall才能强制重新安装。

关于haskell - 堆栈安装在几乎任何东西上崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47961876/

相关文章:

libgdx - 创建按钮时,LibGDX崩溃

ios - 应用内购买在发布后使​​应用崩溃

java - Android 应用程序在 onActivityResult 方法中崩溃

haskell - 堆栈没有正确解决依赖关系

haskell - 使用 Haskell 列表理解获得积分立方体

objective-c - 如何在 iOS/OS X 中将 HTML 转换为 Markdown?有什么方法可以在应用程序中使用 pandoc 吗?

haskell - 为什么在 Haskell 中正确折叠时打印会影响顺序?

haskell - 如何在镜头中使用过载的记录场?

haskell-stack - QuickCheck 属性的 DRY 类型注释

haskell - 在 haskell 中使用分析运行堆栈