Personal tools

Build instructions

From MCRL2

Jump to: navigation, search

Contents

Introduction

The toolset relies on Boost Build v2 as its primary build engine with a slim autotools generated layer wrapped around it. Boost Build v2 itself is a collection of files in a language called Jam. The build tool is called bjam (for Boost jam) which is an interpreter for the Boost dialect of Jam. Bjam is distributed as part of the toolset and it is bootstrapped when executing `make bjam'. Details on how to use Boost Build can be found on its homepage.

A copy of the source tree can be obtained in two ways:

The Subversion revision control system is used for storing the source code of the mCRL2 toolset in a repository. Using a Subversion client it is possible to obtain a local copy of the source tree. The following command achieves this:

svn checkout https://svn.win.tue.nl/repos/MCRL2/trunk MCRL2

This creates a local directory MCRL2 with the contents of the trunk directory in the MCRL2 repository. For more information on using SVN see the Subversion website.

Two types of platforms are supported:

Windows platform

We support the following versions of Microsoft Windows:

Unix-Like platforms

We support the following UNIX-like platforms:

Limited support is provided for the following platforms:

Note: Other platforms may work, but have not been (thoroughly) tested.

Build Instructions Unix-Like platforms

Requirements

Required packages

Name Version Package
g++ >= 4.0.0 gcc-c++
make >= 3.80 make

Recommended packages

Name Version Package
wxWidgets >= 2.8.4 "libwxgtk2.8-dev" or "libwxgtk2.8-dbg"
OpenGL 7.0.1, >= 2.8.4 Mesa (GL and GLU), wxWidgets-gl

These packages are required for the following graphical tools:

Note: wxWidgets must be compiled with OpenGL for the following tools:

Optional packages

Name Version Package
default icon locations "gnome-themes", "gnome-themes-extras" or "hicolor-icon-theme"
flex >= 2.5.4a-12 flex
bison >= 2.0 bison
doxygen >= 1.5.3 doxygen
python >= 2.5.1 python

Any of these default icon location packages ensure that the tools requiring "wxWidgets" do not generate warnings on missing icons. The packages for "flex", "bison", and "python" are used to generate source code. The package for "doxygen" is used to generate HTML documentation for the website. "flex", "bison", "python" and "doxygen" are only needed for developers.

Installing a source distribution

These instructions are for compiling the toolset from source on Linux, Unix, Mac OS X and Cygwin/MinGW on Windows.

  1. Source packages can be obtained from the download page. That page also contains instructions for checking out the most recent development version from our Subversion source tree.
  2. If you downloaded an archive, e.g. mcrl2-X.tar.bz2, unpack it to a new directory, say mcrl2, as follows:
    tar -xjf mcrl2-X.tar.bz2 mcrl2
  3. From the root directory of the source tree run the following to view a list of available compilation options:
    ./configure --help
  4. When you have decided which options you want to use, run:
    ./configure ''[options]''
  5. If configure succeeded, compile and install the toolset by running:
     make 
     make install
  6. Optionally, to clean up, run:
    make clean
    or, to also remove the files generated by configure, execute:
    make distclean

Installation under Mac OS X (pre 10.4 only)

In order to install the toolset under Mac OS X 10.3 the environment variable MACOSX_DEPLOYMENT_TARGET must be set to 10.3. For C shell, this can be achieved by adding the following line to your local .cshrc:

setenv MACOSX_DEPLOYMENT_TARGET 10.3

For bash, add the following line to your local .bashrc:

export MACOSX_DEPLOYMENT_TARGET=10.3

Windows

The mCRL2 toolset can be built and installed on Windows using the following build environments:

Please refer to these web pages for instructions on how to install these tools. For MinGW and Cygwin installations the compiler packages (gcc/g++) need to be installed for compiling the toolset.

Cygwin/MinGW

To build and install the toolset in Cygwin/MinGW follow the build instructions for Unix-like platforms.

When testing a shared build (the default setting, creating dynamic link libraries) make sure that all external dynamic link libraries can be found at runtime. Especially mingw.dll or wxWidgets dll's can be missing. They are searched for in directories that are in the PATH environment variable or the same directory as the executables. It is safest to put them in the same directory as the executables.

Microsoft Visual Studio

Microsoft Visual C++ 2008 Express

It is possible to install and develop the mCRL2 toolset on Windows using Microsoft Visual Studio. This requires a copy of Microsoft Visual C++ 2008 Express, including the Windows SDK 6.0A. A copy can be found here. After installing a copy, proceed with the steps mentioned below. If a program needs to be executed from command prompt, make sure the command is executed in the Visual Studio 2008 Command Prompt (Start->Programs->Microsoft Visual C++ 2008 Express->Visual Studio Tools->Visual Studio 2008 Command Prompt).

  1. First run
    config.bat
    whilst in the directory
    <mcrl2>\build\msvc\
    . This creates the executable <mcrl2>\build\bin\bjam.exe that can be used for building the toolset as well as <mcrl2>\build\config.jam.
  2. To build and install GUI tools, wxWidgets is required. If wxWidgets has not been build and configured to work with Visual Studio proceed with the steps mentioned in the wxWidgets MSVC build instructions. It is possible to disable GUI tools. Therefore uncomment the four lines starting with WX_ and remove the WX_PREFIX from the <mcrl2>\build\config.jam file.
  3. Build the toolset by executing the following command from the root of the mCRL2 checkout directory:
    \build\bin\bjam.exe
  4. To install the toolset in the directory C:/mcrl2 execute from the root of the mCRL2 checkout directory:
    build\bin\bjam --install --prefix=C:/mcrl2

Notes:

Tips and Tricks

Development

It is recommended to develop in debug mode. Improper use of the underlying ATerm Library may cause problems, that are caught by assertions in debug mode.

Build selective tools

By selecting single tools on the command-line, with bjam invocations you can save a lot of time on building/installing. For example to install only mcrl22lps and lps2lts you can use the following command:

./build/bin/bjam --install mcrl22lps lps2lts

Also if you are not interested in using SQuADT can save some build-time by deactivating building squadt-support in tools.

./build/bin/bjam --install --disable-squadt-support mcrl22lps lps2lts

Multiple source trees for multiple platforms

Strange build problems may pop up when using a single source tree with multiple platforms/toolsets. The real problem is that the bjam executable is bootstrapped with a specific toolset on a specific platform. More concrete, the bjam executable built on MinGW with gcc behaves the same on Cygwin with gcc. This is a problem because platform dependent workarounds are activated on the wrong platform. Normally you would not use a MinGW version of bjam on Cygwin but here it just so happens because it is bundled with the toolset and used automatically when using `make'. To work around this problem when switching between platforms/toolsets with a single source tree either:

Of these alternative, the last just avoids the issue but may not always be an option. The first alternative is recommended most as, if done right, reduces the chance of making mistakes.

Installing syntax highlighting in Vim

To install vim syntax highlighting of μCRL, mCRL2 and EBNF specifications, do the following.

syntax enable
filetype plugin on
if exists("did_load_filetypes")
  finish
endif

augroup filetypedetect
  au! BufRead,BufNewFile *.bnf          setfiletype ebnf
  au! BufRead,BufNewFile *.ebnf         setfiletype ebnf
  au! BufRead,BufNewFile *.mcrl         setfiletype mcrl
  au! BufRead,BufNewFile *.mcrl2        setfiletype mcrl2
augroup END
This page was last modified on 8 December 2009, at 11:42. This page has been accessed 29,168 times.
Copyright © 2005-2010 Technische Universiteit Eindhoven.
Powered by MediaWiki