The Redland bindings depends on an installed Redland package already existing (0.9.17 or newer) so that the library, headers and SWIG interface files are available. Alternatively, Redland can be in a parent directory or a sibling directory called 'librdf'.
There are several ways to get the sources. The most stable and tested versions are the sources shipped with each release and these are recommended as the first place to start. If you want to get a newer set, then there are nightly snapshots made of the development sources, which may not yet be committed to the CVS. For the latest developent sources, anonymous CVS access is available but this may require some configuring of developer tools that are not needed for the snapshot releases.
The source bundle and package files contain all the HTML files and documentation provided on the web site.
Every release comes with full sources and these are available from http://www.redland.opensource.ac.uk/dist/source/ master site as well as the SourceForge site.
Each night a snapshot distribution is attempted using the current
development sources (that may not even be in the CVS), using the
make dist
target of the automake system. If this target
completes, these snapshots are then made available from:
http://www.redland.opensource.ac.uk/dist/snapshots/source/
(binary snapshot releases are also attempted each night from the
same sources).
# sh, bash, ... CVSROOT=:pserver:anonymous@cvs.librdf.org:/cvsroot export CVSROOT # csh, tcsh, ... setenv CVSROOT :pserver:anonymous@cvs.librdf.org:/cvsroot cvs login Logging in to :pserver:anonymous@cvs.librdf.org:2401/cvsroot CVS password: [return] cvs checkout bindings cd bindings
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 the Redland bindings in this way requires some particular
development tools not needed when building from snapshot releases -
automake, autoconf and swig.
The autogen.sh
script looks for the newest versions
of the auto* tools and checks that they meet the minimum versions.
Redland bindings uses the GNU automake and autoconf to handle system dependency checking. It is developed and built on x86 Linux (Redhat), but is also used extensively locally on various versions of sparc Sun Solaris 2.x. I also test it via SourceForges' compile farm and it builds on Debian Linux (x86, Alpha, PPC and Sparc, IA64), FreeBSD (x86) and Apple OSX.
Configure tries very hard to find several programs and libraries that the Redland bindings need. These include the binding binaries: perl, python, etc., headers for the bindings such as the JDK, Python etc. and various others. A summary of the parts found is given at the end of the configure run. Several options to configure given below can be used to point to locations or names of dependencies that cannot be automatically determined.
configure
programIf there is no configure
program, you can create it
by running 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 the automake and autoconf programs 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.
configure
See also the generic GNU installation instructions in
INSTALL for information about general options
such as --prefix
etc.
--with-java
(=JAVA-COMMAND)--with-perl
(=PERL-COMMAND)--with-php
(=PHP-COMMAND)--with-python
(=PYTHON-COMMAND)--with-ruby
(=RUBY-COMMAND)--with-tcl
(=TCL-COMMAND)Enable the given language APIs - the default is to build no language APIs automatically. If the option value is omitted or yes, configure will guess the location of the language command. If the option value is no or no option is given, the language API will be disabled - this is the default, not to build any language API.
If the option is given a value, that is used as the appropriate
language command to use. For example --with-ruby=ruby1.8
will use the 'ruby1.8' binary, whereas --with-ruby
will use
'ruby' as the binary, both of these will be searched for in the PATH.
An absolute path could alternatively be given such as
--with-python=/opt/mypython/bin/python
to use a python installation in a different location.
--with-jdk=
DIRChoose the location of the Java JDK to use for building the Java API with Java JNI. If omitted, Redland will guess likely locations but this is not guaranteed to work.
--with-redland=
system
or internal
This option tells the bindings to use either the system installed version of redland or an internal version, in a parent or sibling directory as described above. If the option is omittted, the system one is prefered, and if none is available, configure will stop.
If everything is in the default place, do:
./configure
More commonly you will be doing something like this, indicating which binding or bindings are wanted:
./configure --with-python
If you are having problems with configuring several times when adding or removing options, you may have to tidy up first with either of these:
make clean rm -f config.cache
make
You can build and run the built-in tests for Redland with:
make check
which will run these tests for the enabled languages. These may fail if the main redland libraries (librdf and raptor, rasqal) are not installed but are used in nearby source trees. So in this case you should install redland, raptor and rasqal first
The language-specific tests can also be built and run with:
cd language make check
To install the bindings, do:
make install
Otherwise, the language-specific installations can be made with:
cd language make install
There are many examples for all of the language interfaces in the
corresponding sub-directories such as perl/example.pl
which may be easier to modify.
See the Redland Perl Interface document for full information on installing and using Redland from Perl.
See the Redland Python Interface document for full information on installing and using Redland from Python.
See the Redland Tcl Interface document for full information on installing and using Redland from Tcl, and/or Tcl/Tk.
See the Redland Java Interface document for full information on installing and using Redland from Java.
See the Redland Ruby Interface document for full information on installing and using Redland from Ruby.
See the Redland PHP Interface document for full information on installing and using Redland from PHP.
See the Redland C# Interface document for full information on installing and using Redland from C# or an ECMA CLI language.
Copyright 2004 Dave Beckett, Institute for Learning and Research Technology, University of Bristol