当前位置: 代码迷 >> 综合 >> 全网首发:relocation R_X86_64_PC32 against symbol can not be used when making a shared object recompile
  详细解决方案

全网首发:relocation R_X86_64_PC32 against symbol can not be used when making a shared object recompile

热度:34   发布时间:2023-12-11 17:50:25.0
  • 错误
/usr/bin/ld: /usr/local/lib/libavcodec.a(vc1dsp_mmx.o): relocation R_X86_64_PC32 against symbol `ff_pw_9' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
  • 解决办法

  网上所有教程,都说加-fPIC。大多情况下有用,个别情况下没用。比如编译FFmpeg。这个时候,你需要如下操作: 

# 没想到吧?大锅我要在这里export ECFLAG="-fPIC"
./configure \--extra-cflags="-fPIC "
  相关解决方案