File: INSTALL.html

package info (click to toggle)
rasqal 0.9.20-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 10,088 kB
  • ctags: 3,952
  • sloc: ansic: 25,718; sh: 10,694; yacc: 4,318; lex: 2,905; makefile: 2,072; perl: 1,386; xml: 90
file content (236 lines) | stat: -rw-r--r-- 8,060 bytes parent folder | download
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
  <title>Rasqal RDF Query Library - Building and Installing from Source</title>
</head>
<body>

<h1>Rasqal RDF Query Library - Building and Installing from Source</h1>

<h2>0. Prerequisites</h2>

<p>Rasqal requires the
<a href="http://librdf.org/raptor/">Raptor RDF Syntax Library</a>
version 1.4.19 or later for parsing RDF, retrieving WWW content and
other utility classes and libraries.  It can also use
<a href="http://librdf.org/">Redland</a>
as an alternate triple store and enabled by
<tt>--with-triples-source=redland</tt> as described below
however Raptor is also required.</p>


<h2>1. Getting the sources</h2>

<h2>1.1 Getting the sources from releases</h2>

<p>The sources are available from
<a href="http://download.librdf.org/source/">http://download.librdf.org/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 GIT</h2>

<p>Building from development sources rather than from a release
may required some extra development tools.  Presently this includes the 
<a href="http://lex.sourceforge.net/">flex scanner generator</a>
version 2.5.31 or later.</p>

<pre>
  git clone git://github.com/dajobe/rasqal.git
  cd rasqal
</pre>

<p>At this stage, or after a <tt>git pull</tt> you will
need to create the automake and autoconf derived files, as described
below in <a href="#sec-create-configure">Create the configure program</a>
by using the <code>autogen.sh</code> script.</p>

<p>Building Rasqal in this way requires some particular development
tools not needed when building from snapshot releases - automake and
autoconf.  The <code>autogen.sh</code> script looks for the newest
versions of the auto* tools and checks that they meet the minimum
versions.</p>



<h2>2. Configuring and building</h2>

<p>Requirements: 
the <a href="http://librdf.org/raptor/">Raptor RDF Syntax Library</a>
version 1.4.19 or later
(plus flex and bison as specified above, when building from GIT).
Recommended: <a href="http://www.pcre.org/">PCRE</a> regex library
or another implementing the POSIX regex API.  If neither is
present some of the tests will fail and the query engine will
fail to handle regex matches.
</p>

<p>Raptor uses the GNU automake and autoconf to handle system
dependency checking.  It is developed and built on x86 Linux
and x86 OSX but is also tested on other systems occasionally.
</p>


<h3><a id="sec-create-configure" name="sec-create-configure"></a>2.1. Create <code>configure</code> 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.  This is done by:</p>
<pre>
  ./autogen.sh
</pre>

<p>and you can also pass along arguments intended for configure (see
below for what these are):</p>
<pre>
  ./autogen.sh --prefix=/usr/local/somewhere
</pre>

<blockquote>
<p>On OSX you may have to explicitly set the <code>LIBTOOLIZE</code>
variable for the <code>libtoolize</code> utility since on
OSX <code>libtoolize</code> is a different program:</p>
<pre>
  LIBTOOLIZE=glibtoolize ./autogen.sh
</pre>
</blockquote>

<p>Alternatively you can run them by hand with:</p>
<pre>
  aclocal; autoheader; automake --add-missing; autoconf
</pre>

<p>The automake and autoconf tools have many different versions and
at present development is being done with automake 1.11.1 (minimum
version 1.11), autoconf 2.65 (minimum version 2.62) and libtool
2.2.10 (minimum version 2.2.0).  These are only needed when compiling
from GIT sources.  autogen.sh enforces the requirements.
</p>

<p>Rasqal also requires
<a href="http://lex.sourceforge.net/">flex</a> version 2.5.31 or newer
(2.5.4 will not work) and
<a href="http://www.gnu.org/software/bison/bison.html">GNU Bison</a>
to build lexers and parsers.
These are only required when building from GIT.</p>


<h3>2.2 Options for <tt>configure</tt></h3>

<p>Rasqal also supports the following extra configure options:</p>

<dl>
<dt><tt>--enable-query-languages=LANGUAGES</tt><br /></dt>
<dd><p>Pick the RDF query languages to build from the list:<br />
<code>rdql sparql laqrs</code><br />
The default when this option is omitted is to enable all query languages
except the experimental one, laqrs.
</p>
</dd>

<dt><tt>--enable-raptor2</tt><br /></dt>
<dd><p>Build raptor against the
beta <a href="http://librdf.org/raptor/">Raptor</a>
V2 APIs (libraptor2) rather than the default V1 APIs (libraptor).  This
is a developer option for testing against the raptor 2 beta APIs.  In
some future version, this will be the default and rasqal will depend
on raptor2.  When rasqal is built in this way and librdf is built
against it, librdf also has to be built with a configure
<code>--enable-raptor</code> option.
</p>
</dd>

<dt><tt>--with-memory-signing</tt><br /></dt>
<dd><p>Enable signing of memory allocations so that when memory is
allocated with malloc() and released free(), a check is made that the
memory was allocated in the same library.</p></dd>

<dt><tt>--with-regex-library=NAME</tt><br /></dt>
<dd><p>Pick a regex library to use - either <tt>pcre</tt> (default)
for the <a href="http://www.pcre.org/">PCRE</a>
or <tt>posix</tt> a POSIX regex implementation in the C library
</p>
</dd>

<dt><tt>--with-triples-source=NAME</tt><br /></dt>
<dd><p>Pick a triples source library to use - either <tt>raptor</tt>
(default, and always available) or <tt>redland</tt> to use
<a href="http://librdf.org/">Redland</a>.  Raptor
creates a simple in-store list of triples on parsing each time whereas
Redland makes a much more efficient indexed in-memory store.  See
also <tt>--with-redland-config</tt>.</p>
</dd>

<dt><tt>--with-pcre-config=NAME</tt><br /></dt>
<dd><p>Set the path to the <a href="http://www.pcre.org/">PCRE</a> pcre-config program</p></dd>
<dt><code>--with-raptor=</code> <code>system</code> or <code>internal</code><br /></dt>
<dd><p>
This option tells Rasqal to use either the system installed version
of Raptor or a version in the sibling directory of ../raptor
If the option is omittted, Rasqal will guess and choose either the
system one, if new enough or the internal one if present.  If
<code>--with-raptor=system</code> is used and Rasqal discovers that
the system Raptor is too old, a warning will be given but the
configuration will continue.  </p></dd>

<dt><tt>--with-redland-config=NAME</tt><br /></dt>
<dd><p>Set the path to the <a href="http://librdf.org/">Redland</a> redland-config program</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 --prefix=/usr
</pre>


<h3>2.4 Compiling</h3>

<p>Compile the library with;</p>
<pre>
   make
</pre>
<p>Note: GNU make is probably required which may be called
gmake or gnumake if your system has a different make available too.
</p>


<h3>2.5 Testing</h3>

<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.  There might be some regex
tests that fail if no POSIX regex library was available when
Rasqal was compiled.</p>


<h2>3. Using the library</h2>

<p>The public Rasqal API is described in the
<a href="librasqal.html">librasqal.3</a> UNIX manual/web page
</p>


<hr />

<p>Copyright (C) 2003-2010 <a href="http://www.dajobe.org/">Dave Beckett</a><br />Copyright (C) 2003-2005 <a href="http://www.bristol.ac.uk/">University of Bristol</a></p>

</body>
</html>