Yesod haskell-stack安装-fPIC

时间:2016-12-29 23:42:43

标签: linux haskell cabal archlinux haskell-stack

这是我第一次尝试安装Haskell yesod但是当我在Arch Linux上使用这些命令时遇到了一些问题

yesod devel 


stack exec -- yesod devel


/usr/bin/ld: /home/romano/.stack/programs/x86_64-linux/ghc-tinfo6-7.10.3/lib/ghc-7.10.3/rts/libHSrts.a(Scav.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/romano/.stack/programs/x86_64-linux/ghc-tinfo6-7.10.3/lib/ghc-7.10.3/rts/libHSrts.a(Compact.o): relocation R_X86_64_32S against symbol `mblock_cache' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/romano/.stack/programs/x86_64-linux/ghc-tinfo6-7.10.3/lib/ghc-7.10.3/rts/libHSrts.a(GCAux.o): relocation R_X86_64_32S against symbol `mblock_cache' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/romano/.stack/programs/x86_64-linux/ghc-tinfo6-7.10.3/lib/ghc-7.10.3/rts/libHSrts.a(MarkWeak.o): relocation R_X86_64_32S against symbol `stg_DEAD_WEAK_info' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/romano/.stack/programs/x86_64-linux/ghc-tinfo6-7.10.3/lib/ghc-7.10.3/rts/libCffi.a(closures.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/romano/.stack/programs/x86_64-linux/ghc-tinfo6-7.10.3/lib/ghc-7.10.3/rts/libCffi.a(ffi64.o): relocation R_X86_64_32S 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
Exit code ExitFailure 1 while running ["ghc","-clear-package-db","-global-package-db","-hide-all-packages","-package","base","-package","Cabal-1.22.5.0","/tmp/stack16245/Setup.hs","-o","/home/romano/.stack/setup-exe-cache/x86_64-linux-tinfo6/tmp-setup-Simple-Cabal-1.22.5.0-ghc-7.10.3","-rtsopts"] in /tmp/stack16245/
ExitFailure 1
Type help for available commands. Press enter to force a rebuild.

现在我不确定为什么会这样,但我认为我的数据库设置错误

1 个答案:

答案 0 :(得分:0)

某些用户遇到了似乎依赖于本地环境的链接器错误,即包可能在不同的计算机上编译。据报道,这个问题在某些情况下是不确定的。

该问题可能与某些情况下使用强化标志有关,特别是与生成与位置无关的可执行文件(PIE)相关的标志。

在Arch Linux中,对此的支持由加固包装程序包提供。可能的解决方法:

sudo vim /etc/hardening-wrapper.conf

* vim,nan,emacs或您喜欢的任何编辑器。

HARDENING_PIE=1更改为HARDENING_PIE=0
保存它。

就是这样。