我正在尝试使用stack(特别是)构建一些 Haskell 包haskell-ide-engine,hlint但它们都失败并出现许多ld.lld错误消息,所有错误消息都与R_X86_64_32S重定位有关,例如:
ld.lld: error: can't create dynamic relocation R_X86_64_32S against symbol: stg_bh_upd_frame_info in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in /home/kas/.stack/programs/x86_64-linux/ghc-tinfo6-8.6.5/lib/ghc-8.6.5/rts/libHSrts_thr.a(Updates.thr_o)
>>> referenced by /home/kas/.stack/setup-exe-src/setup-shim-mPHDZzAJ.o:(s6WS_info)
我尝试配置stack为使用不同的链接器(使用ghc-options标志),但我无法让它工作,它总是使用lld.
有谁知道我可以如何更改stack链接器,或以其他方式修复错误?
谢谢!