The sources are available from http://www.redland.opensource.ac.uk/dist/source/ (master site) and also from the SourceForge site.
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:anonymous@cvs.ilrt.org:/cvsroot export CVSROOT # csh, tcsh, ... setenv CVSROOT :pserver:anonymous@cvs.ilrt.org:/cvsroot cvs login Logging in to :pserver:anonymous@cvs.ilrt.org: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.
Building Raptor in this way requires some particular development
tools not needed when building from snapshot releases - automake and
autoconf. The autogen.sh
script looks for the newest
versions of the auto* tools and checks that they meet the minimum
versions.
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.6.0 or later highly 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 unless --disable-nfc-check is used. If glib is missing, some of the RDF/XML tests will note the failure but continue.
Raptor is developed and built on x86 GNU/Linux (Redhat Fedora Core 2, 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 (typically AMD IA64 SuSE 8 Linux 2.4, Alpha Debian Linux 2.2).
configure
programIf there is no configure program, you can create it using the autogen.sh script, as long as you have the automake and autoconf tools. This is done by:
./autogen.sh
and you can also pass along arguments intended for configure (see below for what these are):
./autogen.sh --prefix=/usr/local/somewhere
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 development is being done with automake 1.8.3 (minimum version 1.7), autoconf 2.59 (minimum version 2.54) and libtool 1.5.4 (minimum version 1.4). These are only needed when compiling from CVS sources. autogen.sh enforces the requirements. In future development will move to require automake 1.8, autoconf 2.58 and libtool 1.5.
Raptor also supports the following extra configure options:
Disable Unicode Normal Form C (NFC) checking code. This is usually enabled and at present, requires the GNOME glib library to provide this check for the RDF/XML parser. The check may result in a run time warning when non-normalised Unicode literals are seen in the RDF/XML. If the GNOME glib library is not available, a configure time warning may be given printed unless this option is used.
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), libxml 2.6.0-2.6.8 (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 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:
./configure
The most common configuration you will be doing something like this:
./configure --with-xml-parser=expat
Compile the parser and the test program rapper with;
make
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:
make check
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 either GNOME glib2.0 was not available when raptor was
compiled or NFC support was disabled with the
the --disable-nfc-check option to configure
Raptor builds a utility RDF parsing program rapper can be tried with RDF/XML content like this:
rapper dc.rdf
Raptor can also extract RDF content inside general XML when the -s (--scan) option is user. For example if some RDF/XML is embedded inside some SVG, it could be extracted with:
rapper -s /path/to/test/pic.svg
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 GUI - only if you have the GTK libraries make grapper # Raptor parser abort test program make raptor_abort # If you have all requirements make examples
The public Raptor API is described in the libraptor.3 UNIX manual/web page
Copyright 2000-2004 Dave Beckett, Institute for Learning and Research Technology, University of Bristol