summaryrefslogtreecommitdiff
path: root/cpp/INSTALL.LINUX
blob: 1ec71be3ad29c5a2c2263021102136807b43bb9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
======================================================================
Requirements
======================================================================


Operating System
----------------

Ice is expected to build and run properly on any recent Linux
distribution for x86 and x86_64. However, Ice is officially supported
only on:

 - Red Hat Enterprise Linux Advanced Server 4 Update 4 for i386 or
   x86_64 (RHEL 4.4)

 - Red Hat Enterprise Linux 5 for i386 or x86_64 (RHEL 5)

 - Novell SuSE Linux Enterprise Server 10 for i586 or x86_64 (SLES 10)


C++ compiler
------------

Ice is expected to build properly with GCC 3.3 or later. However, only
the following compilers are officially supported:

 - GCC 3.4.6 on RHEL 4.4
 - GCC 4.1.1 on RHEL 5
 - GCC 4.1.x on SLES 10


Third-party libraries
---------------------

Ice has dependencies on a number of third-party libraries:

- Berkeley DB 4.5.20 configured with --enable-cxx.

  If you intend to use Ice for Java with Berkeley DB, you must also
  include the option --enable-java.

- expat 1.95.7 or 2.0.0

- OpenSSL 0.9.7 or later (OpenSSL 0.9.8 or later recommended)

- bzip2 1.0.x

Berkeley DB, expat, OpenSSL, and bzip2 are usually included with your 
Linux distribution, or you can download them from the following 
locations:

Berkeley DB    http://www.oracle.com/database/berkeley-db/index.html
expat          http://sourceforge.net/projects/expat/
OpenSSL        http://www.openssl.org
bzip2          http://sources.redhat.com/bzip2

RPMs for Berkeley DB 4.5.20 on RHEL 4.4, RHEL 5 and SLES 10 are 
available from:

http://www.zeroc.com/download.html 

- mcpp 2.6.4, which can be downloaded from

  http://mcpp.sourceforge.net/download.html

  After downloading and unpacking the source distribution it is
  necessary to first apply a source patch available on the Ice
  download page before building. From the mcpp 2.6.4 base directory 
  run

  patch -p0 < mcpp-2.6.4.patch

  Ice requires the library version of mcpp, so configure mcpp similar 
  to the following

  ./configure --enable-mcpplib --enable-shared
  (and --prefix=<dir> if you like)


Python
------

You will need Python to run the automated test suite. If you have no
interest in running the test scripts, Python is not required.


======================================================================
Compilation and Testing
======================================================================

Extract the Ice archive in any directory you like (for example, in
your home directory):

$ tar xvfz Ice-@ver@.tar.gz

Change the working directory to Ice-@ver@:

$ cd Ice-@ver@

Edit config/Make.rules to establish your build configuration. The
comments in the file provide more information. Pay particular
attention to the variables that define the locations of the third-
party libraries.

Now you're ready to build Ice:

$ make

This will build the Ice core libraries, services, tests and examples.
After a successful build, you can run the test suite, provided that
you have installed Python:

$ make test

This is equivalent to:

$ python allTests.py

If everything worked out, you should see lots of "ok" messages. In
case of a failure, the tests abort with "failed".

If you want to try out any of the demos, make sure to update your PATH
environment variable to add the "bin" directory, and your
LD_LIBRARY_PATH environment variable to add the "lib" directory:

$ export PATH=`pwd`/bin:$PATH
$ export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH


======================================================================
64-bit builds on x86_64
======================================================================

To build Ice in 64-bit mode, you need to do the following:

- Obtain or build all the third-party dependencies, and put the 64-bit
  libraries in the "lib64" directories. For example, put Berkeley DB
  64-bit libraries in $DB_HOME/lib64.

- Build and test as described above (with gcc).


======================================================================
32-bit builds on x86_64
======================================================================

By default, builds on x86_64 are 64-bit. To perform a 32-bit build
on a x86_64 Linux system, set the environment variable LP64 to no,
as shown below:

$ export LP64=no


======================================================================
Installation
======================================================================

Simply run "make install". This will install Ice in the directory
specified by the "prefix" variable in config/Make.rules.

After installation, make sure that the <prefix>/bin directory is in
your PATH, and the <prefix>/lib directory is in your LD_LIBRARY_PATH.
If you built Berkeley DB yourself, please ensure that its installation
lib directory is also in your LD_LIBRARY_PATH. When compiling Ice
programs, you must pass the location of the <prefix>/include directory
to the compiler with the -I option, and the location of the
<prefix>/lib directory with the -L option.  

On a x86_64 system, the libraries are installed in <prefix>/lib64
unless LP64 is set to no. No other changes are necessary.