6.3 Building Mozart

Now we can get to the real thing. Retrieve the sources from the CVS:

cvs -d cvs.mozart-oz.org:/services/mozart/CVS get mozart
cvs -d cvs.mozart-oz.org:/services/mozart/CVS get mozart-stdlib

(specify -r mozart-1-2-0-fixes to get the fixes branch). See http://www.mozart-oz.org/download/cvs.html for details about anonymous CVS. Let mozart be the directory created by the first cvs get command and stdlib the one created by the second.

Environment Variables

We need to start with a clean PATH, which in particular must not contain any Mozart installation. The following works on my system:

export PATH=/usr/bin:/bin:emacs/bin:/cygdrive/c/WINNT/system32:/cygdrive/c/WINNT

Furthermore, we want to tell the configuration scripts where we placed our Windows DLLs:

export windlldir=packages/dlls

The Fun Part

Say we want to install Mozart into directory install. Then we can configure, build, and install Mozart as follows:

cd build 
mkdir mozart-build
cd mozart-build
CC=gcc-2 CXX=gcc-2 
mozart/configure \
    --prefix=
install \
    --with-inc-dir=
packages/include \
    --with-lib-dir=
packages/lib \
    --with-tcl=
packages \
    --with-tk=
packages \
    --disable-contrib-compat \
    --with-stdlib=
stdlib 
make bootstrap
make install

A note on the configuration options: Most of these should be clear, they simply convey to the configuration scripts the knowledge of where we placed our packages. More information on configuration options can be found in Chapter 7. We have to disable the compat contrib because it does not build in bootstrap mode (yet). This is why we have to build it separately once we have our installed system:

cd build 
mkdir compat-build
cd compat-build
export PATH=
install/bin:$PATH 
mozart/contrib/compat/configure --prefix=install 
mkdir share
cp 
build/mozart-build/share/Makefile.boot share
make
make install

And yeah, verily, thus and so - we're done.

Using Mozart

To use Mozart, you simply have to extend your PATH:

export PATH=install/bin:$PATH

Then you can start oz, ozc and so on, as you would expect.


Denys Duchier, Leif Kornstaedt, Ralf Scheidhauer and Christian Schulte
Version 1.2.5 (20030703)