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/.
Zorba is tested with the following compilers:
In order to build Zorba, you need the following libraries and development headers:
The following packages are mandatory to build the core part of Zorba.
The following packages are only required to build Zorba with some features (e.g. XML Schema or HTTP support).
ZORBA_NO_XMLSCHEMA=ON
. ZORBA_SUPPRESS_CURL=ON
. Please note that other modules depend on this module (i.e. import it). Hence, those depending modules will not work if the http module is not available. Please see our module dependency graph for the module inter-dependencies. ZORBA_XQUERYX=ON
. 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.
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.
[ZORBA] in the following.
[ZORBA].
[ZORBA]/build and refer to this directory as
[ZORBABUILD] in the following.
[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.make
. Running make will take some time. If make
finishes successfully, you're ready to install and run Zorba (see Installation).
[ZORBA] directory: cmake -G KDevelop3 [ZORBABUILD]
.cmake -D CMAKE_BUILD_TYPE=Debug [ZORBA]
.Zorba provides email support using the CClient library part of the UW IMAP toolkit.
Notes:
Linking CXX shared library libsmtp.so /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libc-client.a(osdep.o): relocation R_X86_64_32 against `server_input_wait' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libc-client.a: could not read symbols: Bad value
cd <some_directory> wget ftp://ftp.cac.washington.edu/imap/imap-2007e.tar.gz tar -xf imap-2007e.tar.gz cd imap-2007e make slx EXTRACFLAGS="-I/usr/include/openssl -fPIC"
lib
and suffixed with
.a (for example libc-client.a
on Linux/Unix or libc-client4.a
on Mac OS X).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:
make lnp
make lnp EXTRACFLAGS="-I/usr/include/openssl -fPIC" EXTRAAUTHENTICATORS=gss
in order to build with SSL and Kerberos support.For more detailed build instructions, please see the UW IMAP toolkit "Server Documentation" and the UW IMAP FAQs.
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"
Zorba provides Json manipulation support using the Jansson Library (http://www.digip.org/jansson/).
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
For Windows please follow these steps:
snprintf
with _snprintf
in src/dump.c
lines 188 and 202 and load.c
lines 96 and 108json_strtoint
with strtol
in load.c
line 481There will be a new Jansson 2.0.1 release that will include the fixed described above.
Zorba provides image manipulation support using the ImageMagick Library (http://www.imagemagick.org).
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.
For Windows, just download the ImageMagick windows binary (Q8-windows-dll) and install it.
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).
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 ..
ZORBA_THIRD_PARTY_REQUIREMENTS
cmake variablePATH
variable
[ZORBA] directory.[ZORBA]/build
). We refer to this directory as
[ZORBABUILD] in the following steps.
[ZORBABUILD] directory.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."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.
[ZORBA] directory.-G "Visual Studio ..."
instead of -G "NMake Makefiles"
.zorba.sln
project file, and start compilation.cacert.pem
and searches for it in current directory and system paths.cacert.pem
file can be found on the curl page: http://curl.haxx.se/docs/caextract.html .ZORBA_VERIFY_PEER_SSL_CERTIFICATE
can be set to OFF
in cmake (and actually this is the default value). Set it to ON
to validate server certificate chain on every access to https://
.https
test page, we used for example the rss feed fn:doc('https://www.npr.org/rss/rss.php?id=1001') .