gpt4 book ai didi

haskell - ghc 8.0 cabal 构建错误 "ld: -r and -pie may not be used together"已知吗?

转载 作者:行者123 更新时间:2023-12-02 15:12:24 24 4
gpt4 key购买 nike

最近 ubuntu 机器上升级到 ghc 8.0 后,我收到以下构建错误:

/usr/bin/ld: -r and -pie may not be used together

同一问题的不同错误消息是:

relocation R_X86_64_32 against `.rodata' can not be used when making a > shared object; recompile with -fPIC

这是一个已知的错误吗?还有其他解决方案吗?

最佳答案

解决方案是使用链接器标志“-no-pie”:

cabal -v --ghc-option="-optl-no-pie" install cabal-install

怀疑这可能是在 ubuntu 上设置的隐式 LD 标志,并且存在某种冲突。

关于haskell - ghc 8.0 cabal 构建错误 "ld: -r and -pie may not be used together"已知吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39112219/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com