| [9636] | 1 | Please see the latest Installation instructions on http://ariba-underlay.org/
 | 
|---|
 | 2 | here: http://ariba-underlay.org/trac/spovnet-base/wiki/BaseInstall
 | 
|---|
 | 3 | 
 | 
|---|
 | 4 | Please see also http://spovnet.de/ for further information
 | 
|---|
 | 5 | about Ariba and its application.
 | 
|---|
 | 6 | 
 | 
|---|
| [10700] | 7 | 
 | 
|---|
| [9636] | 8 | Prerequisites
 | 
|---|
 | 9 | =============
 | 
|---|
 | 10 | ariba depends on libraries that may not be installed on your system:
 | 
|---|
 | 11 | 
 | 
|---|
| [10700] | 12 |     * Boost (version >=1.42)
 | 
|---|
 | 13 |     * GMP
 | 
|---|
 | 14 |     * CMake (version >=2.8)
 | 
|---|
| [9636] | 15 | 
 | 
|---|
| [10700] | 16 | and optionally on
 | 
|---|
| [9636] | 17 | 
 | 
|---|
| [10700] | 18 |     * Log4Cxx (version >= 0.10.0) for more sophisticated logging
 | 
|---|
 | 19 |     * Avahi for more efficient bootstrapping in local networks
 | 
|---|
 | 20 |     * LibBluetooth/Bluez for bluetooth support
 | 
|---|
 | 21 |     * Doxygen to build the documentation
 | 
|---|
 | 22 | 
 | 
|---|
 | 23 | Furthermore, you need default development tools - that are most likely already
 | 
|---|
 | 24 | installed on your system - such as gcc/g++, libtool, liblt-dev ...
 | 
|---|
 | 25 | 
 | 
|---|
 | 26 | 
 | 
|---|
| [10705] | 27 | Quick Install
 | 
|---|
| [9636] | 28 | =============
 | 
|---|
 | 29 | 
 | 
|---|
| [10700] | 30 | ariba currently builds on Linux systems. Our reference platform is Ubuntu 8.04
 | 
|---|
 | 31 | with the g++ compiler version 4.1. However, latest Ubuntu releases should work 
 | 
|---|
 | 32 | too.
 | 
|---|
| [9636] | 33 | 
 | 
|---|
| [10700] | 34 | Download the latest ariba package from the the download site
 | 
|---|
| [10705] | 35 | http://ariba-underlay.org/downloads:
 | 
|---|
| [9636] | 36 | 
 | 
|---|
| [10705] | 37 | Extract the archive and change into the project directory:
 | 
|---|
| [9636] | 38 | > tar xfz ./ariba-x.x.x.tar.gz
 | 
|---|
 | 39 | > cd ariba-x.x.x
 | 
|---|
 | 40 | 
 | 
|---|
| [10705] | 41 | Alternatively, you could try to use the latest development code from our SVN
 | 
|---|
 | 42 | trunk (attention: the code on trunk might break from time to time):
 | 
|---|
 | 43 | > svn co https://svn.tm.kit.edu/SpoVNet-KA/entwicklung/ariba/trunk ariba-trunk
 | 
|---|
| [10430] | 44 | > cd ariba-trunk
 | 
|---|
 | 45 | 
 | 
|---|
| [10700] | 46 | Now create a directory to build ariba in:
 | 
|---|
 | 47 | > mkdir build
 | 
|---|
 | 48 | > cd build
 | 
|---|
| [9636] | 49 | 
 | 
|---|
| [10700] | 50 | Next the makefiles have to be generated and the source compiled:
 | 
|---|
 | 51 | > cmake ..
 | 
|---|
| [9636] | 52 | > make
 | 
|---|
 | 53 | 
 | 
|---|
| [9745] | 54 | HINT: you may use 
 | 
|---|
 | 55 | > make -j 2 
 | 
|---|
| [10705] | 56 | for a dual processor/core system to speed up the compilation,
 | 
|---|
| [9745] | 57 | make -j 4 if you have quad-core respectively, and so on. If 
 | 
|---|
 | 58 | the compilation stops, try make without the -j option again.
 | 
|---|
 | 59 | 
 | 
|---|
| [10700] | 60 | And finally ariba will be installed into the system:
 | 
|---|
| [9636] | 61 | > make install
 | 
