ICE安装过程中碰到了一些列问题,总是报下面这种错误:

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的编译报错 libIce.so: undefined reference to `libiconv',解决: 

这个问题很恶心,是ICE自己makefile的问题,找到cpp/config/Makefile.rules中,找到193行 :

ICONV_LIBS              = $(if $(ICONV_HOME),-L$(ICONV_HOME)/$(libsubdir)) $(ICONV_LIB) 

把这一行修改成下面的就好了, ICONV_LIB根本没有定义

ICONV_LIBS              = $(if $(ICONV_HOME),-L$(ICONV_HOME)/$(libsubdir)) -liconv

(对此,我深表无语啊~~~~) 

 

ICE的安装没有configure的过程,要修改编译过中库的查找路径,要编辑 cpp/config/Makefile.rules这个文件,所有的库的位置都要在这里面指定。包括prefix

指定好了,直接在cpp下面make -j 16 && make install

 

 

相关文章:

  • 2021-09-25
  • 2022-01-07
  • 2021-07-29
  • 2021-11-30
  • 2021-11-13
  • 2021-08-23
  • 2022-02-10
  • 2022-02-16
猜你喜欢
  • 2022-12-23
  • 2021-09-16
  • 2021-12-26
  • 2021-08-08
  • 2021-05-23
  • 2021-12-14
  • 2022-03-09
相关资源
相似解决方案