Raptor RDF Parser Toolkit - Installation
Raptor RDF Parser Toolkit - Installation
Institute for Learning and Research Technology
University of Bristol
1. Getting the sources
1.1 Getting the sources from releases
The sources are available from http://www.redland.opensource.ac.uk/dist/source/ (master site) and also from the SourceForge site.
1.2 Getting the sources from CVS
Note that using this rather than the bundles may require having some extra development tools. Presently this includes the gperf tool.# sh, bash, ... CVSROOT=:pserver:email@example.com:/cvsroot export CVSROOT # csh, tcsh, ... setenv CVSROOT :pserver:firstname.lastname@example.org:/cvsroot cvs login Logging in to :pserver:email@example.com:2401/cvsroot CVS password: [return] cvs checkout redland/raptor cd redland/raptor
At this stage, or after a cvs update you will need to create the automake and autoconf derived files, as described below in create the configure program by using the autogen.sh script.
2. Configuring and building
Raptor uses the GNU automake and autoconf to handle system dependency checking. It requires an XML parser - either libxml2 (2.4.0 or newer, 2.5.0 or later recommended) or expat. It will optionally use libcurl, libxml2 for retrieving URIs. If GNOME glib 2.0 is present, it will be used for Unicode Normal Form C (NFC) checking. If it is missing, some of the tests will note failure.
Raptor is developed and built on x86 GNU/Linux (Redhat 9, Debian unstable) but is also regularly tested on sparc Sun Solaris 2.x, x86 FreeBSD 4.8, ppc Apple OSX 10.2 and as part of Redland on several other systems via the SourceForge compile farm (AMD IA64 SuSE 8 Linux 2.4, Alpha Debian Linux 2.2).
2.1. Create configure program
If there is no configure program, you can create it using the autogen.sh script, as long as you have the automake and autoconf tools. Alternatively you can run them by hand with:aclocal; autoheader; automake --add-missing; autoconf
The automake and autoconf tools have many different versions and at present Raptor is being developed with automake 1.6.3 (minimum version 1.6), autoconf 2.57 (minimum version 2.52) and libtool 1.4.2a (minimum version 1.4). These are only needed when compiling from CVS sources. It is expected that development will move to require automake 1.7, autoconf 2.57 and libtool 1.4.3.
2.2 Options for configure
Raptor also supports the following extra configure options:
Pick an XML parser to use - either libxml (default) minimum version 2.4.0 or expat. If this option is not given, either will be used, with libxml preferred if both are present. These can either be installed system libraries or source trees in subdirectories of these sources named libxml, expat.
Raptor has been tested with various combinations of these libraries including expat 1.95.1 (on RedHat 7.2), expat 1.95.2-2 (on RedHat 7.3), expat 1.95.2-6 (on Debian 3.0), libxml 2.4.10 (on RedHat 7.2), libxml 2.4.13 (on OSX 10.1.5), libxml 2.4.17 (on FreeBSD 4.5-RELEASE-p2), libxml 2.4.19 (on RedHat 7.2), libxml 2.4.23 (on Debian 3.0), libxml 2.4.24 (on FreeBSD 4.7-STABLE), libxml 2.4.25, 2.4.28, 2.4.30 (Debian unstable), libxml 2.5.3-2.5.4 (Redhat 9, Debian unstable), libxml 2.5.7 (Redhat 9, Debian unstable), libxml 2.5.8-2.5.9 (Debian unstable)
libxml1 is not supported.
Pick a WWW library to use - either curl, xml (for libxml), libwww for W3C libwww or none to disable it.
Set the path to the libxml xml2-config program
Set the path to the ,a href="http://curl.haxx.se/libcurl/">libcurl curl-config program
Set the path to the GNOME pkg-config program
Set the path to the W3C WWW library libwww-config program
If everything is in the default place, do:
The most common configuration you will be doing something like this:
Compile the parser and the test program rapper with;
Note: GNU make is probably required which may be called gmake or gnumake if your system has a different make available too.
Raptor has a built-in test suite that can be invoked with:
which should emit lots of exciting test messages to the screen but
conclude with something like:
All n tests passed
if everything works correctly. There might be some Unicode NFC tests that fail if GNOME glib2.0 was not available when raptor was compiled.
Raptor builds a utility RDF parsing program rapper can be tried with RDF/XML content like this:
You can also run it on N-Triples files like this:
rapper -i ntriples test.nt
The default output is a simple statement dump format, but it can
be changed to emit N-Triples by using the
-o option, like this:
rapper -o ntriples dc.rdf
Once the library has been configured and built, there are
some C example programs that can be built apart from the rapper utility.
They are in the
examples sub-directory and can be built with:
cd examples # Raptor parser abort test program make raptor_abort # Raptor GUI - only if you have the GTK libraries make grapper # If you have all requirements make examples
The public Raptor API is described in the libraptor.3 UNIX manual/web page
Copyright 2000-2003 Dave Beckett, Institute for Learning and Research Technology, University of Bristol