| 1 |
Prerequisites |
| 2 |
============= |
| 3 |
|
| 4 |
- GNU g++ >= 4.5.0 http://gcc.gnu.org/ |
| 5 |
- libcutl >= 1.9.0 http://www.codesynthesis.com/projects/libcutl/ |
| 6 |
|
| 7 |
ODB requires the GCC compiler (g++) to be built with plugin support. |
| 8 |
If you are building GCC yourself, you can enable plugin support with |
| 9 |
the --enable-plugin configure option. If you are using a pre-packaged |
| 10 |
GCC (for example, as part of your distribution), then you can verify |
| 11 |
that GCC was built with plugin support by running g++ with the -v |
| 12 |
option and then making sure --enable-plugin is present in the output. |
| 13 |
|
| 14 |
Note also that for pre-packaged GCC, plugin headers are usually |
| 15 |
distributed in a separate package, normally called gcc-plugin-dev |
| 16 |
or similar. You will need to install this package in order to build |
| 17 |
ODB. For Debian/Ubuntu, this package is called gcc-X.Y-plugin-dev, |
| 18 |
for example: |
| 19 |
|
| 20 |
apt-get install gcc-4.7-plugin-dev |
| 21 |
|
| 22 |
For RedHat/Fedora, this package is called gcc-plugin-devel, for |
| 23 |
example: |
| 24 |
|
| 25 |
yum install gcc-plugin-devel |
| 26 |
|
| 27 |
|
| 28 |
Building on UNIX |
| 29 |
================ |
| 30 |
|
| 31 |
The following build instructions are for the Linux/UNIX/Mac OS X |
| 32 |
operating systems. |
| 33 |
|
| 34 |
The standard autotools-based build system is used on these platforms. |
| 35 |
After unpacking the source code archive, change to the odb package |
| 36 |
directory (referred to as odb/ from now on) and run the configure |
| 37 |
script: |
| 38 |
|
| 39 |
./configure |
| 40 |
|
| 41 |
To see the available configuration options run configure with --help: |
| 42 |
|
| 43 |
./configure --help |
| 44 |
|
| 45 |
The configure script expects the libcutl headers and libraries to be |
| 46 |
installed in a directory where the C++ compiler and linker will search |
| 47 |
for them by default (normally /usr and /usr/local). If libcutl is |
| 48 |
installed in another directory, you can use the CPPFLAGS and LDFLAGS |
| 49 |
configure variables to specify its location, for example: |
| 50 |
|
| 51 |
./configure CPPFLAGS=-I/opt/libcutl/include LDFLAGS=-L/opt/libcutl/lib |
| 52 |
|
| 53 |
If libcutl is not installed and you would like to use its build |
| 54 |
directory instead, you can use the --with-libcutl configure option |
| 55 |
to specify its location, for example: |
| 56 |
|
| 57 |
./configure --with-libcutl=/tmp/libcutl |
| 58 |
|
| 59 |
As another example, the following configure command uses the specified |
| 60 |
GNU g++ compiler and compiles with optimization and without debug |
| 61 |
information: |
| 62 |
|
| 63 |
./configure CXX=g++-4.5 CXXFLAGS=-O3 |
| 64 |
|
| 65 |
Once configuration is complete, run make to build odb: |
| 66 |
|
| 67 |
make |
| 68 |
|
| 69 |
Once the build is completed successfully, you can install odb using the |
| 70 |
install target (you may need to do this step as root depending on the |
| 71 |
installation directory): |
| 72 |
|
| 73 |
make install |
| 74 |
|
| 75 |
|
| 76 |
Building on Windows |
| 77 |
=================== |
| 78 |
|
| 79 |
Building odb on Windows involves a custom build procedure. Consider |
| 80 |
using the pre-compiled binary distribution of odb for Windows or write |
| 81 |
to [email protected] for more information. |