Linux查看ice版本,转Linux下安装Ice过程

ICE在Linux下的完整编译安装

安装平台要求:最好用gcc

4.x版编译ICE,在Slackware下发现gcc3.3.6和gcc3.4.6都无法编译通过

为了方便管理,将ICE相关的软件都安装到/usr/local/ICE-3.3.0/目录下

首先 安装第三方包:ThirdParty-Sources-3.3.0.tar.gz

解压 ThirdParty-Sources-3.3.0.tar.gz

# cd ThirdParty-Sources-3.3.0

1)mcpp is a C/C++ preprocessor

------

解压 mcpp-2.7.2.tar.gz

# cd mcpp-2.7.2

或者# ./configure - CFLAGS=-fPIC

-enable-mcpplib(必须要有)

# ./configure --prefix=/usr/local/ICE-3.3.0/mcpp-2.7.2/

CFLAGS=-fPIC -enable-mcpplib -disable-shared

# make

# make install

2)Berkeley DB 是一个高性能的,嵌入数据库编程库,和C语言, C++,

Java, Perl, Python, Tcl以及其他很多语言都有绑定。

--------

解压 db-4.6.21.NC.tar.gz

# cd db-4.6.21.NC

# cd build_unix

或者# ../dist/configure

# ../dist/configure --prefix=/usr/local/ICE-3.3.0/BerkeleyDB.4.6/

-enable-cxx

# make

# make install

3)bzip2 是 Julian Seward 开发并按照自由软件/开源软件协议发布的数据压缩算法及程序

--------

解压 bzip2-1.0.5.tar.gz

# cd bzip2-1.0.5

修改Makefile,将PREFIX指向/usr/local/ICE-3.3.0/bzip2-1.0.5

# make

# make install

4) expat 是一个 XML parsing C library

--------

解压 expat-2.0.1.tar.gz

# cd expat-2.0.1

# ./configure --prefix=/usr/local/ICE-3.3.0/expat-2.0.1/

# make

# make install

5) openssl 是 Secure Socket Layer (SSL) binary and related

cryptographic tools

--------

解压 openssl-0.9.8g.tar.gz

# cd openssl-0.9.8g

# ./config --prefix=/usr/local/ICE-3.3.0/openssl

# make

# make install

现在正式安装 Ice-3.3.0.tar.gz

--------

解压 Ice-3.3.0.tar.gz

1) 编译 cpp版本:

# cd Ice-3.3.0/cpp

# vi config/Make.rules

## Select an installation

base directory. The directory will be

created# if it does not

exist.## prefix ?=

/opt/Ice-$(VERSION)prefix ?= /usr/local/ICE-3.3.0/Ice-$(VERSION)## The "root directory" for

runpath embedded in executables. Can be

unset# to avoid adding a

runpath to Ice executables.## embedded_runpath_prefix

?=

/opt/Ice-$(VERSION_MAJOR).$(VERSION_MINOR)embedded_runpath_prefix

?= /usr/local/ICE-3.3.0/Ice-$(VERSION_MAJOR).$(VERSION_MINOR)

...##

# If libbzip2 is not installed in a standard location where

the

# compiler can find it, set BZIP2_HOME to the bzip2

installation

# directory.

#

BZIP2_HOME ?= /usr/local/ICE-3.3.0/bzip2-1.0.5

# If Berkeley

DB is not installed in a standard location where

the# compiler can find it,

set DB_HOME to the Berkeley DB

installation#

directory.##DB_HOME ?= /opt/dbDB_HOME

?= /usr/local/ICE-3.3.0/BerkeleyDB.4.6## If expat is not

installed in a standard location where the

compiler# can find it, set

EXPAT_HOME to the expat installation

directory.##EXPAT_HOME ?=

/opt/expatEXPAT_HOME ?= /usr/local/ICE-3.3.0/expat-2.0.1## If OpenSSL is not

installed in a standard location where

the# compiler can find it, set OPENSSL_HOME to

the OpenSSL installation#

directory.##OPENSSL_HOME ?=

/opt/opensslOPENSSL_HOME ?= /usr/local/ICE-3.3.0/openssl## If Mcpp is not installed

in a standard location where the

compiler# can find it, set

MCPP_HOME to the Mcpp installation

directory.##MCPP_HOME ?=

/opt/mcppMCPP_HOME ?= /usr/local/ICE-3.3.0/mcpp-2.7.2

特别注意:

cpp/config/Make.rules的相关第三方库的路径

# make

# make install

2)编译python 版本

# cd Ice-3.3.0/py

# vi config/Make.rules

修改方法参考cpp部分描述

# make

# make install

设置ICE环境变量

#vi /etc/profile

export PYTHONPATH=/usr/local/ICE-3.3.0/Ice-3.3/python/:

export ICE_HOME=/usr/local/ICE-3.3.0/Ice-3.3

export PATH=$PATH:$ICE_HOME/bin

export LD_LIBRARY_PATH=$ICE_HOME/lib

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC

ICE_HOME

#source /etc/profile

方法2

tar zxvf ThirdParty-Sources-3.4.2.tar.gz

cd ThirdParty-Sources-3.4.2

#安装Berkeley DB

tar zxvf db-4.8.30.NC.tar.gz

cd db-4.8.30.NC/build_unix/

../dist/configure --prefix=/usr --enable-cxx

make

make install

#安装 bzip2-1.0.6.tar.gz

cd ../..

tar zxvf bzip2-1.0.6.tar.gz

cd bzip2-1.0.6

make install

#expat-2.0.1.tar.gz

cd ..

tar zxvf expat-2.0.1.tar.gz

cd expat-2.0.1

./configure

sudo make install

#安装openssl-0.9.8d.tar.gz

cd ..

tar zxvf openssl-0.9.8r.tar.gz

cd openssl-0.9.8r

./config --prefix=/usr --openssldir=/usr/openssl

make

make test

sudo make install

#安装mcpp

cd ..

tar zxvf mcpp-2.7.2.tar.gz

cd mcpp-2.7.2

//patch -p0 < ../mcpp/patch.mcpp.2.7.2

./configure --prefix=/usr/local/ICE-3.3.0/mcpp-2.7.2/

CFLAGS=-fPIC -enable-mcpplib -disable-shared

make

make install

#安装Ice

cd ../..

tar zxvf Ice-3.4.2.tar.gz

cd Ice-3.4.2/cpp

export LD_LIBRARY_PATH=/opt/Ice-3.4.2/lib

make

make install

/usr/local/ICE-3.3.0/mcpp-2.7.2/lib

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值