码迷,mamicode.com
首页 > 系统相关 > 详细

linux: ICE搭建

时间:2018-03-28 16:45:22      阅读:217      评论:0      收藏:0      [点我收藏+]

标签:linux

yum install gcc gcc-c++ glibc-headers -y
mkdir /usr/local/ice/bzip2 -pv
tar xf ThirdParty-Sources-3.5.1.tar.gz
cd ThirdParty-Sources-3.5.1 && ls
1、安装mcpp :

tar -zxvf mcpp-2.7.2.tar.gz

  #cd mcpp-2.7.2
  #./configure --prefix=/usr/local/ice/mcpp CFLAGS=-fPIC -enable-mcpplib -disable-shared
  #make && make install

2、安装 BerkeleyDB:

tar -zxf db-5.3.21.NC.tar.gz

 #cd db-5.3.21.NC/build_unix
 #../dist/configure --prefix=/usr/local/ice/db --enable-cxx --enable-java
 #make && make install

3、安装bzip2:

tar -zxf bzip2-1.0.6.tar.gz

#cd bzip2-1.0.6
#vi  Makefile  //编辑Makefile,
  1)将其中的PREFIX修改成 /usr/local/ice/bzip2 
  2)在其中的CFLAGS参数的值后添加 -fPIC 
#make && make install

4、安装expat:

tar -zxf expat-2.2.1.tar.bz2

#cd expat-2.2.1
#./configure --prefix=/usr/local/ice/expat 
#make && make install

5、安装openssl:

unzip openssl-master.zip

#cd openssl-master
#./config  --prefix=/usr/local/ice/openssl enable-shared  -fPIC
#make && make install

6、建立 lib64 到各依赖库的lib软连接(添加环境变量,让程序可以识别)
ln -s /usr/local/ice/mcpp/lib/ /usr/lib/
ln -s /usr/local/ice/db/lib/
/usr/lib/
ln -s /usr/local/ice/bzip2/lib/ /usr/lib/
ln -s /usr/local/ice/expat/lib/
/usr/lib/
ln -s /usr/local/ice/openssl/lib/* /usr/lib/
7、安装Ice-3.6.3

tar -zxvf Ice-3.6.3.tar.gz

#cd Ice-3.6.3/cpp
#vi config/Make.rules   // 编辑Make.rules文件
        # prefix ?= /opt/Ice-$(VERSION)
        prefix ?= /usr/local/ice/Ice-3.6.3
        #embedded_runpath_prefix ?= /opt/Ice-$(VERSION_MAJOR).$(VERSION_MINOR)
        embedded_runpath_prefix ?= /usr/local/ice/Ice-3.6.3
        BZIP2_HOME             ?= /usr/local/ice/bzip2
        DB_HOME ?= /usr/local/ice/db
        EXPAT_HOME ?= /usr/local/ice/expat
        OPENSSL_HOME ?= /usr/local/ice/openssl
        MCPP_HOME ?= /usr/local/ice/mcpp

#make && make install
#vi /etc/profile   //设置Ice-3.6.3的环境变量
    ICEJ_HOME=/usr/local/ice/Ice-3.6.3
    PATH=$ICEJ_HOME/bin:$PATH     
    export ICEJ_HOME PATH
#source /etc/profile 
#cd Ice-3.6.3/java
make && make install 

#遇到的问题:
1、编译cpp出错,添加参数 /usr/local/src/ice/ice-3.6.3/cpp/config/Make.rules.Linux
BASELIBS = -lIceUtil -lpthread -lrt -liconv
2、编译java出错,找不到db.jar ,在编译 BerkeleyDB 添加参数--enable-java
3、编译java出错, /usr/local/src/ice/ice-3.6.3/cpp/bin/slice2java command failed: 1
查出来是由于,实验是写错了路径,导致有些库找不到

linux: ICE搭建

标签:linux

原文地址:http://blog.51cto.com/11962757/2092055

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!