MonetDB:Building from sources

From MonetDB
Revision as of 11:49, 13 February 2012 by Stefan Manegold (talk | contribs) (Updated from Aug2011 to Dec2011 (and removed some legacy))
Jump to navigationJump to search

Building the Dec2011 release from source tarball

Initial install

a. Create a directory where you want to place MonetDB on your machine, and `cd` into that directory, e.g.:

mkdir ~/MonetDB-Dec2011
cd ~/MonetDB-Dec2011

b. Download the source tarball: Dec 2011 release

c. Unpack the tarball in the above created directory, e.g.:

tar xf MonetDB-11.7.5.tar.xz

d. Create a build-directory and `cd` into it, e.g.:

mkdir BUILD
cd BUILD

e. `configure` the code base for your system. You would at least want to specify a 'prefix' where to install MonetDB, e.g.:

../MonetDB-11.7.5/configure --prefix=~/MonetDB-Dec2011
  • For more `configure` options, see:
../MonetDB-11.7.5/configure --help

f. Once `configure` has finished successfully, you can compile MonetDB; still in the above created BUILD directory, call:

make -j<number_of_CPU_cores_of_your_system>

g. Once the compilation has finished successfully, you can install MonetDB; still in the BUILD directory, call:

make -j<number_of_CPU_cores_of_your_system> install

h. Finally, to use MonetDB conveniently, set the following PATHs:

prefix=~/MonetDB-Dec2011
export       PATH=$prefix/bin:$PATH
export    MANPATH=$prefix/share/man:$MANPATH
export  CLASSPATH=$prefix/share/monetdb/lib:$CLASSPATH
python_lib=$prefix/`python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(0,1,"")'`
export PYTHONPATH=$python_lib/site-packages:$python_lib/dist-packages:$PYTHONPATH

Updating to a newer version

In case you need / want to get and use an updated version of the Dec2011 release of MonetDB - a new tarball, potentially including bug fixes, might be available at least once a day. First, download the latest source tarball and unpack it. Then, re-compile and install MonetDB by repeating steps f. & g. in directory BUILD as above (if necessary, `make` will automatically call `configure` with the same arguments you used initially).

Building the Dec2011 release from Mercurial (HG) sources

Introduction to Mercurial (HG)

Initial install

a. Create a directory where you want to place MonetDB on your machine, and `cd` into that directory, e.g.:

mkdir ~/MonetDB-Dec2011
cd ~/MonetDB-Dec2011

b. Get a clone of the MonetDB Mercurial (HG) repository and check out the Dec2011 branch:

hg clone -u Dec2011 http://dev.monetdb.org/hg/MonetDB/

c. `bootstrap` the source base

( cd MonetDB && ./bootstrap )

d. Proceed as of step d) above, replacing ../MonetDB-11.7.5/ by ../MonetDB/ during the `configure` call in step e.

Updating to a newer version

Go (`cd`) to directory ~/MonetDB-Dec2011, and execute:

 ( cd MonetDB && hg pull -u )

to update your clone & check out of the MonetDB repository.

Then re-bootstrap the source base as in step c. above, i.e.,

( cd MonetDB && ./bootstrap )

Finally, re-compile & install MonetDB by repeating steps f. & g. in directory ~/MonetDB-Dec2011/BUILD as above (if necessary, `make` will automatically call `configure` with the same argument you used initially).