These information apply to OpenBSD. Feel free to contribute and add instructions for other BSD distribution if general information found in the main Readme do not directly apply.
-
Download and install the following tools from the OpenBSD packages directory :
$ export PKG_PATH=http://ftp.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(uname -m)/ $ pkg_add -i jre jdk cmake git subversion boost gcc g++ emacs tcl tkMake sure, when choice is offered, to install the latest version available of these tools, as required in the main Readme. Please note that default gcc version included in OpenBSD is too old for Mozart to compile.
-
The directory layout suggested in main Readme will be assumed here.
-
Download Gtest in your
<projects>/externals/gtestdirectory as suggested in the main Readme. -
In your terminal, launch Gtest compilation by typing :
$ cd <projects>/builds/gtest-debug $ cmake -DCMAKE_C_COMPILER="egcc" -DCMAKE_CXX_COMPILER="eg++" -DCMAKE_BUILD_TYPE=Debug ../../externals/gtest $ makeNote that the recent gcc you have installed is identified by
egccon OpenBSD and no confusion must be made to avoid compilation errors.
-
Download LLVM in your
<projects>/externals/llvmdirectory as suggested in the main Readme. -
In your terminal, launch LLVM compilation by typing :
$ cd <projects>/builds/llvm-release $ cmake -DCMAKE_C_COMPILER="egcc" -DCMAKE_CXX_COMPILER="eg++" -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86" ../../externals/llvm $ makePlease note that compilation may fail due to resource limitation. Use
ulimitto temporarily change these values.
-
Download Mozart in your
<projects>/mozart2directory as suggested in the main Readme. -
In your terminal, launch Mozart compilation by typing :
$ cd <projects>/builds/mozart2-release $ cmake -DCMAKE_C_COMPILER="egcc" -DCMAKE_CXX_COMPILER="eg++" -DCMAKE_BUILD_TYPE=Release -DGTEST_SRC_DIR=../../externals/gtest -DGTEST_BUILD_DIR=../gtest-debug -DLLVM_SRC_DIR=../../externals/llvm -DLLVM_BUILD_DIR=../llvm-release -DCMAKE_CXX_FLAGS="-I/usr/local/include -I/usr/local/include/c++/4.8.2 -I/usr/local/include/c++/4.8.2/x86_64-unknown-openbsd5.5 -I/usr/X11R6/include -pthread -O3" -DCMAKE_INSTALL_PREFIX=../../redist ../../mozart2 $ makeReplace
4.8.2andx86_64-unknown-openbsd5.5by the folders corresponding to your gcc installation. You may need to add parameter-DCMAKE_CXX_LINK_FLAGS="-latomic"on some versions if linking fails with undefined references. -
To copy all the binaries in the
redistfolder, type :$ make install