Click to change color scheme

Notes on codes, projects and everything

Building librdf-storage-virtuoso Package

I wanted to try using virtuoso as the storage engine for Redland but unfortunately there is no librdf-storage-virtuoso package for Ubuntu. After getting some help from @dajobe, I attempted to build the packages myself. Although it takes quite some time to build packages, but not too difficult it seems.

The version of Redland that I am attempting to build is 1.0.13, and unfortunately this means I would have to build librasqal3 too as the version provided by Ubuntu Natty is not up to date. Installing the packages may cause some breakage, so… YMMV.


By following the instructions here, add this source repository to /etc/apt/sources.list

deb-src ./

And then run an apt-get update

$ sudo apt-get update

Building Rasqal

To build Rasqal, first grab the source package

$ sudo apt-get source librasqal

Grab the source packages

$ sudo apt-get source librasqal3

.. install the dependencies

$ sudo apt-get build-dep librasqal3 librasqal3-dev

Then build them

$ sudo apt-get -b source librasqal3

Then install librasqal3, librasqal3-dev, rasqal-utils

Build Redland

First we will need to grab the packages

$ sudo apt-get -b source librdf0

You may get an error saying some packages can’t be downloaded, in particular the source package. Just download this into the same directory as the other downloaded tarballs and rename it as redland_1.0.13.orig.tar.gz (Note: as of writing, source packages for 1.0.14 is not out yet, you may want to adjust when package for 1.0.14 is out).

There are some other dependencies besides the listed ones that needs to be installed, to install all of them, issue these commands

$ sudo apt-get install virtuoso-opensource unixodbc-dev
$ sudo apt-get build-dep librdf0

Now we can proceed to build Redland

$ sudo apt-get -b source librdf0

To build librdf-storage-virtuoso, Navigate to $REDLAND_SRC/redland-1.0.13/debian and edit a file named ‘control’ (without the quotes). Append this to the end of the file.

Package: librdf-storage-virtuoso
Section: libs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Replaces: librdf0 (<< 1.0.9-3)
Description: RDF library, Virtuoso backend
 Redland is a library that provides a high-level interface for RDF
 (Resource Description Framework) implemented in an object-based API.
 It is modular and supports different RDF/XML parsers, storage
 mechanisms and other elements. Redland is designed for applications
 developers to provide RDF support in their applications as well as
 for RDF developers to experiment with the technology.
 This package contains the Virtuoso storage backend.

Edit a file named 'files' (without the quotes) and append this line

librdf-storage-virtuoso_1.0.13-2_i386.deb libs optional

Add a new file named librdf-storage-virtuoso.install with the following content


Add another file named librdf-storage-virtuoso.substvars

shlibs:Depends=libc6 (>= 2.3.6-6~), libc6 (>= 2.4), libdb4.8, librdf0 (>= 1.0.13), unixodbc (>= 2.2.11)

Not sure what happens, but that was the edited version after building the packages, my original version is shown below (will update once I find out why)

shlibs:Depends=libc6 (>= 2.3.6-6~), libc6 (>= 2.4), libdb4.8, librdf0 (>= 1.0.13), unixodbc-dev (>= 2.2.14p2-2ubuntu1), virtuoso-opensource (>= 6.1.2+dfsg1-1ubuntu4)

Lastly, create a new file named librdf-storage-virtuoso.debhelper.log from librdf-storage-mysql.debhelper.log Apparently this file is generated automatically, thanks @dajobe for the tip again.

Lastly, navigate back to $REDLAND_SRC and build the packages again

# apt-get -b source librdf0

Building Redland-bindings

Same thing again, first grab the source packages

$ sudo apt-get source redland-bindings

Since I am just interested in the php5-librdf package, I issue this to fetch the dependencies

$ sudo apt-get build-dep php5-librdf

Proceed with building

$ sudo apt-get -b source php5-librdf

Everything looks fine as of now, but I am seeing some random conflicts. Will try to work with the virtuoso storage engine and post a follow up later today.

leave your comment

name is required

email is required

have a blog?

This blog uses scripts to assist and automate comment moderation, and the author of this blog post does not hold responsibility in the content of posted comments. Please note that activities such as flaming, ungrounded accusations as well as spamming will not be entertained.