======================================================================
Requirements
======================================================================


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

Solaris 8 or Solaris 9 on SPARC.

You also need to have /dev/urandom installed. This is the default with
Solaris 9; on Solaris 8, you need to install patch 112438-01.


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

The following Sun compilers are supported:

- Sun C++ 5.4 (part of Sun ONE Studio 7.0 aka Forte Developer 7).

- Sun C++ 5.5 (part of Sun ONE Studio 8.0). Ice takes advantage of the
  new linker scoping feature to reduce the number of symbols exported
  by Ice shared libraries.

Builds with the following compilers are expected to succeed, but these
compilers are not supported at this time:

- Sun C++ 5.6 and 5.7 (Sun Studio 9 and Sun Studio 10)

- GCC 3.4.2


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

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

- Berkeley DB 4.2.52 or 4.3.27 configured with --enable-cxx, and built
  with a C++ compiler compatible with the one you are using.

  Note that Ice for Java is not compatible with version 4.3, therefore
  if you intend to use Ice for Java with Berkeley DB, you must use
  version 4.2.52 and the option --enable-java.

- expat 1.9x

- OpenSSL 0.97

- bzip2 1.0

You can download these packages at the following locations:

Berkeley DB    http://www.sleepycat.com/download
expat          http://sourceforge.net/projects/expat/
OpenSSL        http://www.openssl.org
bzip2          http://sources.redhat.com/bzip2

bzip2 comes with Solaris, in Sun package SUNWbzip (32 bit) and
SUNWbzipx (64 bit). You may want to apply patch 114586-01 to get the
latest bzip2 version, 1.0.2.

Some packages are also available at http://www.sunfreeware.com.


GNU Make 3.80
-------------

GNU Make 3.80 is required to build Ice on SPARC/Solaris. You can
download GNU Make from http://www.sunfreeware.com.


Python
------

To run the automated test suite, you will need Python 2.2 or a newer
version. If you have no interest in running the test scripts, Python
is not required.

You can download Python from http://www.sunfreeware.com.


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

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

$ tar xvfz Ice-2.1.1.tar.gz

Change the working directory to Ice-2.1.1:

$ cd Ice-2.1.1

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.

If you want to build with g++ instead of Sun CC, edit the file
config/Make.rules.SunOS and change or comment out the CXX = <compiler>
line (at the top of the file). The default value for CXX with GNU make
is g++.

Now you're ready to build Ice:

$ gmake

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:

$ gmake 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.  For
64 bit builds, add "lib" to LD_LIBRARY_PATH_64:

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


CC 5.4 note
-----------

The Sun CC 5.4 build produces a large number of warnings about hidden
functions in the fstream and sstream standard headers. This is a known
Sun bug (#4852754). You can suppress them by removing the
corresponding '+w' option in config/Make.rules.SunOS, or by filtering
your build log file with a sed script such as:

# Workaround for bug 4852754
/SUNWspro/d
/While specializing "std::/d
/Where: Specialized in non-template code./d
/Warning(s) detected./d


======================================================================
64 bit builds
======================================================================

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 "lib/sparcv9" directories. For example, put
  Berkeley DB 64 bit libraries in $DB_HOME/lib/sparcv9.

- Set the environment variable LP64 to yes, as shown below:

  $ export LP64=yes

- Build and test as described above.


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

Simply run "gmake 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. When compiling Ice programs, you must also make sure
to 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.

If you built in 64 bit mode, the libraries are installed in
<prefix>/lib/sparcv9 and the programs are installed in
<prefix>/bin/sparcv9. No other changes are necessary.
