Build Instructions

Requirements

Build System

In order to build Zorba, you need the Cross-Platform Make CMake 2.6 or later (except CMake 2.6.3 that has a serious bug preventing Zorba from building). You can download CMake from http://www.cmake.org/.

Compilers

Zorba is tested with the following compilers:

Required Libraries

In order to build Zorba, you need the following libraries and development headers:

Required for Core Zorba

The following packages are mandatory to build the core part of Zorba.

Optional for Core Zorba

The following packages are only required to build Zorba with some features (e.g. XML Schema or HTTP support).

Required for Language Bindings

In order to build the various language bindings that come with Zorba, you need at least Swig 1.3.40 or later (http://www.swig.org/download.html). All bindings are generated using Swig.

For a particular language binding, you need the corresponding language tools and development headers.

Required for Non-Core Modules

Zorba provides a huge variety of XQuery modules. For most of the (external) modules, you need additional libraries. All such modules are not build if the library (and development headers) they require are not available. In the following, please find a list of required libraries.

Please note that some of these modules depend on other modules. For example, the EXPath http-client module depends on Zorba's http-client module and the tidy data-converter. Please see our module-interdependency graph for details.

Building Zorba

  1. Install the Zorba source distribution (see Installation). The directory in which the Zorba sources are installed is referred to as [ZORBA] in the following.
  2. Change the working directory into [ZORBA].
  3. The recommended way to build Zorba is by creating an out-of-source build. We suggest to create the directory [ZORBA]/build and refer to this directory as [ZORBABUILD] in the following.
  4. Change the working directory into the [ZORBABUILD] directory and execute cmake as follows: cmake [ZORBA]. In case the [ZORBABUILD] is located directly within the [ZORBA] directory, just type cmake .. . This command should configure Zorba and prepare for the build. CMake will tell you if your installation is missing some of the required libraries or development headers.
  5. If CMake executed successfully, you should be able to run make. Running make will take some time. If make finishes successfully, you're ready to install and run Zorba (see Installation).

Build Options

Building IMAP CClient

Zorba provides email support using the CClient library part of the UW IMAP toolkit.

Unix/Linux/Mac OS X

Notes:

Use the following extra CMake arguments when building Zorba:

-D "CCLIENT_INCLUDE=path_to_imap-2007e\c-client"
-D CCLIENT_LIBRARY=path_to_imap-2007e\c-client\libc-client.a"

Here are some quick suggestions to build CClient on Linux:

For more detailed build instructions, please see the UW IMAP toolkit "Server Documentation" and the UW IMAP FAQs.

Windows

You must build the UW IMAP toolkit.

Use the following extra CMake arguments when building Zorba:

-D "CCLIENT_INCLUDE=path_to_imap-2007e\c-client"
-D "CCLIENT_LIBRARY=path_to_imap-2007e\c-client\release\cclient.lib"

Building Jansson

Zorba provides Json manipulation support using the Jansson Library (http://www.digip.org/jansson/).

Unix/Linux/Mac OS X

For Linux/Unix systems, download the Jansson library from http://www.digip.org/jansson/releases/. Then follow the instructions from http://www.digip.org/jansson/doc/2.0/gettingstarted.html#compiling-and-installing-jansson.

The source use GNU Autotools (autoconf, automake, libtool), so compiling and installing is extremely simple:

./configure
make
make check
make install

On Fedora starting with version 12, Jansson is also available as a package, so (as root) you can simply run:

yum install -y jansson-devel

Ubuntu packages are available from PPA of https://launchpad.net/~petri/+archive/ppa

Windows

For Windows please follow these steps:

There will be a new Jansson 2.0.1 release that will include the fixed described above.

Building ImageMagick

Zorba provides image manipulation support using the ImageMagick Library (http://www.imagemagick.org).

Unix/Linux/Mac OS X

For Linux/Unix systems, just use the package manager to install the magick++, magickwand, magickcore packages including the developer versions of these packages (that inlcude the header files).

On OSX, use macports to install imagemagick.

Windows

For Windows, just download the ImageMagick windows binary (Q8-windows-dll) and install it.

Note for Mac OS X Users

The easiest way to install the required packages (like CMake or Xerces-C) is to use Macports (http://macports.org/).

Once all the required packages are installed you can execute CMake. By default, CMake on Mac OS X uses the Makefile generator. Alternatively, you can specify different generators (e.g., Xcode) by starting CMake using the -G option (e.g., -G Xcode).

Swig Version

Due to a bug in older swig version, Zorba with SWIG support requires SWIG version 1.3.40 or later.

To do this, the swig package from macports should be installed and point cmake to use the new version:

sudo port install swig
cmake -DCMAKE_PREFIX_PATH=/opt/local ..

Notes for Windows Users

Building Zorba using a NMake Project

  1. Start a Visual Studio Command Line.
  2. Change the current working directory to the [ZORBA] directory.
  3. It is not allowed to have in-source builds. So you must create a build directory (e.g., [ZORBA]/build). We refer to this directory as [ZORBABUILD] in the following steps.
  4. Change the current working directory to the [ZORBABUILD] directory.
  5. Execute CMake as follows cmake -G "NMake Makefiles" [ZORBA]. CMake will try to find the necessary packages in the program files directory on your system and in the PATH environment variable. If one of the required dependencies were not found, CMake will stop with an error. See the next step only if this step did not find the required third party dependencies on your system.
  6. If the command above fails or if you see that some optional packages were not found, you can help CMake a little by providing the lists of path where it should look for the libraries you need. In this case the CMake command should look like:
    "cmake" -G "NMake Makefiles" -D ZORBA_THIRD_PARTY_REQUIREMENTS=path\to\dir1;path\to\dir2;...
    

But you can also manually set the paths to individual libraries and include directory by directly providing the variables set by each find package module (in the cmake_modules directory).

In order to add XQueryX support you have to add ZORBA_XQUERYX=ON and add the paths to libxslt

-D ZORBA_XQUERYX=ON
-D LIBXSLT_INCLUDE_DIR="path_to_libxslt\include"
-D LIBXSLT_LIBRARIES="path_to_libxslt\lib\libxslt.lib"

Now you are ready to call nmake from the [ZORBABUILD] directory.

Building Visual Studio Project

  1. Start Visual Studio Command Line
  2. Change the current working directory into the [ZORBA] directory.
  3. Execute CMake as described above but with the appropriate CMake Visual Studio generator (-G "Visual Studio ..." instead of -G "NMake Makefiles".
  4. Start Visual Studio, open the generated zorba.sln project file, and start compilation.

HTTPS support

blog comments powered by Disqus