Build Zorba on Ubuntu Linux

Instructions

For building Zorba on Ubuntu 11.04 (gcc version 4.5.2) folow the next steps:

Install tools

sudo apt-get update
sudo apt-get install subversion bzr build-essential cmake

Optional

sudo apt-get install valgrind

Required libraries

sudo apt-get install libxml2-dev libxslt-dev libicu-dev libcurl4-openssl-dev libtidy-dev libxerces-c-dev libz-dev

Build C-Client library

One option is to install the c-client lib from ppa:juan457/zorba.

sudo add-apt-repository ppa:juan457/zorba
sudo apt-get update
sudo sudo apt-get install libc-client2007e libc-client2007e-dev

Or build it localy using the -I/usr/include/openssl -fPIC options:

wget ftp://ftp.cac.washington.edu/imap/imap-2007e.tar.gz
tar -xf imap-2007e.tar.gz
sudo apt-get install libpam-dev
cd imap-2007e
make lnp EXTRACFLAGS="-I/usr/include/openssl -fPIC"

Note: To try again in case of errors, delete all, untar and make again, don't trust make clean.

Install ImageMagick (for image modules)

sudo apt-get install imagemagick libmagick++-dev

Install GEOS (for geo module)

sudo apt-get install libgeos-dev

If the version is older than 3.2.2 then there are two options:

a. install it from ppa:juan457/zorba.

sudo add-apt-repository ppa:juan457/zorba
sudo apt-get update
sudo apt-get install libgeos libgeos-dev

b. or compile it manually:

sudo apt-get remove libgeos-dev
svn checkout http://svn.osgeo.org/geos/trunk geos-svn
cd geos-svn
mkdir build
cd build
cmake ..
make
sudo make install

Install Jansson (for JSON module) from ppa:petri/ppa

sudo add-apt-repository ppa:petri/ppa
sudo apt-get update
sudo apt-get install libjansson4 libjansson-dev

Get and build Zorba

bzr branch lp:zorba
cd zorba
cmake -Doutdir=../zm -Dallmodules=1 -P modules/DownloadModules.cmake
mkdir build
cd build

If all libraries were installed from ppa-s:

cmake ..
make

Otherwise specify the location of c-client library:

cmake -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_PREFIX_PATH="~/imap-2007e/c-client" ../
make

Run tests

To run all Zorba tests:

ctest

Installation

To install this version of Zorba:

make install
blog comments powered by Disqus