Raptor RDF Parser Toolkit - Installation

Dave Beckett
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: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.

2. Configuring and building

Raptor uses the GNU automake and autoconf to handle system dependency checking. It is developed and built on x86 Linux (Redhat 7.2 and Debian unstable) but is also used extensively locally on various versions of sparc Sun Solaris 2.x and tested as part of Redland on many other systems via the SourceForge compile farm.

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

(Ignore any warnings from autoconf about AC_TRY_RUN, it is caused by an autoconf macro and IMHO is an autoconf bug.)

2.2 Options for configure

Raptor also supports the following extra configure options:

--with-xml-parser=NAME

Pick an XML parser to use - either expat (default) or libxml otherwise either will be used, with expat preferred at 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), libxml 2.4.10 (on RedHat 7.2), libxml 2.4.17 (on FreeBSD 4.5-RELEASE-p2), libxml 2.4.19 (on RedHat 7.2)

2.3 Configuring

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

2.4 Compiling

Compile the parser and the test program rdfdump with;

   make

Note: GNU make is probably required so it may be gmake or gnumake on your system

2.5 Testing

This test program can then be used with local RDF/XML content files like this:

  rdfdump file:dc.rdf

It can also extract RDF content inside general XML when the --scan option is set. e.g. if some RDF/XML is embedded inside some XHTML, it could be extracted with:

  rdfdump -s file:/path/to/test/doc.xhtml

You can also run it on N-Triples files like this:

  rdfdump -n file: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:

  rdfdump -o ntriples file:dc.rdf

You can build and run the built-in test suite 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.


Copyright 2001-2002 Dave Beckett, Institute for Learning and Research Technology, University of Bristol