Linux怎么查看ice环境,ubuntu15.04下搭建Ice3.4.1开发环境

由于工作需要,需要在我的64位的ubuntu15.04上搭建Ice3.4.1的开发环境。经过几天的断断续续的百度谷歌终于把它搭建起来。发现自己无论做什么,完全按照网上的步骤来,但总会遇到各种问题,无法像网上给出的步骤那样顺利安装。好了,废话少说,下面开始。

1.首先给出ice的官网,后面需要的资料都会在这里下载:https://zeroc.com/。

2.由于开始接触ice,所以我先安装了ice3.6。其实3.6的安装步骤是很简单,官网已经给出了。步骤如下:

Ubuntu 15.04

wget https://zeroc.com/download/GPG-KEY-zeroc-release

sudo apt-key add GPG-KEY-zeroc-release

sudo apt-add-repository "deb https://zeroc.com/download/apt/ubuntu15.04 stable main"

sudo apt-get update

sudo apt-get install zeroc-ice-all-runtime zeroc-ice-all-dev

3.但我需要的是3.4.1,所以体验完就要卸载了:

sudo apt-get remove --purge zeroc-ice-all-runtime zeroc-ice-all-dev

sudo apt-get autoremove --purge zeroc-ice-all-runtime zeroc-ice-all-dev

4.下载ice3.4.1,地址:https://zeroc.com/download/Ice/3.4/

需要下载的包括:Ice-3.4.1.tar.gz 和ThirdParty-Sources-3.4.1.tar.gz其中ThirdParty-Sources-3.4.1.tar.gz 是所需的第三方库,有点坑爹的是,我当时没有注意到官网也有提供,所以到各个第三方库的官网去找,浪费了很多时间。下面是安装步骤:

4.1 解压Ice-3.4.1.tar.gz到/opt/Ice-3.4.1;解压ThirdParty-Sources-3.4.1.tar.gz。

4.2编译安装第三方库

解压:tar xzf 文件名

bzip2-1.0.5:

cd bzip2-1.0.5

修改Makefile:PREFIX=/opt/Ice-3.4.1/bzip2-1.0.5

make

make install

mcpp-2.7.2:

./configure --prefix=/opt/Ice-3.4.1/mcpp-2.7.2/ CFLAGS=-fPIC -enable-mcpplib -disable-shared

make

make install

db-4.8.30:

cd db-4.8.30.NC/build_unix/

../dist/configure --prefix=/opt/Ice-3.4.1/db-4.8.30 -enable-cxx

make

make install

expat-2.0.1:

./configure --prefix=/opt/Ice-3.4.1/expat-2.0.1

make

make install

openssl:

./config --prefix=/opt/Ice-3.4.1/openssl

make

make install

5.安装ice3.4.1

5.1修改Ice-3.4.1/cpp/config/Make.rules

BZIP2_HOME              ?=/opt/Ice-3.4.1/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/Ice-3.4.1/BerkeleyDB.6.1

DB_HOME         ?=/opt/Ice-3.4.1/db-4.8.30

#

# 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/Ice-3.4.1/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/Ice-3.4.1/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/Ice-3.4.1/mcpp-2.7.2

5.2编译:make

发生错误:

1.各种缺少头文件,手动添加。

2.到最后如果显示跟 upCast 有关的错误。则需要到https://forums.zeroc.com/forum/patches/5799-patch-for-compiling-ice-with-clang-and-gcc4-7?t=5647下载补丁,打完补丁后,重新编译。中间可能会有跟XXX.o找不到的错误有关,我这里是有些需要lib64,所以将第三方支持库的一些lib改为lib64,后面如遇到symbol bad什么的错误,就将对应的库删掉。

5.3 make install

6.配置/etc/profile

export ICE_HOME=/opt/Ice-3.4.1

export PATH=$ICE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ICE_HOME/lib64:$LD_LIBRARY_PATH

7.test

icegridnode -v

3.4.1

到此,64位ubuntu15.04下的Ice3.4.1编译安装成功。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值