summaryrefslogtreecommitdiff
path: root/qpid/cpp/INSTALL
blob: 06c6fbfe456763544ce8b7c9445ef3fb20614c06 (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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
		Installing Qpid/C++
		===================

Table of Contents
=================
1. Introduction
2. How to Build and Install Qpid from a Source Distribution
3. Building a Repository Working Copy
4. Tests

5. Prerequisites
   5.1. What Prerequisite Libraries to Install
   5.2. How to Install Prerequisite Libraries
      5.2.1. Using Package Management Tools
      5.2.2. Building Prerequisites From Source
   5.3. Important Environment Variable Settings


1. Introduction
===============
This document describes how to build the Qpid/C++ broker and client, either
from a checkout of the source or from a source distribution, on Linux/UNIX.

Please see INSTALL-WINDOWS for information on building on Windows.

There are a number of prerequisite libraries that may need to be installed.
If this is the first time that you have built Qpid please check the prerequisites
section 5. below and/or check the output from running cmake for any errors.

As of Qpid 0.22 cmake is the preferred way to build Qpid.

*******************************************************************
*      N.B. The automake build method is NOW DEPRECATED!!         *
*   IT WILL BE DISABLED BY DEFAULT IN 0.24 AND REMOVED IN 0.26    *
*    Please flag any cmake issues with: users@qpid.apache.org     *
*******************************************************************


2. How to Build and Install Qpid from a Source Distribution
===========================================================
In the cpp distribution directory (<qpid>/cpp), build the code with:

 # mkdir bld       # This is just a suggested name for the build directory
 # cd bld
 # cmake ..        # ".." is the path to the distribution directory

 # make all

To run the tests:

 # make test

To install (you may need to be root/sudo to do this):

 # make install

To uninstall (you may need to be root/sudo to do this):

 # make uninstall


The daemon and client API may be built separately if so desired:

 # make qpidbroker

 # make qpidclient

The available make targets can be listed using:

 # make help


You can have multiple builds in the same working copy with different
configuration. For example you can do the following to build twice, once for
debug, the other with optimization:

 # mkdir BLD-dbg BLD-opt
 # (cd BLD-dbg; cmake -DCMAKE_BUILD_TYPE=Debug .. && make )
 # (cd BLD-opt; cmake -DCMAKE_BUILD_TYPE=Release .. && make)

Note that there are 4 different predefined cmake build types:
Debug, Release, MinSizeRel, DebWithRelInfo: They each correspond to a different
set of build flags for respectively debug; release; minimum size release; release
with debug information.

To see and edit all the available cmake options:

 # cmake-gui ..    # ".." is the path to the distribution directory


3. Building a Repository Working Copy
=====================================
To get the source code from the subversion repository (trunk) do:

 # svn checkout http://svn.apache.org/repos/asf/qpid/trunk/qpid/.

To build, cd to <qpid>/cpp subdirectory and then follow the instructions for building
from a Source Distribution in step (2).


4. Tests
========
See <qpid>/cpp/src/tests/README.txt for details.


======================================================================================


5. Prerequisites
================
We prefer to avoid spending time accommodating older versions of these
packages, so please make sure that you have the latest stable versions.
Known version numbers for a succesful build are given in brackets, take
these as a recommended minimum version.


5.1. What Prerequisite Libraries to Install
===========================================
The following libraries and header files must be installed to build
a source distribution:
 * boost      <http://www.boost.org>                    (1.35)(*)
 * libuuid    <http://kernel.org/~kzak/util-linux/>     (2.19)
 * pkgconfig  <http://pkgconfig.freedesktop.org/wiki/>  (0.21)

(*) earlier versions of boost e.g. 1.33 also work and there is a patch
to get 1.32 working in the svn tree though that is only recommended as
a last resort.

Optional support for AMQP 1.0 requires (see AMQP_1.0 for details):
* Qpid proton-c <http://qpid.apache.org/proton>         (0.5)
Note: pkg-config is used to locate this, so set PKG_CONFIG_PATH if you
are using a non-standard location

Optional XML exchange requires:
 * xqilla  <http://xqilla.sourceforge.net/HomePage>     (2.0.0)
 * xerces-c <http://xerces.apache.org/xerces-c/>        (2.7.0)

Optional SSL support requires:
* nss <http://www.mozilla.org/projects/security/pki/nss/>
* nspr <http://www.mozilla.org/projects/nspr/>

Optional binding support for ruby requires:
* ruby and ruby devel <http://www.ruby-lang.org/en/>
* swig <http://www.swig.org/>

Qpid has been built using the GNU C++ compiler:
 * gcc     <http://gcc.gnu.org/>            		    (3.4.6)

If you want to build directly from the SVN repository you will need
all of the above plus:

 * Cmake      <http://www.cmake.org/>                   (2.6.4)
 * GNU make   <http://www.gnu.org/software/make/>      	(3.8.0)
 * help2man   <http://www.gnu.org/software/help2man/>  	(1.36.4)
 * doxygen    <ftp://ftp.stack.nl/pub/users/dimitri/>  	(1.5.1)
 * graphviz   <http://www.graphviz.org/>               	(2.12)
 * ruby 1.8   <http://www.ruby-lang.org>               	(1.8.4)
 * python 2.x <http://www.python.org>                   (2.4.3)

NOTE: make sure to install the related '-devel' packages also!!!!

NOTE: Python 3.x is known to NOT work - please use 2.7 or earlier.

To build the QMF (Qpid Management Framework) bindings for Ruby and Python,
the following must also be installed:

 * ruby-devel
 * python-devel
 * swig       <http://www.swig.org>                     (1.3.35)

UUID problems:

In some earlier Linux releases (such as Fedora 11), the uuid/uuid.h
file is located in the e2fsprogs-devel package instead of
libuuid-devel. If you are using an older Linux release and run into a
problem during configure in which uuid.h cannot be found, install the
e2fsprogs-devel package.

5.2. How to Install Prerequisite Libraries
==========================================

5.2.1. Using Package Management Tools
=====================================
On linux most packages can be installed using your distribution's
package management tool. For example on Fedora:

 # yum install cmake boost-devel libuuid-devel pkgconfig gcc-c++ make ruby help2man doxygen graphviz

For SASL and SSL, include
 # yum install cyrus-sasl-devel nss-devel nspr-devel

For the XML Exchange, include:

 # yum install xqilla-devel xerces-c-devel

Optional ruby binding support include:
 # yum install ruby ruby-devel swig

Optional legacystore store module.
# yum install libdb-cxx-devel libaio-devel

Follow the manual installation instruction below for any packages not
available through your distributions packaging tool.

5.2.2. Building Prerequisites From Source
=========================================
Required dependencies can be installed and built from source distributions.
It is recommended that you create a directory to install them to, for example,
~/qpid-tools.

 To build and install the dependency packages:

 1. Unzip and untar them and cd to the untared directory.
 2. do:
  # ./configure --prefix=~/qpid-tools
  # make install

The exception is boost.

boost
=====
 1. Unpack boost-jam.
 2. Add bjam in the unpacked directory to your path.
 3. Unpack boost and cd to the boost untarred directory.
 4. do:

  # bjam toolset=gcc variant=release threading=single link=shared \
    --layout=system --prefix=~/qpid-tools install


5.3. Important Environment Variable Settings
============================================
Note that the following is generally not necessary if dependency packages have been
installed using Package Management Tools such as yum or apt.

Ensure that all the build tools are available on your path, when they are
manually installed to non-standard locations. For example:

 # export PATH=~/qpid-tools/bin:$PATH

Ensure that pkg-config is set up correctly. This is especially important
if you have built the dependencies from source, as they may not be installed
in the default system location. For example:

 # export PKG_CONFIG_PATH=~/qpid-tools/lib/pkgconfig:/usr/local/lib/pkgconfig
 # export PKG_CONFIG=~/qpid-tools/bin/pkg-config

Ensure that the boost libraries are made available on the gcc library path.
For example:

 # export CXXFLAGS=-I~/qpid-tools/include/boost-1_33_1