blob: bdc2700a2798581892247fc719c494c87cd33fde [file] [log] [blame]
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<h1 id="efm-symbex-build-and-installation-instructions">EFM-SYMBEX : Build and Installation Instructions</h1>
<h2 id="overview">Overview</h2>
<p>In order to build EFM-SYMBEX, you'll need :
<br/>
</p>
<ul>
<li>
<a href="https://cmake.org/download/">CMake</a>, 2.8 or higher
</li>
<li>
<a href="http://www.boost.org/users/download/">Boost</a>, 1.53 or higher
</li>
<li>
<a href="https://gmplib.org/">GMP</a>, 2.5.1.3
</li>
<li>
<a href="http://www.antlr2.org">ANTLR2</a>, C bindings library, 2.7.7
</li>
<li>
<a href="http://www.antlr3.org">ANTLR3</a>, C bindings library, 3.4
</li>
<li>
<a href="http://cvc4.cs.nyu.edu">CVC4</a>, 1.3.1 or higher
</li>
<li>
<a href="https://github.com/davewathaverford/the-omega-project">Omega</a>
</li>
</ul>
<p>EFM-SYMBEX build is driven by CMake and tested with the following generators : </p>
<ul>
<li>Unix Makefiles (native compilers)</li>
</ul>
<h2 id="prerequisites-installation">Prerequisites installation</h2>
<h3 id="binaries-almost-installation-on-linux">Binaries (almost) installation on Linux</h3>
<p>Following instructions are given for debian-like distributions. You should adapt them to the package manager used by your distribution.
<br/>
</p>
<h4 id="cmake">CMake</h4>
<p>
<code>sudo apt-get install cmake</code>
<br/>
<code>sudo apt-get install cmake-gui</code>
<br/>
</p>
<h4 id="boost">Boost</h4>
<p>
<code>sudo apt-get install boost-1.53</code>
<br/>
</p>
<h4 id="gmp">GMP</h4>
<p>
<code>sudo apt-get install libgmp-dev</code>
<br/>
</p>
<h4 id="antlr2">ANTLR2</h4>
<p>
<code>sudo apt-get install libantlr-dev</code>
<br/>
</p>
<h4 id="antlr3">ANTLR3</h4>
<p>As no ANTLR 3.4 package seems available, it is necessary to compile a source distribution :
Download
<a href="http://www.antlr3.org/download/C/libantlr3c-3.4.tar.gz">libantlr3c-3.4.tar.gz</a> then :
<br/>
</p>
<p>
<code>tar zxvf libantlr3c-3.4.tar.gz</code>
<br/>
<code>./configure --enable-static=true --enable-shared=false</code>, add
<code>--enable-64bit</code> according to your system.
<br/>
<code>make</code>
<br/>
<code>make check</code>
<br/>
<code>sudo make install</code>
<br/>
</p>
<p>Headers and library should be automatically installed in /usr/local. Use
<code>.\configure --prefix=&lt;yourpath&gt;</code> to install in another location. In this case, you'll need to set
<code>ANTLR3_ROOT</code> variable to this location for CMake to know about it.
<br/>
</p>
<h4 id="cvc4">CVC4</h4>
<p>Add the following lines in
<code>/etc/apt/sources.list</code> :
<br/>
</p>
<p>
<code>deb http://cvc4.cs.nyu.edu/debian/ stable/</code>
<code>deb http://cvc4.cs.nyu.edu/debian unstable/</code>
<code>deb_src http://cvc4.cs.nyu.edu/debian unstable/</code>
<br/>
</p>
<p>Then do :
<br/>
</p>
<p>
<code>sudo apt-get update</code>
<br/>
<code>sudo apt-get install cvc4 libcvc4-dev</code>
<br/>
</p>
<h4 id="omega">Omega</h4>
<p>No package being available for Omega, it is necessary to compile a source distribution. Clone the source repository :
<br/>
</p>
<p>
<code>git clone https://github.com/davewathaverford/the-omega-project.git</code>
<br/>
</p>
<p>Then do : </p>
<p>
<code>make depends</code>
<br/>
<code>make libomega.a</code>
<br/>
<code>sudo make install</code>
</p>
<p>Headers and library should be automatically installed in /usr/local. Use .\configure --prefix=/usr/local to install in another location. In this case, you'll need to set
<code>OMEGA_ROOT</code> variable to this location for CMake to know about it.
</p>
<h3 id="sources-installation-on-linux">Sources installation on Linux</h3>
<p>
<strong>TO BE DONE</strong>
</p>
<h3 id="sources-installation-on-windows-mingw-msys2">Sources installation on Windows/MinGW/MSYS2</h3>
<p>
<strong>WARNING : Currently under test</strong>
</p>
<h4 id="cmake2">CMake</h4>
<p>Use the Windows installer found
<a href="https://cmake.org/download/">here</a>
</p>
<h4 id="msys2">MSYS2</h4>
<p>Follow the instructions of INSTALL_MSYS.md.</p>
<h4 id="cvc42">CVC4</h4>
<p>Download the sources archive
<a href="http://cvc4.cs.nyu.edu/builds/src/cvc4-1.4.tar.gz">cvc4-1.4.tar.gz</a>
</p>
<p>
<strong>TO BE CONTINUED</strong>
</p>
<h2 id="standard-build">Standard Build</h2>
<p>Launch cmake (or cMake-gui), set the source directory and the desired build directory.
Choose a valid generator, select your compilers (native compilers are recommended), configure and generate.
If your prerequisites are installed in non-standard locations, you'll have to set
<code>&lt;PREREQUISITE&gt;_ROOT</code> variable(s) in the CMake cache editor.
<br/>
</p>
<p>Then build the project using the built-in commands of the generator :
<br/>
</p>
<ul>
<li>With "Unix Makefiles", simply do
<code>make</code> in the build directory.
</li>
</ul>
<p>A the end of the process, the symbex executable is built and can be checked using
<br/>
<code>symbex -test</code>.
</p>
<h2 id="build-customization-for-developers">Build Customization (for developers)</h2>
<p>To customize the build, you'll have to modify CMake Files. All CMake files are
<code>CMakeLists.txt</code> or
<code>*.cmake</code>.
Each project target (main executable and internal libraries) is associated with a
<code>CMakeLists.txt</code> in which every thing specific to this target are defined. All things relative to the project as a whole (prerequisites, cmake detection module, ...) are stored stored in the cmake directory.
</p>
<h3 id="set-compilation-options">Set compilation options</h3>
<p>Options which hold for all target and whatever the platform are set in
<code>DefineGeneric.cmake</code>
Options which hold for all target and are platform-specific are set in
<code>&lt;Platform&gt;Specific.cmake</code>.
Options which hold for one target and whatever the platform are set in the
<code>CMakeLists.txt</code> of this target.
</p>
<h3 id="modify-link-command-line">Modify link command line</h3>
<p>Main target link is defined in
<code>LinkMainTarget.cmake</code>
</p>
<h3 id="change-prerequisites-look-up-add-a-nex-prerequisite">Change prerequisites look-up / Add a nex prerequisite</h3>
<p>Prerequisites are defined and searched for in
<code>LookForMandatoryPrerequisites.cmake</code>.
<br/>
Here you can add a new prerequisite or change the way an existing prerequisite is search for.
</p>
<h3 id="change-project-structure-without-adding-a-new-target">Change project structure without adding a new target</h3>
<p>Simply add a new subdirectory(ies) into existing target(s) source hierarchy.</p>
<h3 id="add-a-new-target">Add a new target</h3>
<p>To add a new
<code>newtarget</code> to the project, you have to :
<br/>
</p>
<ol>
<li>Create the
<code>newtarget</code> source hierarchy in
<code>src/newtarget/</code>
</li>
<li>Add a
<code>CMakeLists.txt</code> into target root directory
<code>newtarget/</code> (it is easy to adapt a
<code>CMakeLists.txt</code> from other targets)
</li>
<li>Add a new
<code>add_subdirectory (newtarget)</code> in
<code>DefineProjectStructure.cmake</code> to make CMake aware to the new sources
</li>
<li>Complete
<code>LinkMainTarget.cmake</code> by adding
<code>newtarget</code> to the link line.
</li>
</ol>
</body>
</html>