Mozart and OZ in opensuse 13.1

Has anyone had any success with running Mozart for OZ? I am taking a course on edX and it involves using Mozart but I cannot get it to work for me. I tried it in an Ubuntu VM (their instructions are for Ubuntu) and it works fine so I am guessing my issue comes from something to do with tk version in opensuse. Here is the error I get when I try to run code. just for clarity here are the instructions they provided (not sure if you can see the images, you might need to be logged in, they are not important either way):


Needed: tcl/tk, emacs and Mozart 2.

The  first command install tk-dev, more precisely the last stable version of  tk-dev. We do not guarantee that another version of tk-dev will work  with Mozart in the future. The command is:
sudo apt-get install tk-dev

If  a newer version of the package is installed, and this newer version is  not compatible with Mozart, you can try these two commands:
sudo apt-get uninstall tk-dev
sudo apt-get install tk8.5-dev

The installation procedure of tk-dev should be like this:

sudo apt-get install emacs

Get the last Mozart 2 build for your system: [Builds on SourceForge](
Note:  If you run a 32 bits system, you have to look for the corresponding  build in the list and not simply click on the first link.
Unzip the  downloaded file, rename it "mozart" (this will simplify the other  steps) and change the PATH variable to add the Mozart path.
In order to do that, open the file ~/.bashrc and add, at the end of the file, the line:  

In nano, type ctrl+o ("ctrl" and "o" pressed at the same time) to save, and then ctrl+x to quit.
You can now run the mozart OPI using the simple command: $oz

I wasn’t able to get the binaries provided by the mozart project to work. The website mentioned that mozart was known to work with tk-8.5 but may not work with other versions. But the binaries still did not work after downgrading tk from 8.6 to 8.5. A lot of other things no longer worked as well.
I was finally able to get mozart and oz up and running by building them from the source code. However, the directions they provide don’t work, there are a couple of errors during compilation because some files are not where the configuration thinks they should be.

To build mozart2 on suse 13.1 you will need:

  • git and Subversion to grab the source code
  • java >= 1.6.0
  • gcc >= 4.7.1
  • cmake >= 2.8.6
  • Boost >= 1.49.0 (with development files)
  • Tcl/Tk 8.5 or 8.6 (with development files)
  • emacs

If you install everything through the package manager all of the files should end up in the correct locations: /usr/bin for executables, /usr/lib64 for libraries and /usr/include for the dev files. Then the following sequence of commands will fetch the source, compile it and install it:

cd ~
mkdir mozart2
cd mozart2
mkdir externals
cd externals
svn co gtest
svn co llvm
cd llvm/tools/
svn co clang
cd …/…/…
mkdir builds
cd builds
mkdir gtest-debug
cd gtest-debug
cmake -DCMAKE_BUILD_TYPE=Debug …/…/externals/gtest
cd …
mkdir llvm-release
cd llvm-release
cmake -DCMAKE_BUILD_TYPE=Release …/…/externals/llvm
cd …/…/
git clone --recursive git://
cd builds
mkdir mozart2-release
cd mozart2-release
mkdir -p externals/Build/llvm/
cp -r …/llvm-release/* externals/Build/llvm/
mkdir -p externals/Source/llvm/
cp -r …/…/externals/llvm/* externals/Source/llvm/
sudo make install

The make process is rather lengthy, if desired you can use the -jN option to make which allows make to run up to N concurrent threads. On my laptop with 4GB ram -j3 works fine but any more threads would have required too much memory. For some reason when running make install -prefix=~/mozart, the prefix is ignored, so you will not be able to install it in your home directory, and you will need root access to do make install. There’s probably a way to get that last part to work, but I couldn’t figure that out.

Hope this helps

Thanks a lot for this post but I really think thats too much to do, I will just stick with Mozart in an Ubuntu VM :wink: I’m sure it will help someone else though.