2016-12-29 112 views
0

這是我第一次嘗試安裝哈斯克爾耶索德但我通過一些問題,運行時我使用Arch Linux的耶索德哈斯克爾堆疊安裝-fPIC

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. 

現在我不知道爲什麼會這樣,但我THI nk我的數據庫設置有誤

+0

你是如何創建你的yesod項目的? – Sibi

+0

我遵循本指南http://www.yesodweb.com/page/quickstart – Romano

+0

您必須像這樣運行devel命令:'stack exec - yesod devel' – Sibi

回答

0

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

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

在Arch Linux中,對此的支持由強化包裝程序包提供。可能的解決方法:

sudo vim /etc/hardening-wrapper.conf 

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

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

就是這樣。