日期:2014-05-16  浏览次数:20742 次

ICE在Linux下的完整编译安装
ICE在Linux下的完整编译安装
  安装平台要求:最好用gcc 4.x版编译ICE,在Slackware下发现gcc3.3.6和gcc3.4.6都无法编译通过
  为了方便管理,将ICE相关的软件都安装到/usr/local/ICE-3.3.0/目录下
  安装python
  
  ./configure --enable-shared
  make
  make install
  
  
  
  首先 安装第三方包: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 --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 --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 ?= /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/db
  DB_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/expat
  EXPAT_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/openssl
  OPENSSL_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/mcpp
  MCPP_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
  #