(by H. Ozaktas)
This guide is mainly written for OS X Lion and uses MacPorts.
Installing MacPorts ∞
MacPorts needs Xcode which is most easily installed from the Mac App Store.
Once Xcode is installed, open it, go to
Preferences→Downloads→Components and install Command Line Tools.
Now you can install MacPorts.
Installing build tools ∞
Install packages mercurial,
ocaml through MacPorts:
port search KEYWORD
If a need for any other tool or library arises, it can be searched in available ports:
port search KEYWORD
Basic Libraries Installation ∞
OTAWA and its modules must be compiled in the same parent directory that we call BUILD_DIR. So, create a BUILD_DIR and chdir in it:
mkdir BUILD_DIR cd BUILD_DIR
You also need to decide for an installation directory that we call INSTALL_DIR. If you don’t specify one,
/usr/local is generally used by default.
Which module you’ll need depends on what you want to do with OTAWA but in any case, you will need
gliss2, a loader for your preferred ISA and
elm. So grab and install them. For gel:
hg clone https://anon:email@example.com/hg/TRACES/gel/trunk gel cd gel cmake . -DCMAKE_INSTALL_PREFIX=INSTALL_DIR make install cd ..
hg clone https://anon:firstname.lastname@example.org/hg/TRACES/gliss2/trunk gliss2 cd gliss2 make cd ..
Loader Installation ∞
Now it’s time to install a loader. OTAWA has support for several architectures including ARM, PPC, SPARC and more. You can install any combination of them, here is how to install PowerPC loader with VLE instructions support:
hg clone https://anon:email@example.com/hg/TRACES/ppc2/trunk ppc2 cd ppc2 make WITH_DYNLIB=1 cd ..
LP Solver Installation ∞
OTAWA also needs an LP solver. It currently uses lp_solve.
As patches are needed to let OTAWA using it, yon can either download our patched version lp_solve5-tar, or try to patch another version as below.
Grab v5.5 of it (up to 18.104.22.168) and put it in the BUILD_DIR. Now, extract it and change its name to
tar xvf DOWNLOADED_LP_SOLVE5 mv lp_solve_5.5 lp_solve5
Now grab the patch file lp_solve5.txt, patch
lp_solve5 and compile it:
cd lp_solve5 patch -p1 < PATCH_FILE cd lpsolve55 sh ccc cd ../..
Installing OTAWA ∞
Now it’s time to install
hg clone https://anon:firstname.lastname@example.org/hg/TRACES/elm/trunk elm cd elm cmake . -DCMAKE_INSTALL_PREFIX=INSTALL_DIR make install cd ..
And finally OTAWA:
hg clone https://anon:email@example.com/hg/TRACES/otawa/trunk otawa cd otawa cmake . -DCMAKE_INSTALL_PREFIX=INSTALL_DIR make install cd ..
Installing oRange ∞
You can now install oRange which is a tool that determines loop bounds automatically. Since it need
frontc, first grab and compile
hg clone https://anon:firstname.lastname@example.org/hg/TRACES/frontc/trunk frontc cd frontc make NATIVE=1 cd ..
and then oRange:
hg clone https://anon:email@example.com/hg/TRACES/orange/trunk orange cd orange make install PREFIX=INSTALL_DIR NATIVE=1 cd ..
Environment Configuration ∞
Now that the installation has completed, you can configure your environment for OTAWA binaries. Add these lines to your
~/.profile (don’t forget to replace INSTALL_DIR as before):
# otawa bin path export PATH=INSTALL_DIR/bin:$PATH