分类: 嵌入式
2014-07-18 14:00:27
relocation R_X86_64_32 against `.rodata' can not be used when making a shared object;
我在编译VLC时遇到这个问题:
relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
... could not read symbols: Bad value
编译器提示:recompile with -fPIC
两种方式:
(1)在makefile文件里的CFLAGS里加上 -fPIC选项,这样可以一劳永逸
(2)如果你的makefile很大,CFLAGS也不明确,那就在配置时手动加上,即:
$CFLAGS="-fPIC" ./configure ..............
如果这样还不行,你需要试一下sudo
即:
$sudo CFLAGS="-fPIC" ./configure ..............