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 |
|
---|
7 | Prerequisites
|
---|
8 | =============
|
---|
9 | ariba depends on libraries that may not be installed on your system:
|
---|
10 |
|
---|
11 | * Boost (version >=1.39)
|
---|
12 | * Log4cxx (version >= 0.10.0)
|
---|
13 | * GMP (no specific version)
|
---|
14 |
|
---|
15 | Furthermore, you need default development tools - that are most likely already installed on your system - such as
|
---|
16 | gcc/g++, autoconf, automake, aclocal, libtool, liblt-dev ...
|
---|
17 |
|
---|
18 | Quick Install (If all dependencies are satisfied)
|
---|
19 | =============
|
---|
20 |
|
---|
21 | ariba currently build on Linux systems. Our reference platform is
|
---|
22 | Ubuntu 8.04 with the g++ compiler version 4.1. Download the latest
|
---|
23 | ariba package from the the download site
|
---|
24 | http://ariba-underlay.org/downloads
|
---|
25 |
|
---|
26 | Extract the archive and change into the project directory:
|
---|
27 |
|
---|
28 | > tar xfz ./ariba-x.x.x.tar.gz
|
---|
29 | > cd ariba-x.x.x
|
---|
30 |
|
---|
31 | Now, configure, compile, and install ariba (if not all libraries
|
---|
32 | needed by Ariba are available on your system, read the section
|
---|
33 | 'Prequisites').
|
---|
34 |
|
---|
35 | If no configure script is available (e.g. when you checked out an svn
|
---|
36 | version), run the ./bootstrap script first.:
|
---|
37 |
|
---|
38 | > ./configure
|
---|
39 | > make
|
---|
40 | > make install
|
---|
41 |
|
---|
42 | In case you don't want to install Ariba into your system but to a
|
---|
43 | local place, do:
|
---|
44 |
|
---|
45 | > mkdir build
|
---|
46 | > ./configure --prefix=$PWD/build
|
---|
47 | > make
|
---|
48 | > make install
|
---|
49 |
|
---|
50 |
|
---|
51 | Local install (Download library dependencies and install ariba in a
|
---|
52 | ============= local subdirectory)
|
---|
53 |
|
---|
54 |
|
---|
55 | If the required libraries are not available on your system or don't
|
---|
56 | want to install them to the system you can use the bootstrap_libs
|
---|
57 | script that comes with the ariba package. It will download all
|
---|
58 | dependencies, compile and install them locally, and compile and
|
---|
59 | install ariba:
|
---|
60 |
|
---|
61 | > tar xfz ./ariba-x.x.x.tar.gz
|
---|
62 | > cd ariba-x.x.x
|
---|
63 | > ./bootstrap_libs
|
---|
64 |
|
---|
65 | This script will automatically download all necessary libraries and
|
---|
66 | compile them inside a new ./libs subdirectory and install them into
|
---|
67 | ./build. In the end the ariba library itself is compiled to
|
---|
68 | ./build. You can safely delete the ./libs subdirectory after the
|
---|
69 | process.
|
---|
70 |
|
---|
71 | Here is the manual way to go: If you install Ariba locally and have
|
---|
72 | the required libraries also installed locally, you can use a
|
---|
73 | config.site script to make it easier. The config.site file must reside
|
---|
74 | in a folder called share. If your install path is /home/foo/local and
|
---|
75 | you do a ./configure --prefix=/home/foo/local, ariba headers will be
|
---|
76 | installed in /home/foo/local/include, and the ariba library in
|
---|
77 | /home/foo/local/lib. To use a config.site script, create a folder
|
---|
78 | /home/foo/local/share and create a file config.site. Such a file has
|
---|
79 | paths towards required header files and libraries.
|
---|
80 |
|
---|
81 | with_boost=/home/foo/Libraries/include
|
---|
82 | test -z "$CPPFLAGS" && CPPFLAGS='-I/home/foo/Libraries/include'
|
---|
83 | test -z "$LDFLAGS" && LDFLAGS='-L/home/foo/Libraries/lib'
|
---|
84 |
|
---|
85 | If you now do a ./configure --prefix=/home/foo/local, the config.site
|
---|
86 | will be found and the paths therein used for finding libraries. If you
|
---|
87 | e.g. have multiple libraries distributed in their own include folders,
|
---|
88 | you can also have multiple includes:
|
---|
89 |
|
---|
90 | test -z "$CPPFLAGS" && CPPFLAGS='-I/home/foo/Libraries/include -I/home/foo/otherlibrary/include'
|
---|
91 |
|
---|
92 | Running the PingPong Sample
|
---|
93 | ===========================
|
---|
94 | The PingPong binary pingpong is installed in build/bin. It has one
|
---|
95 | parameter, a configuration file. You can find sample configuration
|
---|
96 | files in the etc/pingpongconfig folder. If no configuration file is
|
---|
97 | given, the node will randomly select its NodeID but will not find
|
---|
98 | other nodes. This is because bootstrap modules are selected in the
|
---|
99 | configuration file.
|
---|
100 |
|
---|
101 | > ./pingpong ../../etc/pingpong/settings_node1.cnf
|
---|
102 |
|
---|
103 | If this will fail to find the libariba you may have to set the LD_LIBRARY_PATH correctly in your current terminal, or better add it to your .bashrc
|
---|
104 |
|
---|
105 | > export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user/ariba/build/lib
|
---|
106 |
|
---|
107 | When running the pingpong application it will output a large number of
|
---|
108 | log messages and the initiator will wait for other nodes to join. You
|
---|
109 | can start them using the configuration files settings_node1.cnf and
|
---|
110 | settings_node2.cnf. You may need to adjust the configurations files:
|
---|
111 | currently both node1 and node2 try to join the initiator on the local
|
---|
112 | machine. This will only work if you start all instances on a local
|
---|
113 | machine.
|
---|
114 |
|
---|
115 | Once the PingPong sample is running and the nodes have connected, each
|
---|
116 | node will send out ping messages to every node he knows in the overlay
|
---|
117 | structure every 5 seconds. You can now e.g. test mobility of Ariba and
|
---|
118 | change the IP address of a node, or swith from LAN connection to
|
---|
119 | WLAN. The links established by the PingPong sample through Ariba are
|
---|
120 | mobility invariant and automatically repaired. Selecting a compiler
|
---|
121 |
|
---|
122 | As the g++-4.3 compiler is very restrictive when compiling C++ and you
|
---|
123 | will have some trouble with Boost and Log4cxx, we suggest to use
|
---|
124 | e.g. g++-4.1. You then have to compile the libraries and Ariba with
|
---|
125 | this compiler. You can tell Log4cxx and Ariba to use a different
|
---|
126 | compiler using:
|
---|
127 |
|
---|
128 | ./configure --prefix=... CXX=g++-4.1
|
---|
129 |
|
---|
130 | This will not work in Boost as the configure script is just a wrapper around the Boost Build.System bjam. You can edit the jamfile in the Boost root directory:
|
---|
131 |
|
---|
132 | using gcc : 4.1 ;
|
---|
133 |
|
---|
134 | and then build using bjam as described in http://www.boost.org/doc/libs/1_38_0/more/getting_started/unix-variants.html.
|
---|
135 |
|
---|
136 | Cross-Comiling for Maemo
|
---|
137 | ========================
|
---|
138 | Ariba runs on Nokia Maemo 4 (tested) and probably Maemo 5. We have
|
---|
139 | tested Ariba on an N810 device. Cross-Compiling is done using
|
---|
140 | Scratchbox. Use the preassembled Scratchbox version provided by Nokia
|
---|
141 | which will install and configure the complete Scratchbox system
|
---|
142 | automatically.
|
---|
143 |
|
---|
144 | The Ariba configure will test for Maemo systems. Internally there are
|
---|
145 | a number of special cases where handling on Maemo is different from
|
---|
146 | normal Linux. If you require special handling, do the following in
|
---|
147 | your code:
|
---|
148 |
|
---|
149 | #include "ariba/config.h"
|
---|
150 | ...
|
---|
151 | #ifdef HAVE_MAEMO
|
---|
152 | // special Maemo handling
|
---|
153 | #endif
|
---|
154 |
|
---|
155 | Overview of special configure options
|
---|
156 | =====================================
|
---|
157 | There are several options to configure that are specific to Ariba:
|
---|
158 |
|
---|
159 | * --enable-debug=yes - for building a debug build
|
---|
160 | * --enable-profiling=yes - for profiling with gprof
|
---|
161 | * --enable-logcolors=yes - for colorful logging output
|
---|
162 | * --enable-doxygen=yes - for generating doxygen documentation (do a make html-local in ariba/docu/doxygen)
|
---|