-
Notifications
You must be signed in to change notification settings - Fork 62
/
INSTALL.html
179 lines (134 loc) · 5.71 KB
/
INSTALL.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Raptor RDF Parser Toolkit - Installation</title>
</head>
<body bgcolor="#ffffff" text="#000085">
<h1 align="center">Raptor RDF Parser Toolkit - Installation</h1>
<h2 align="center"><a href="http://purl.org/net/dajobe/">Dave Beckett</a><br /><a href="http://www.ilrt.bristol.ac.uk/">Institute for Learning and Research Technology</a><br /><a href="http://www.bristol.ac.uk/">University of Bristol</a></h2>
<h2>1. Getting the sources</h2>
<h2>1.1 Getting the sources from releases</h2>
<p>The sources are available from
<a href="http://www.redland.opensource.ac.uk/dist/source/">http://www.redland.opensource.ac.uk/dist/source/</a> (master site) and also from the
<a href="http://sourceforge.net/projects/librdf/">SourceForge site</a>.</p>
<h2>1.2 Getting the sources from CVS</h2>
<p>Note that using this rather than the bundles may require having
some extra development tools. Presently this includes the gperf
tool.</p>
<pre>
# 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
</pre>
<p>At this stage, or after a <tt>cvs update</tt> you will
need to create the automake and autoconf derived files, as described
below in <em>create the configure program</em>
by using the <tt>autogen.sh</tt> script.</p>
<h2>2. Configuring and building</h2>
<p>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
<a href="http://sourceforge.net/">SourceForge</a> compile farm.</p>
<h3>2.1. Create <tt>configure</tt> program</h3>
<p>If there is no <tt>configure</tt> program, you can create it
using the <tt>autogen.sh</tt> script, as long as you have the
<a href="http://www.gnu.org/software/automake/automake.html">automake</a> and
<a href="http://www.gnu.org/software/autoconf/autoconf.html">autoconf</a>
tools. Alternatively you can run them by hand with:</p>
<pre>
aclocal; autoheader; automake --add-missing; autoconf
</pre>
<p>(Ignore any warnings from autoconf about AC_TRY_RUN, it is caused
by an autoconf macro and IMHO is an autoconf bug.)</p>
<p>The automake and autoconf tools have many different versions and
at present they are being developed with automake 1.4-p5, autoconf
2.13 and libtool 1.4.2a (with debian patches for OSX support). It is
expected that development will move to automake 1.6+, autoconf 2.53
and libtool 1.4.3 or newer.</p>
<h3>2.2 Options for <tt>configure</tt></h3>
<p>Raptor also supports the following extra configure options:</p>
<dl>
<dt><tt>--with-xml-parser=NAME</tt><br /></dt>
<dd><p>Pick an XML parser to use - either <tt>libxml</tt> (default)
or <tt>expat</tt>. 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.</p>
<p>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.3.5 (on Debian unstable),
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)
</p>
<p>(Some libxml1 versions may work however this is not guaranteed or
tested and libxml1 support may be removed from future releases.)</p>
</dd>
</dl>
<h3>2.3 Configuring</h3>
<p>If everything is in the default place, do:</p>
<pre>
./configure
</pre>
<p>The most common configuration you will be doing something like this:</p>
<pre>
./configure --with-xml-parser=expat
</pre>
<h3>2.4 Compiling</h3>
<p>Compile the parser and the test program <tt>rapper</tt> with;</p>
<pre>
make
</pre>
<p>Note: GNU make is probably required so it may be gmake or gnumake
on your system</p>
<h3>2.5 Testing</h3>
<p>This test program can then be used with local RDF/XML content
files like this:</p>
<pre>
rapper file:dc.rdf
</pre>
<p>It can also extract RDF content inside general XML when the
<tt>--scan</tt> option is set. e.g. if some RDF/XML is embedded
inside some XHTML, it could be extracted with:</p>
<pre>
rapper -s file:/path/to/test/doc.xhtml
</pre>
<p>You can also run it on <a href="http://www.w3.org/TR/rdf-testcases/#ntriples">N-Triples</a> files like this:</p>
<pre>
rapper -n file:test.nt
</pre>
<p>The default output is a simple statement dump format, but it can
be changed to emit <a href="http://www.w3.org/TR/rdf-testcases/#ntriples">N-Triples</a> by using the <code>-o</code> option, like this:</p>
<pre>
rapper -o ntriples file:dc.rdf
</pre>
<p>You can build and run the built-in test suite with:</p>
<pre>
make check
</pre>
<p>which should emit lots of exciting test messages to the screen but
conclude with something like:<br />
<tt>All </tt><em>n</em><tt> tests passed</tt><br />
if everything works correctly.</p>
<hr />
<p>Copyright 2001-2002 <a href="http://purl.org/net/dajobe/">Dave Beckett</a>, <a href="http://www.ilrt.bristol.ac.uk/">Institute for Learning and Research Technology</a>, <a href="http://www.bristol.ac.uk/">University of Bristol</a></p>
</body>
</html>