合并openjpeg/soxr/vidstab/snappy等多个cmake库时,为了解决下述问题: relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC分别验证过以下二种方法 第一种 (笔者所采用的,因需修改原始CMakeLists.txt文件,感觉不太方便,非常希望能在cmake命令参数中处理) add_compile_options(-
在已经存在python安装环境的情况下,当安装第三方的包的时候出现报错提示 /usr/bin/ld: .../lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 against 'a local symbol' can not be used when making a shared object; recompile with -fPIC .../lib/libpython2.7.a: could not read symbols: B
gcc -shared -o hack.so hack.c/usr/bin/ld: /tmp/ccUZREwA.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC/tmp/ccUZREwA.o: could not read symbols: Bad valuecollect2: ld returned 1 exit
在新公司工作第四天,依然要编译FFmpeg,不同的是难度大了,以前遇到什么参数编译不过的,就去掉,因为不是专业做视频的,但是新公司绕不过了. 编译FFmpeg动态库的时候发现链接某些静态库的时候会报错: relocation R_X86_64_32S against `cmnMemAlloc' can not be used when making a shared object; recompile with -fPIC 基础不扎实,不知道make的时候还可以添加参数,查了很多资料,最后从一个