Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/59.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C 错误:针对`.rodata';何时构建AV1 AOM项目_C_Linux_Linker - Fatal编程技术网

C 错误:针对`.rodata';何时构建AV1 AOM项目

C 错误:针对`.rodata';何时构建AV1 AOM项目,c,linux,linker,C,Linux,Linker,当我在VMWare(Ubuntu)中编译aom项目时,主机PC使用的是AMD ryzen 1600。 出现以下错误: [ 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 w

当我在VMWare(Ubuntu)中编译aom项目时,主机PC使用的是AMD ryzen 1600。 出现以下错误:

[ 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

用-fPIC重新编译
@user253751是的,我试过-fPIC。我使用这个cmd:
find-name'flags.make'| xargs perl-pi-e's |-Wall |-Wall-fPIC | g'
将-fPIC添加到每个C|U标志和CXX|FALG中,然后生成项目。这是同样的错误。那么下一步是什么?谢谢谁说这个命令有效?@user253751那么如何正确添加-fPIC呢?我只是尝试了另一种方法:修改这两个文件
build/cmake/aom\u configure.cmake
configure
以添加-fPIC,但它出错了。非常感谢你使用的是cmake,对吗?