relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
总结起来是config的问题,总结几点如下:
openssl的安装:
./config -fPIC shared --prefix=/home/admin/local --openssldir=/home/admin/local/openssl && make -j 8 && make install
mcpp的安装:
./configure CFLAGS=-fPIC --enable-mcpplib --disable-shared --prefix=/home/admin/local
BDB(BerkeleyDB)的安装报错:include/db_cxx.h:60:23: error: exception.h:No such file or directory,解决:
../dist/configure --prefix=/home/admin/local/ --enable-cxx
这个问题很恶心,是ICE自己makefile的问题,找到cpp/config/Makefile.rules中,找到193行 :
ICONV_LIBS = $(if $(ICONV_HOME),-L$(ICONV_HOME)/$(libsubdir)) $(ICONV_LIB)
把这一行修改成下面的就好了, ICONV_LIB根本没有定义
(对此,我深表无语啊~~~~)
ICE的安装没有configure的过程,要修改编译过中库的查找路径,要编辑 cpp/config/Makefile.rules这个文件,所有的库的位置都要在这里面指定。包括prefix
指定好了,直接在cpp下面make -j 16 && make install