0
编辑GraphicsMagick时提示”can not be used when making a shared object”
Posted in Linux at 十一月 20th, 2012 / No Comments »
在台式机上编译GraphicsMagick-1.3.12和gmagick-1.1.1RC1通过,换笔记本就编译出错了,同样是redhat 6.3_64的环境。
错误如下:
relocation R_X86_64_32 against `.rodata’ can not be used when making a shared object;recompile with -fPIC
在网上搜索到类似的错误,解决方法是修改MakeFile, 在CFLAGS之后加上 -fPIC,结果还是没用。后来找到篇
HOWTO fix -fPIC errors解决了这个问题:
export CC=”gcc -fPIC”
export CXX=”g++ -fPIC”
make distclean
./configure
make && make install
http://jaytaylor.com/blog/2010/10/06/howto-fix-fpic-errors/
can not be used when making a shared object