Compiling DPU requires clang++-6.0
, among other packages. Please also
notice that:
- The
master
branch in this project always points to the version of the code in the latest release of the tool. The development version is available in thedevelop
branch. - DPU has only been compiled and tested under Debian/Ubuntu, although it should probably work on other Linux distributions. Please note that the Steroids library only works on x86-64 machines.
- coreutils
- git
- GNU make
- Python 2
- Clang 6.0
- LLVM 6.0
- The Steroids dynamic analysis library (included as a Git submodule)
Optional:
- Analyzing C programs with multiple compilation units will require Whole Program LLVM.
The following steps assume that you have a Debian/Ubuntu distribution:
Install a suitable development environment:
sudo apt-get install coreutils git make python2.7
Install Clang v6.0 and LLVM v6.0 (see the LLVM releases). DPU currently does not compile under
g++
, and you will need Clang 6.0 to run the tool anyway:sudo apt-get install llvm-6.0-dev clang-6.0
After the installation, the command
llvm-config-6.0
should be in yourPATH
, and typingllvm-config-6.0 --prefix
should print the installation path of LLVM 6.0.Clone this project and initialize the git submodule containing the Steroids library:
git clone https://github.com/cesaro/dpu.git cd dpu git submodule init git submodule update
A number of compilation-time configuration parameters are available in the file config.mk. All of them have a safe default values but you might want to modify any of them now.
Compile the tool:
make dist
Optional: run regression tests:
make regression
DPU is now installed in the dist/
folder. You can run the tool from there
using the command:
./dist/bin/dpu --help
You can also install DPU elsewhere on your system. For that, move
the dist/
directory to any location of your convenience, but make sure you do not
alter the internal contents of the folder. Include the directory dist/bin
in your
PATH
and you are good to go.
Alternatively, you may update the value of the variable CONFIG_PREFIX
in the
config.mk file. This way, make
will copy the dist
folder to the
installation directory every time you type make install
.