我正在尝试用stack (特别是haskell-ide-engine和hlint )构建一些Haskell包,但它们都失败了,并显示了许多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的链接器,或者用其他方法修复错误?
谢谢!
发布于 2021-01-06 05:36:26
请参阅stack自己的常见问题解答中的this答案!
https://stackoverflow.com/questions/59418067
复制相似问题