0

When I compile my aom project in my VMWare(Ubuntu), host PC is using AMD ryzen 1600. It comes to this Error:

[ 63%] Built target yuv
[ 64%] Linking CXX executable examples/decode_with_drops
/usr/bin/ld: libaom.a(fwd_txfm_ssse3_x86_64.asm.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: libaom.a(quantize_ssse3_x86_64.asm.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: libaom.a(subpel_variance_sse2.asm.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: libaom.a(highbd_subpel_variance_impl_sse2.asm.o): relocation R_X86_64_32 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
CMakeFiles/decode_with_drops.dir/build.make:144: recipe for target 'examples/decode_with_drops' failed
make[2]: *** [examples/decode_with_drops] Error 1
CMakeFiles/Makefile2:304: recipe for target 'CMakeFiles/decode_with_drops.dir/all' failed
make[1]: *** [CMakeFiles/decode_with_drops.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Wayne Chen
  • 305
  • 2
  • 15
  • `recompile with -fPIC` – user253751 Mar 17 '20 at 15:05
  • @user253751 yeah, I've tried -fPIC. I used this cmd:`find -name 'flags.make' | xargs perl -pi -e 's|-Wall|-Wall -fPIC|g'` to add -fPIC into every C_FLAGS and CXX_FALG, and then make the project. It comes to the same error. So what's the next? thanks – Wayne Chen Mar 18 '20 at 14:27
  • who says that command works? – user253751 Mar 18 '20 at 14:31
  • @user253751 So how to add -fPIC correctly? I just tried another way: modify this two files `build/cmake/aom_configure.cmake` and `configure` to add -fPIC, but it went wrong. Thanks a lot – Wayne Chen Mar 18 '20 at 15:03
  • You are using cmake, right? https://stackoverflow.com/questions/38296756/what-is-the-idiomatic-way-in-cmake-to-add-the-fpic-compiler-option https://stackoverflow.com/questions/39195955/how-to-configure-cmake-to-build-a-library-with-fpic – user253751 Mar 18 '20 at 15:04

0 Answers0