Prerequisites for Building Zorba

The following tools and libraries are utilized by Zorba.

Configuration System

In order to build Zorba, you need the cross-platform build system CMake, version 2.6 or later (except CMake 2.6.3 that has a serious bug preventing Zorba from building). CMake's homepage is http://www.cmake.org/ and this is the best source for the Windows CMake installer. It is also available packaged for most Linux distributions, as well as in Macports for MacOS builds.

Compilers

Zorba is tested with the following compilers:
  • GNU Compiler: GCC 3.4.x (32-bit & 64-bit) and GCC 4.x.x
  • Microsoft Compiler: MS VC++ 2008, and MS VC++ 2010 (including Express)

Library Dependencies

Zorba uses a number of libraries from third parties. A few of these are required for all Zorba installations, but we have tried to keep this number as low as possible. Several others are required to enable certain Zorba features.
The following descriptions sometimes reference "CMake configuration parameters". These are passed to CMake during the configuration step; see Configuring a Zorba Build Using CMake.

Required for Core Zorba

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

Optional for Core Zorba

The following packages are also necessary to enable certain features in Zorba. These features will automatically be disabled (or are not enabled by default) if the corresponding dependencies are not detected by CMake.
  • CURL (libcurl) 7.12 or later (http://curl.haxx.se/). This package is required if Zorba's built-in HTTP module should be available. Zorba will automatically be built with this module if the curl packages are installed.
    Please note that other modules depend on the http-client module (i.e., import it). Hence, those dependent modules will not work if the http module is not available. Please see our module dependency graph for the module inter-dependencies. Also note that Zorba internally uses this module when resolving http: URIs in queries, module/schema imports, and so on. If this module is not installed, Zorba will be unable to download such URIs from the web. If you happen to have libcurl installed but would like to build Zorba without HTTP support, you may set the CMake configuration parameter ZORBA_SUPPRESS_CURL=ON.
  • LibXslt version 1.1.24 or later (http://xmlsoft.org/XSLT/). The LibXslt package is required for XQueryX support. This feature is not enabled by default. To enable XQueryX support, you need to provide the CMake configuration parameter ZORBA_XQUERYX=ON.
  • Flex 2.5.33 or later (http://flex.sourceforge.net/) and Bison 2.4 or later (http://www.gnu.org/software/bison/) are used to generate the XQuery scanner and XQuery parser. The Zorba source includes pre-generated versions of these, so Flex and Bison are only required if you are developing Zorba itself and need to modify the scanner or parser.

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.
There is a known bug in many versions of Swig that affects a small number of platforms, including at least FreeBSD. If you get compilation errors that look similar to this:
build/swig/php/zorba_apiPHP5_wrap.cxx:953: error: invalid conversion from 'const char*' to 'char*'then you may have run into this bug. Our experience is that Swig version at least 2.0.7 has corrected this bug, so please try upgrading to that version.For a particular language binding, you need the corresponding language tools and development headers. CMake will automatically enable the language bindings for any language that is detected.

Non-core Module Requirements

For many of the non-core modules, you need additional libraries. All such modules are not built if the library (and development headers) they require are not available. Here is a list of the libraries required by the current non-core modules packages: For a more up to date list please see section "External C++ Library dependencies" in the module dependency graph.In many cases you can find binary packages for these dependencies, which will be the quickest and easiest way to meet the requirements. We have provided links or instructions for downloading binary packages for some libraries on the "Build Notes" pages for various platforms; see Zorba Build Instructions.

What's Next?

Once you have obtained all the prerequisite tools and libraries for your installation, move on to Preparing to Build Zorba.