Debian Codegraph @

INSTALL.md

raw
1 Installing Qpid Proton
2 ======================
3
4 The CMake build system can build the entire codebase, including proton-c,
5 and all its language bindings.
6
7 Dependencies
8 ------------
9
10 Cross-platform dependencies
11
12 - CMake 2.8.12+
13 - Python (required to build core C library, minimum version depends on platform)
14 - Swig 1.3+ (for the bindings)
15 - Ruby 1.9+ (for the Ruby binding)
16 - Go 1.11+ (for the Go binding)
17
18 Linux dependencies
19
20 - GNU Make 3.81+
21 - GCC 4.8.4+
22 - Cyrus SASL 2.1+ (for SASL support)
23 - OpenSSL 1.0+ (for SSL support)
24 - JsonCpp 1.8+ for C++ connection configuration file support
25 - Python 2.7, 3.5+ (for the Python binding)
26
27 Windows dependencies
28
29 - Visual Studio 2015 or newer (regular or C++ Express)
30 - Python 3.5+ (for the Python binding)
31
32 CMake (Linux)
33 -------------
34
35 The following prerequisites are required to do a full build on
36 RPM-based systems (RHEL, Fedora, etc.). If you do not wish to build a
37 given language binding you can omit the devel package for that
38 language.
39
40 # Required dependencies
41 $ yum install gcc gcc-c++ make cmake libuuid-devel
42
43 # Dependencies needed for SSL support
44 $ yum install openssl-devel
45
46 # Dependencies needed for Cyrus SASL support
47 $ yum install cyrus-sasl-devel cyrus-sasl-plain cyrus-sasl-md5
48
49 # Dependencies needed for bindings
50 $ yum install swig # Required for all bindings
51 $ yum install python-devel # Python
52 $ yum install ruby-devel rubygem-minitest # Ruby
53 $ yum install jsoncpp-devel # C++ optional config file
54
55 # Dependencies needed to generate documentation
56 $ yum install python-sphinx # Python
57 $ yum install rubygem-yard # Ruby
58 $ yum install doxygen # C, C++
59
60
61 The following prerequisites are required to do a full build on
62 Debian-based systems (Ubuntu). If you do not wish to build a given
63 language binding you can omit the dev package for that language.
64
65 # Required dependencies
66 $ apt-get install gcc g++ cmake cmake-curses-gui uuid-dev
67
68 # Dependencies needed for SSL support
69 $ apt-get install libssl-dev
70
71 # dependencies needed for Cyrus SASL support
72 $ apt-get install libsasl2-2 libsasl2-dev libsasl2-modules
73
74 # dependencies needed for bindings
75 $ apt-get install swig python-dev ruby-dev
76
77 # dependencies needed for python docs
78 $ apt-get install python-sphinx
79
80 From the directory where you found this `INSTALL.md` file:
81
82 $ mkdir build
83 $ cd build
84
85 # Set the install prefix. You may need to adjust it depending on your
86 # system.
87 $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DSYSINSTALL_BINDINGS=ON
88
89 # Omit the docs target if you do not wish to build or install
90 # documentation.
91 $ make all docs
92
93 # Note that this step will require root privileges.
94 $ make install
95
96 When make install completes, all installed files are listed in the
97 `install_manifest.txt` file. The contents of this file may be used to
98 uninstall.
99
100 CMake (Windows)
101 ---------------
102
103 This describes how to build the Proton library on Windows using
104 Microsoft Visual C++.
105
106 The Proton build uses the CMake tool to generate the Visual Studio
107 project files. These project files can then be loaded into Visual
108 Studio and used to build the Proton library.
109
110 The following packages must be installed:
111
112 - Visual Studio 2015 or newer (regular or C++ Express)
113 - Python (www.python.org)
114 - CMake (www.cmake.org)
115
116 Additional packages are required for the language bindings:
117
118 - Swig (www.swig.org)
119 - Development headers and libraries for the language of choice
120
121 Notes:
122 - Be sure to install relevant Microsoft Service Packs and updates
123 - python.exe, cmake.exe and swig.exe _must_ all be added to your PATH
124 - Chocolatey is a useful tool that can be used to install cmake, python
125 and swig (see https://chocolatey.org/)
126
127 To generate the Visual Studio project files, from the directory where you found
128 this `INSTALL.md` file:
129
130 > mkdir build
131 > cd build
132 > cmake ..
133
134 If CMake doesn't guess things correctly, useful additional arguments are:
135
136 -G "Visual Studio 10"
137 -DSWIG_EXECUTABLE=C:\swigwin-2.0.7\swig.exe
138
139 Refer to the CMake documentation for more information.
140
141 Build and install from a command prompt (using msbuild):
142
143 > cmake --build . --target install --config RelWithDebInfo
144
145 Loading the `ALL_BUILD` project into Visual Studio:
146
147 1. Run the Microsoft Visual Studio IDE
148 2. From within the IDE, open the `ALL_BUILD` project file or Proton
149 solution file - it should be in the `build` directory you created
150 above.
151 3. Select the appropriate configuration. RelWithDebInfo works best
152 with the included CMake/CTest scripts
153
154 Note that if you wish to build debug version of Proton for use with
155 Swig bindings on Windows, you must have the appropriate debug target
156 libraries to link against.
157
158 Other Platforms
159 ---------------
160
161 Proton can use the http://libuv.org IO library on any platform where
162 it is available. Install the libuv library and header files and adapt
163 the instructions for building on Linux.
164
165 The libuv library is not required on Linux or Windows, but if you wish
166 you can use it instead of the default native IO by running cmake with
167 `-Dproactor=libuv`.
168
169 Installing Language Bindings
170 ----------------------------
171
172 Most dynamic languages provide a way for asking where to install
173 libraries in order to place them in a default search path.
174
175 When `SYSINSTALL_BINDINGS` is enabled (`ON`), the
176 `CMAKE_INSTALL_PREFIX` does not affect the location for where the
177 language bindings (Python and Ruby) are installed. For those
178 elements, the location is determined by the language interpreter
179 itself; that is, each interpreter is queried for the proper location
180 for extensions.
181
182 When `SYSINSTALL_BINDINGS` is disabled (`OFF`), Proton installs all
183 dynamic language bindings into a central, default location:
184
185 BINDINGS=${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/proton/bindings
186
187 In order to use these bindings, you'll need to configure your
188 interpreter to load the bindings from the appropriate directory.
189
190 - Python - Add ${BINDINGS}/python to PYTHONPATH
191 - Ruby - Add ${BINDINGS}/ruby to RUBYLIB
192
193 You can configure the build to install a specific binding to the
194 location specified by the system interpreter with the
195 SYSINSTALL_[LANGUAGE] options, where [LANGUAGE] is one of PYTHON
196 or RUBY.
197
198 $ cmake .. -DSYSINSTALL_PYTHON=ON
199
200 Disabling Language Bindings
201 ---------------------------
202
203 To disable any given language bindings, you can use the
204 BUILD_[LANGUAGE] option where [LANGUAGE] is one of PYTHON
205 or RUBY or GO, for example:
206
207 $ cmake .. -DBUILD_PYTHON=OFF