Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/haskell/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Haskell 堆栈:如何使用lts-13.2构建?我想使用更新的库_Haskell_Haskell Stack - Fatal编程技术网

Haskell 堆栈:如何使用lts-13.2构建?我想使用更新的库

Haskell 堆栈:如何使用lts-13.2构建?我想使用更新的库,haskell,haskell-stack,Haskell,Haskell Stack,我在Haskell的一些项目中使用stack。到现在为止,我没有遇到任何麻烦;但是由于lts-13.1,我得到了一个奇怪的构建错误 当我使用stack new foo&&cd foo设置一个新项目,然后运行stack setup--ghc build standard,我会收到一条巨大的重复错误消息: /usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libH

我在Haskell的一些项目中使用stack。到现在为止,我没有遇到任何麻烦;但是由于lts-13.1,我得到了一个奇怪的构建错误

当我使用
stack new foo&&cd foo
设置一个新项目,然后运行
stack setup--ghc build standard
,我会收到一条巨大的重复错误消息:

/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Interpreter.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(CheckUnload.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(CheckUnload.thr_o): requires dynamic R_X86_64_32 reloc against 'linker_unloaded_mutex' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Scav.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Scav.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Scav.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Scav.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Scav.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Scav.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Compact.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Compact.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Compact.thr_o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Evac_thr.thr_o): requires dynamic R_X86_64_32 reloc against 'stg_WHITEHOLE_info' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Evac_thr.thr_o): requires dynamic R_X86_64_32 reloc against 'stg_WHITEHOLE_info' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(MarkWeak.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(MarkWeak.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(MarkWeak.thr_o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Evac.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libHSrts_thr.a(Evac.thr_o): requires dynamic R_X86_64_32 reloc against 'stg_WHITEHOLE_info' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libCffi.a(ffi64.o): requires unsupported dynamic reloc 11; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libCffi.a(unix64.o): requires dynamic R_X86_64_PC32 reloc against 'abort' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libCffi.a(ffiw64.o): requires dynamic R_X86_64_32 reloc against 'ffi_closure_win64' which may overflow at runtime; recompile with -fPIC
…数百个相同的

/usr/bin/ld.gold: error: /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/lib/ghc-8.6.3/rts/libCffi.a(win64.o): requires dynamic R_X86_64_PC32 reloc against 'abort' which may overflow at runtime; recompile with -fPIC
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
`clang' failed in phase `Linker'. (Exit code: 1)

--  While building simple Setup.hs using:
      /home/georg/.stack/programs/x86_64-linux/ghc-8.6.3/bin/ghc -rtsopts -threaded -clear-package-db -global-package-db -hide-all-packages -package base -main-is StackSetupShim.mainOverride -package Cabal-2.4.0.1 /home/georg/.stack/setup-exe-src/setup-mPHDZzAJ.hs /home/georg/.stack/setup- 
   exe-src/setup-shim-mPHDZzAJ.hs -o /home/georg/.stack/setup-exe-cache/x86_64- 
   linux/tmp-Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.3
    Process exited with code: ExitFailure 1
我认为这与lts-13.1/2或我的Arch Linux/gcc安装有关,因为当我在
stack.yaml
中将
resolver:lts-13.2
更改为
resolver:lts-12.4
时,它构建得很好

我尝试了不同的
--ghc build
选项,但没有成功;在clang和gcc之间切换;我所有的堆栈和其他本地Haskell包都是最新的(我使用的是ArchLinux)

我想使用最新版本的Megaparsec 7.0.4,它不是lt-12.4(版本6.5)的一部分。我可以在stack/cabal中使用依赖项选项来解决这个问题,但我想知道为什么即使是一个空的/新的项目也不能在我的机器上使用lts-13.2构建(lts-13.1也不能工作)。与我的非常相似,但没有一个解决方案适合我


我错过了什么

显然,这是一个老问题的重现:

似乎有些配置工具在
~/.stack/programs/x86_64-linux/ghc-tinfo6-8.6.3/lib/ghc-8.6.3/settings中错误地设置了
(“C编译器支持-no pie”,“no”)
;将此手动更改为
YES
将允许我构建项目


所以这个问题显然是堆栈使用的一个生成器工具中的一个bug。注意这是一个“修补程序”;使用我提供的最新链接关注Github上的问题。

我不久前遇到过这个问题。老实说,我仍然有它:
堆栈设置
对于ghc-8-6-3(tinfo6变体)安装失败。不知何故,这似乎并不重要:我可以在同一个目录下运行
堆栈构建
,然后就可以了。我怀疑有一天它会咬我,但现在它起作用了。你能尝试一下,如果你真的可以在失败的安装后构建吗?不幸的是,它不适合我。但是我发现了一些信息,并将相应地更新我的问题。等等,刚才发生了什么。我清理了我的ghc-8-6-3安装以测试这一点,ghc运行正常-由于缺少导出列表而出现错误,所以我认为它可以工作。只是为了确保我已经修复了丢失的列表,它与完全相同的链接器错误爆炸。所以我以前做过一些事情让它工作。哦,好吧。我觉得自己很愚蠢。