|---|
 | 62 | 
 | 
|---|
 | 63 | 
 | 
|---|
| [10700] | 64 | Custom Build Options
 | 
|---|
 | 65 | ====================
 | 
|---|
 | 66 | The build may be customized in various ways by setting CMake options. This can
 | 
|---|
 | 67 | be done by giving them as arguments on the command line:
 | 
|---|
 | 68 | > cmake .. -DOPTION=value
 | 
|---|
| [9636] | 69 | 
 | 
|---|
| [10700] | 70 | by using the CMake GUI which lets you set the variables graphically:
 | 
|---|
 | 71 | > cmake-gui ..
 | 
|---|
| [9636] | 72 | 
 | 
|---|
| [10700] | 73 | or running cmake in interactive mode:
 | 
|---|
 | 74 | > cmake -i ..
 | 
|---|
| [9636] | 75 | 
 | 
|---|
| [10700] | 76 | The last two ways also give an overview which options exist.
 | 
|---|
| [9636] | 77 | 
 | 
|---|
| [10700] | 78 | Important options:
 | 
|---|
| [9636] | 79 | 
 | 
|---|
| [10700] | 80 | CMAKE_INSTALL_PREFIX - Where to install the compiled files. The default on Unix
 | 
|---|
 | 81 |                        platforms is /usr/local/. If you for example don't want
 | 
|---|
 | 82 |                        or can't install system wide, you can specify a directory
 | 
|---|
 | 83 |                        you have control over. The files will be installed to
 | 
|---|
 | 84 |                        "${prefix}/include/", "${prefix}/lib/" and so on.
 | 
|---|
| [9636] | 85 | 
 | 
|---|
| [10700] | 86 | CMAKE_BUILD_TYPE     - One of "", "Release", "Debug", "RelWithDebInfo" or
 | 
|---|
 | 87 |                        "MinSizeRel". This influences the build in various ways
 | 
|---|
| [10705] | 88 |                        (which compiler optimizations are turned on, whether
 | 
|---|
 | 89 |                        debug symbols are included, what warnings to show etc.).
 | 
|---|
| [9636] | 90 | 
 | 
|---|
| [10700] | 91 | ENABLE_{AVAHI,BLUETOOTH,LOG4CXX}
 | 
|---|
 | 92 |                      - If set to OFF or 0 (ON is the default) it disables the
 | 
|---|
 | 93 |                        support of the feature even if the corresponding library
 | 
|---|
 | 94 |                        (see above) was detected to be present.
 | 
|---|
| [9636] | 95 | 
 | 
|---|
| [10700] | 96 | <library>_INCLUDE_DIR - Where the directory containing the header files for
 | 
|---|
 | 97 |                        <library> is located. If the library is installed in the
 | 
|---|
 | 98 |                        usual system paths CMake should be able to automatically
 | 
|---|
 | 99 |                        find the right location. If the library is located
 | 
|---|
 | 100 |                        elsewhere (e.g. because you compiled it yourself in your
 | 
|---|
 | 101 |                        home directory) then you may need to set this variable
 | 
|---|
 | 102 |                        manually.
 | 
|---|
| [9636] | 103 | 
 | 
|---|
| [10700] | 104 | <library>_LIBRARY    - Where the library file (aka the .so, .a or .dll file) for
 | 
|---|
 | 105 |                        <library> is located. If the library is installed in the
 | 
|---|
 | 106 |                        usual system paths CMake should be able to automatically
 | 
|---|
 | 107 |                        find the right location. If the library is located
 | 
|---|
 | 108 |                        elsewhere (e.g. because you compiled it yourself in your
 | 
|---|
 | 109 |                        home directory) then you may need to set this variable
 | 
|---|
 | 110 |                        manually.
 | 
|---|
| [9636] | 111 | 
 | 
|---|
| [10700] | 112 | DOCUMENTATION_GENERATE_GRAPHICS
 | 
|---|
 | 113 |                      - Whether the documentation should include graphics such as
 | 
|---|
 | 114 |                        inheritance and include graphs (OFF by default). This
 | 
|---|
 | 115 |                        might take a long time and consume a lot of space.
 | 
|---|
| [9636] | 116 | 
 | 
|---|
| [10700] | 117 | CMAKE_{C,CXX}_COMPILER - Which C/C++ compiler to use
 | 
