Complete Compilation and installation of ice in Linux
Installation Platform requirements: it is best to use GCC version 4. x to compile ice. In slackware, it is found that gcc3.3.3.6 and gcc3.4.6 cannot be compiled
To facilitate management, install all ice-related software in the/usr/local/ice-3.3.0/directory.
First install third-party package: ThirdParty-Sources-3.3.0.tar.gz
Extract ThirdParty-Sources-3.3.0.tar.gz
# Cd ThirdParty-Sources-3.3.0
1) mCPP is a C/C ++ Preprocessor
------
Extract 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 is a high-performance, embedded database programming library that is bound to C, C ++, Java, Perl, Python, TCL, and many other languages.
--------
Extract 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 is a data compression developed by Julian Seward and released in accordance with the Free Software/open source software protocol. Algorithm And Program
--------
Extract bzip2-1.0.5.tar.gz
# Cd bzip2-1.0.5
Modify makefile to point prefix to/usr/local/ice-3.3.0/bzip2-1.0.5
# Make
# Make install
4) expat is an XML parsing C library
--------
Extract 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 is Secure Socket Layer (SSL) binary and related cryptographic tools
--------
Extract openssl-0.9.8g.tar.gz
# Cd openssl-0.9.8g
#./Config -- prefix =/usr/local/ice-3.3.0/OpenSSL
# Make
# Make install
Now officially install Ice-3.3.0.tar.gz
--------
Extract Ice-3.3.0.tar.gz
1) Compile the CPP version:
# 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
# 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
# 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
# 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
...
Note: the path of the third-party library related to CPP/config/make. Rules
# Make
# Make install
2) Compile the Python version
# Cd ice-3.3.0/Py
# Vi config/make. Rules
For the modification method, refer to the CPP section.
# Make
# Make install
Set ice Environment Variables
# 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
++
Before installing ice3.4.2, you should download and install its dependent libraries.
1. Download third-party package and ice source file: http://www.zeroc.com/download.html (Official download page)
Download the source file: Ice-3.4.2.tar.gz in the source distributions column; select the thirdparty-sources-3.4.2.tar.gz third-party compressed package download in the third-party source code column.
2. install third-party dependent Libraries
Decompress thirdparty-sources-3.4.2.tar.gz: tar-xzvf ThirdParty-Sources-3.4.2.tar.gz.
2.1) install Berkeley DB
$ Tar zxvf db-4.8.30.NC.tar.gz
$ D db-4.8.30.NC/build_unix
$ ../Dist/configure -- prefix =/usr -- enable-cxx
(Note: The default installation prefix path for dB is/usr/local/berkeleydb.4.6, which must be changed to/usr; otherwise, the path cannot be found during make ice)
$ Make # compile
$ Sudo make install # Install
2.2) install bzip2-1.0.6.tar.gz
$ Tar zxvf bzip2-1.0.6.tar.gz
$ Bzip2-1.0.6 CD
$ Make install
2.3) install expat-2.0.1.tar.gz
$ Tar zxvf expat-2.0.1.tar.gz
$ Expat-2.0.1 CD
$./Configure
$ Sudo make install
2.4)install openssl-0.9.8d.tar.gz
$ Tar zxvf openssl-0.9.8d.tar.gz
$ Openssl-0.9.8d CD
$./Config -- prefix =/usr -- openssldir =/usr/OpenSSL
(Note: The prefix is/usr/local/SSL, and the default openssldir is/usr/SSL/OpenSSL. You need to change it to the above one. Otherwise, the default installation path will not be found .)
$ Make
$ Make test
$ Sudo make install
2.5) install MCPP
$ Sudo apt-Get install libmcpp-Dev
3. Install "ice-3.4.2"
$ 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
$ Sudo make install
4. Some installation errors and solutions:
4.1) error message:/usr/lib. LD: Error: cannot find-lmcpp ---> solution: it should be because MCPP was not successfully installed. Just reinstall MCPP.
4.2) error message: Fatal error: db_cxx.h: no such file or directory --> solution: the db-4.8.3 was not installed successfully before, reinstall it again
4.3) after the ice is installed, the following error occurs: Error while loading shared libraries: libice. so.34: cannot open shared object file: no such file or directory --> solution: Some directory configurations of ice are incorrect; use the command export LD_LIBRARY_PATH =/opt/ice-3.4.2/lib to export the dynamic link library directory again.