summaryrefslogtreecommitdiff
path: root/cpp/BuildInstructionsAIX.md
blob: 59dcb261e144fea3cb7e62e69508e0f4a7fabd64 (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
# Building Ice for C++ on AIX

This document provides step-by-step instructions for building Ice for C++
from sources on AIX.

## Unsupported Platform

AIX is currently an unsupported platform. Only minimal testing was performed
on AIX, and there is no guarantee future releases of Ice will build or run
on this platform.

## Recommended Operating System and C++ Compiler

 - AIX 6.1, AIX 7.1
 - IBM XL C/C++ 12.1 with latest Fix Pack
 - 32 bit or 64 bit

## Build Pre-Requisites

Before building Ice, you need to install or build a number of third-party
packages that Ice depends on, and install some build tools.

### Third-Party Packages

Ice depends on several open-source packages: bzip2 1.0, expat 2.x, LMDB 0.9.x, 
mcpp 2.7.2 (+patches) and OpenSSL.

OpenSSL is a system package on AIX. RPM packages for bzip2 and expat are
available in the [AIX Toolbox for Linux Applications][1]. You can install
them as follows:

```
# As root
rpm -i ftp://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/bzip2/bzip2-1.0.5-3.aix5.3.ppc.rpm
rpm -i ftp://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/expat/expat-2.0.1-2.aix5.3.ppc.rpm
rpm -i ftp://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/expat/expat-devel-2.0.1-2.aix5.3.ppc.rpm

```

LMDB and mcpp must be built from sources, as described below. 

### Build Tools

You need GNU make (gmake) to build Ice:
```
# As root
rpm -i ftp://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/make/make-4.1-2.aix6.1.ppc.rpm
```

The preferred way to retrieve the Ice and mcpp source distributions is with
git. A RPM for git is available from [bullfreeware.com][2].

### Building mcpp from Sources

If building 64-bit binaries, set `OBJECT_MODE` to 64:
```
export OBJECT_MODE=64
```
Otherwise, leave `OBJECT_MODE` unset.

Then clone the zeroc-ice/mcpp repository and build with gmake:
```
git clone https://github.com/zeroc-ice/mcpp.git
cd mcpp
gmake
```

This build creates a static library, `lib/libmcpp.a`. `libmcpp.a` is used
only when building Ice from sources, and does not need to be installed.

### Building LMDB from Sources

TBD

## Building Ice

### Clone zeroc-ice/ice

```
git clone https://github.com/zeroc-ice/ice.git
cd ice
```

### Configure

Edit `config/Make.rules` to establish your build configuration. The comments
in the file provide more information.

Make sure to set `LMDB_HOME` to your LMDB installation directory and 
`MCPP_HOME` to your mcpp build directory (for example `$(HOME)/builds/mcpp`).

### Build

Use the gmake `-j` option to speed up the build:

```
cd cpp
gmake -j8
```

This builds the Ice core libraries, services, and tests.

### Build configurations and platforms

The C++ source tree supports multiple build configurations and platforms. To
see the supported configurations and platforms:

    gmake print V=supported-configs
    gmake print V=supported-platforms

To build all the supported configurations and platforms:

    gmake CONFIGS=all PLATFORMS=all

### C++11 mapping

The C++ source tree supports two different language mappings (C++98 and C++11),
the default build uses the C++98 mapping. The C++11 mapping is a new mapping
that uses the new language features.

To build the new C++11 mapping, use build configurations which are prefixed with
`cpp11`, for example:

    gmake CONFIGS=cpp11-shared

### Install

Simply run `gmake install`. This will install Ice in the directory specified by
the `<prefix>` variable in `config/Make.rules`.

By default, all Ice binaries embed the library path `prefix/lib:/usr/lib`.

After installation, make sure that the `prefix/bin` directory is in your `PATH`.

### Run the Test Suite (Optional)

Python is required to run the test suite. You can install Python as follows:
```
# As root
rpm -i ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/python/python-2.7.10-1.aix6.1.ppc.rpm
rpm -i ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/python/python-tools-2.7.10-1.aix6.1.ppc.rpm
rpm -i ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/python/python-devel-2.7.10-1.aix6.1.ppc.rpm
```

Additionally, the Glacier2 tests require the Python module `passlib`, available
from the Python Package Index:
```
# As root
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
export PATH=/opt/freeware/bin:$PATH
pip install passlib
```

Then run the test suite with:
```
python allTests.py
```

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

[1]: http://www-03.ibm.com/systems/power/software/aix/linux
[2]: http://www.bullfreeware.com