SemAnt

Tuesday, June 20, 2006

3Store3

Building 3Store3 3.0.14 on Mac OS X is an absolute pain. It's pretty clear the developers haven't done so, because there are a slew of dependencies that aren't mentioned. It builds fine on Linux, so it's a case where the developers haven't realised that the assumptions they make on Linux don't always hold on other platforms (such as my beloved Mac).

So, what happens after we type ./configure?

Firstly, we couldn't find rasqal (part of Redland)

configure: error: Package requirements (rasqal >= 0.9.11) were not met:
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.


OK, so edit your .bash_profile to contain these lines:

PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
:/opt/local/lib/pkgconfig
export PKG_CONFIG_PATH

(/usr/local/lib/pkgconfig is where Redland package config files are stored, /opt/local/lib/pkgconfig is used by Darwin Ports, see below.)

Next, we don't have glib, so it's off to Darwin Ports, which packages a lot of Open Source tools for Mac OS X. Install it, then at the Terminal type:

sudo /opt/local/bin/port install glib2-devel

(this may take a while...). Make sure you have /opt/local/lib/pkgconfig in your PKG_CONFIG_PATH variable (see above). Now, we get

configure: error: Cannot find Berkeley DB library version 4


Sigh. So, we grab Berkeley DB 4, cd to the directory, and

cd build_unix
../dist/configure
make
sudo make install

So we're there, right? Not so fast, did you think this was meant to be easy? 3Store3 assumes Berkeley DB4 is somewhere it ain't.

su
mkdir /usr/include/db4
cd /usr/include/db4
ln -s /usr/local/BerkeleyDB.4.4/include/db.h
./configure LDFLAGS=-L/usr/local/BerkeleyDB.4.4/lib

Are we there yet?! Yes.

sudo make install


To set up the triple store:

ts-setup

Then $£@!#, I discover I need MySQL version 4.1.x (I'm running 4.0.21). To be fair, the documentation (what that) states this pretty clearly. OK, so we move the data safely out of the way, grab 4.1 from www.mysql.com, and install it. I was running CompleteMySQL, so I need to remove that from my path, otherwise we get the wrong mysql-config when rebuilding 3Store.

So, why did I do all this? In a word, SPARQL. Hope it's worth it...

3 Comments:

  • Hiya,


    This was very useful. I have installed 3store a number of times and it does get any easier, I had to make sure i pointed 3store to where db4 was install to get it to compile on gentoo.

    Good work,

    Mischa Tuffield

    By Anonymous Anonymous, at 1:22 pm  

  • Note to self. Now building this on Leopard, and MacPorts wouldn't cooperate (the "port install" command wouldn't work -- might be proxy issue). So, I grabbed pkgconfig directly from http://pkg-config.freedesktop.org/releases/, then gettext and glib and installed them directly (based on reading MacFUSE How To).

    By Blogger Rod Page, at 11:28 am  

  • Oops, forgot to add. The file bulk-import.c has the lines:

    33 #include &l;tdb.h>
    34 /* for fink+osx you will need, should autoconf that
    35 #include <db4/db.h>
    36 */

    Need to uncomment line 35 and comment out 33, then it builds OK.

    By Blogger Rod Page, at 11:39 am  

Post a Comment

Links to this post:

Create a Link

<< Home