LAMP编译:解決 64 CPU 位元 compiler 時 zlib 出现/usr/local/lib/libz.a(crc32.o)造成的問題 .

文章来源:http://superswz.blog.163.com/blog/static/3324850520077392830407/

 

/usr/bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value

解决方法如下:

cd zlib-1.2.3 //进入zlib目录
CFLAGS="-O3 -fPIC" ./configure   //使用64位元的方法进行编译
make
make install
make clean

你可能感兴趣的:(object,compiler,X86)