Zorba 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.

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. If desired, also install or download the source for any non-core modules that you would like to build along with Zorba, and ensure that you have any libraries required by those modules available. See Building Non-core Zorba Modules for more details.
  3. Zorba requires 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, you can 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 build the project. For Makefile-based builds, just type make (or make -j2 to do a parallel build on a multi-core machine). For IDE-based builds, open the project created in the previous step and build the ALL target. The build will take some time. If it finishes successfully, you're ready to install and run Zorba (see Installation).

Build Options

Notes 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