wiki:BaseInstall

Version 21 (modified by Christoph Mayer, 16 years ago) ( diff )

--

Installation

Quick Install

Ariba currently build on Linux systems. Our reference platform is Ubuntu 8.04 with the gcc compiler version 4.1. Download the latest Ariba package from the the download site:

Extract the archive and change into the project directory:

> tar xfz ./ariba-x.x.x.tar.gz
> cd ariba-x.x.x

Now, configure, compile, and install Ariba (if not all libraries needed by Ariba are available on your system, read the section 'Prequisites'). If no configure script is available (e.g. the case in svn versions), run the ./bootstrap script first.:

> ./configure
> make
> make install

In case you don't want to install Ariba into your system but to a local place, do:

> mkdir build
> ./configure --prefix=$PWD/build
> make
> make install

Running the PingPong Sample

The PingPong binary pingpong is installed in build/bin. It has one parameter, a configuration file. You can find sample configuration files in the etc/pingpongconfig folder. Three configuration files are provided. You can start the initiator as follows:

> ./pingpong ../../etc/pingpongconfig/settings_initiator.cnf

If this will fail to find the libariba you may have to set the LD_LIBRARY_PATH correct:

> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user/ariba/build/lib

When running the pingpong application it will output a large number of log messages and the initiator will wait for other nodes to join. YOu can start them using the configuration files settings_node1 and settings_node2. You may need to adjust the configurations files. Currently both node1 and node2 try to join the initiator on the local machine. This will only work if you start all instances on a local machine.

The following configuration entries are of interest:

  • GENERAL_Initiator - this tells the pingpong application whether to create or join a spovnet - sample value: true or false
  • BASE_nodeid - the nodeid that the node will have. If this entry is not present, the node will choose a random nodeid - sample value: 3
  • BASE_bootstrapIP - that IP and port of the initiator so the node can start the join process - sample value: 127.0.0.1:5002
  • BASE_port - the local port the node should bind on. If this entry is not present, the node will bind on a default Ariba port - sample value: 5010

Once the PingPong sample is running and the nodes have connected, the initiator will send ping messages to the joined nodes every 2 seconds. You can now e.g. test mobility of Ariba and change the IP address of a node, or swith from LAN connection to WLAN. The Links established by the PingPong sample through Ariba are mobility invariant and automatically repaired.

Prerequisites

Ariba depends on libraries that may not be installed on your system:

Furthermore, you need default development tools - that are most likely already installed on your system - such as gcc, autoconf, automake, aclocal, libtool, liblt-dev ...

Selecting a compiler

As the gcc-4.3 compiler is very restrictive when compiling C++ and you will have some trouble with Boost and Log4cxx, we suggest to use e.g. gcc-4.1. You then have to compile the libraries and Ariba with this compiler. You can tell Log4cxx and Ariba to use a different compiler using:

./configure --prefix=... CXX=gcc-4.1

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:

using gcc : 4.1 ;

and then build using bjam as described in http://www.boost.org/doc/libs/1_38_0/more/getting_started/unix-variants.html.

Installing libraries locally

We will shortly explain how to install the Boost and Log4cxx libraries locally on your system. Download Boost (boost_1_38_0.tar.gz) and Log4cxx (apache-log4cxx-0.10.0.tar.gz). Be aware, that Log4cxx requires the Apache Portable Runtime (libapr and libapr-util).

> cd ~/
> mkdir local
> cd boost_1_38_0
> ./configure --prefix=/home/user/local
> make install
> cd ..
> cd log4cxx-0.10.0
> ./configure --prefix=/home/user/local
> make install

If Boost makes itself a subdirectory (e.g. /home/user/local/include/boost_1-38/boost), move the boost directory one hierarchy up, resulting in /home/user/local/include/boost.

There is a compiler optimization bug in gcc-4.3 that results in problems with Boost 1.38.0 (see https://svn.boost.org/trac/boost/ticket/2655). There is a workaround available, see https://svn.boost.org/trac/boost/changeset/51863/trunk/boost/xpressive/detail/core/adaptor.hpp.

If you installed some of the libraries locally and not system wide (e.g. using ./configure --prefix=MYPATH as described above), you have to tell Ariba where the libraries are installed. In this example we assume that (1) all libraries are installed locally, and not system wide, and (2) that you want to install Ariba locally. The installation process would then look as follow:

> cd ~/ariba-x.x.x
> mkdir build
> ./configure 
  --prefix=/home/user/ariba-x.x.x/build 
  --with-boost=/home/user/local/include/boost   
  CPPFLAGS='-I/home/user/local/include'
  LDFLAGS='-L/home/user/local/lib'
> make
> make install

This will build and install Ariba into the created build folder.

Overview of special configure options

There are several options to configure that are specific to Ariba:

  • --enable-debug=yes - for building a debug build
  • --enable-simulation=yes - for building for simulation integration
  • --enable-profiling=yes - for profiling with gprof
  • --enable-logcolors=yes - for colorful logging output
Note: See TracWiki for help on using the wiki.