|---|
 | 118 | CMAKE_{C,CXX}_FLAGS  - Which additional flags to give to the compiler (e.g. -pg
 | 
|---|
 | 119 |                        for profiling support)
 | 
|---|
| [9636] | 120 | 
 | 
|---|
 | 121 | 
 | 
|---|
| [10705] | 122 | Building the Documentation
 | 
|---|
 | 123 | ==========================
 | 
|---|
 | 124 | To build the documentation once you can build the "docu" target:
 | 
|---|
 | 125 | > make docu
 | 
|---|
 | 126 | 
 | 
|---|
 | 127 | If you want to build the documentation on every build you can enable the
 | 
|---|
 | 128 | ALWAYS_BUILD_DOCUMENTATION option in CMake.
 | 
|---|
 | 129 | 
 | 
|---|
 | 130 | 
 | 
|---|
| [10700] | 131 | Running the PingPong Sample
 | 
|---|
 | 132 | ===========================
 | 
|---|
 | 133 | The PingPong binary pingpong is installed in "${prefix}/lib/ariba/" or found
 | 
|---|
 | 134 | directly in the build tree at "sample/pingpong/pingpong". It has one parameter,
 | 
|---|
 | 135 | a configuration file. You can find sample configuration files in the
 | 
|---|
 | 136 | "etc/pingpong" folder. If no configuration file is given, the node will randomly
 | 
|---|
 | 137 | select its NodeID but will not find other nodes. This is because bootstrap
 | 
|---|
 | 138 | modules are selected in the configuration file.
 | 
|---|
 | 139 | > ./sample/pingpong/pingpong ../etc/pingpong/settings_node1.cnf
 | 
|---|
| [9636] | 140 | 
 | 
|---|
| [10700] | 141 | When running the pingpong application it will output a large number of log
 | 
|---|
 | 142 | messages and the initiator will wait for other nodes to join. You can start them
 | 
|---|
 | 143 | using the configuration files settings_node1.cnf and settings_node2.cnf. You may
 | 
|---|
 | 144 | need to adjust the configurations files: currently both node1 and node2 try to
 | 
|---|
 | 145 | join the initiator on the local machine. This will only work if you start all
 | 
|---|
 | 146 | instances on a local machine.
 | 
|---|
| [9636] | 147 | 
 | 
|---|
| [10700] | 148 | Once the PingPong sample is running and the nodes have connected, each node will
 | 
|---|
 | 149 | send out ping messages to every node he knows in the overlay structure every
 | 
|---|
| [10705] | 150 | 5 seconds. You can now e.g. test mobility of ariba and change the IP address of
 | 
|---|
 | 151 | a node, or switch from LAN connection to WLAN. The links established by the
 | 
|---|
 | 152 | PingPong sample through ariba are mobility invariant and automatically repaired.
 | 
|---|
| [9636] | 153 | 
 | 
|---|
 | 154 | 
 | 
|---|
| [10700] | 155 | Cross-Compiling for Maemo
 | 
|---|
 | 156 | =========================
 | 
|---|
| [10705] | 157 | Ariba runs on Nokia Maemo 4 (tested) and probably Maemo 5. We have tested ariba
 | 
|---|
| [10700] | 158 | on an N810 device. Cross-Compiling is done using Scratchbox. Use the
 | 
|---|
 | 159 | preassembled Scratchbox version provided by Nokia which will install and
 | 
|---|
 | 160 | configure the complete Scratchbox system automatically.
 | 
|---|
| [9636] | 161 | 
 | 
|---|
| [10700] | 162 | If you compile for Maemo you have to set the HAVE_MAEMO option in CMake.
 | 
|---|
| [9636] | 163 | 
 | 
|---|
| [10700] | 164 | Internally there are a number of special cases where handling on Maemo is
 | 
|---|
 | 165 | different from normal Linux. If you require special handling, do the following
 | 
|---|
 | 166 | in your code:
 | 
|---|
| [9636] | 167 | 
 | 
|---|
 | 168 | #include "ariba/config.h"
 | 
|---|
 | 169 | ...
 | 
|---|
 | 170 | #ifdef HAVE_MAEMO
 | 
|---|
 | 171 |  // special Maemo handling
 | 
|---|
 | 172 | #endif
 | 
|---|