簡體   English   中英

Yesod haskell-stack安裝-fPIC

[英]Yesod haskell-stack installing -fPIC

這是我第一次嘗試安裝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.

現在我不確定為什么會發生這種情況,但是我認為我的數據庫設置錯誤

一些用戶遇到了鏈接器錯誤,這些錯誤似乎取決於本地環境,即,程序包可能在不同的計算機上編譯。 據報道,在某些情況下,該問題是不確定的。

在某些情況下,該問題可能與使用硬化標志有關,特別是與生成位置獨立可執行文件(PIE)有關的硬化標志。

在Arch Linux中, hardening-wrapper軟件包對此提供了支持。 可能的解決方法:

sudo vim /etc/hardening-wrapper.conf

* vim,nan,emacs或您喜歡的任何編輯器。

HARDENING_PIE=1更改為HARDENING_PIE=0
保存。

而已。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM