Cabal安装在Linker阶段失败



我正试图安装这个图形库,但cabal安装给了我这个错误列表(只显示列表的底部,因为上面的内容都很长而且很相似(:

/usr/bin/ld:
/usr/local/haskell/ghc-8.0.2-x86_64/lib/ghc-8.0.2/rts/libHSrts_thr.a(MarkWeak.thr_o):
relocation R_X86_64_32S against symbol `stg_END_TSO_QUEUE_closure' can not be
used when making a PIE object; recompile with -fPIC
/usr/bin/ld:
/usr/local/haskell/ghc-8.0.2-x86_64/lib/ghc-8.0.2/rts/libHSrts_thr.a(Evac.thr_o):
relocation R_X86_64_32 against symbol `stg_WHITEHOLE_info' can not be used
when making a PIE object; recompile with -fPIC
/usr/bin/ld:
/usr/local/haskell/ghc-8.0.2-x86_64/lib/ghc-8.0.2/rts/libCffi.a(closures.o):
relocation R_X86_64_32 against `.rodata' can not be used when making a PIE
object; recompile with -fPIC
/usr/bin/ld:
/usr/local/haskell/ghc-8.0.2-x86_64/lib/ghc-8.0.2/rts/libCffi.a(ffi64.o):
relocation R_X86_64_32S against `.rodata' can not be used when making a PIE
object; recompile with -fPIC
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
)

到目前为止,我已经确定问题是由安装程序试图制作一个与位置无关的可执行文件(PIE(引起的。我试图通过将DEB_BUILD_HARDENING_PIE环境变量设置为0export DEB_BUILD_HARDENING_PIE=0来解决这个问题,但它给出了相同的错误。

我正在运行Debian,ghc-8.0.2和cabal 1.24.2.0。

我没有编辑DEB_BUILD_HARDENING_PIE环境变量,而是找到了另一种方法,让cabal安装而不是制作PIE,这似乎解决了这个问题。

cabal --ghc-option="-optl-no-pie" install chart-diagrams

相关内容

  • 没有找到相关文章

最新更新