relocation R_X86_64_PC32 against symbol can not be used when making a shared object recompile with

錯誤:

/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 " \

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章