haskell - 堆栈构建失败并出现 LLD 错误
问题描述
我正在尝试使用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
链接器,或以其他方式修复错误?
谢谢!
解决方案
请在自己的常见问题解答中查看此答案stack
!
推荐阅读
- python - 为什么 ArangoDB(使用 Python-Arango)返回 ERR 1600 ERROR_CURSOR_NOT_FOUND?
- html - kableExtra column_spec 宽度不起作用
- javascript - 如何使用 javascript 或 jquery 在另一个数组中组合数组?
- git - 如何删除 git 子树前缀?
- r - 从 R 中的术语文档矩阵中删除出现最多和最少的术语
- python - 捕获所有不以 < 开头的 * 组
- d3.js - D3 js 鼠标悬停/鼠标悬停
- php - 试图在ajax上获得PHP响应
- java - 在单独的控制台/cmd 窗口中显示使用 JSch 执行的 SSH 命令的结果,而不是在 IDE 控制台中
- python - Python:如何获取列表中的对象,然后返回该对象的值(这是一个变量)?