Skip to content

Software Dependencies

Andrew edited this page Jun 18, 2019 · 16 revisions

In order to build ROSE from source code, software dependencies should first be installed.

Required

Software component Necessity Supported Versions Purpose
Git Required Any recent version Used for cloning the ROSE release repository to your local machine. See Installing Git.
wget Required Any recent version Used to download the EDG binary tarball, a C/C++ parser. This is currently (Sep 2015) required even when ROSE is configured without the C/C++ frontend languages. See Installing wget.
GUN Compiler Collection Required GCC-4.2.4 or later To compile ROSE. The gcc, g++, and gfortran compilers are required. Furthermore, all libraries on which ROSE depends should be compiled with the same compiler for best results. See Installing the GNU Compiler Collection.
GNU autotools Required (or cmake) automake-1.11.1 or later; autoconf-2.59 or later; libtool-1.5.6 or later Automake, autoconf, and libtool are used to configure ROSE and generate makefiles. You can install either this dependency or the cmake dependency. See Installing GNU Autotools.
CMake Required (or autotools) 2.8.12 or later Configures ROSE and generates makefiles. You can install either this dependency or the GNU autotools. See Installing CMake.
Flex and bison Required bison-2.4.1 or later Generates code for lexical analyzers and parsers. See Installing flex and bison.
Java Virtual Machine Required Sun/Oracle version 8 Runtime for Java and Fortran frontends in ROSE. See Installing the Java runtime environment.
Java Development Kit Required (cmake) Any version 8 A JDK is required when configuring ROSE with cmake, even if the Java and Fortran frontends are disabled. See Installing the Java development kit.
Boost Required 1.57 through 1.69 C++ portable runtime features. ROSE and/or software used by ROSE requires the following Boost libraries: chrono, date_time, filesystem, iostreams, program_options, random, regex, signals, system, thread, and wave. See Installing Boost. More info here.

Optional

The following table lists optional packages for advanced users.

Software component Necessity Supported Versions Purpose
Python Required 3 Needed for the ROSE Python frontend. See Installing Python.
Doxygen Optional 1.8.1 through 1.8.10 Generates local copies of the online documentation. See Installing Oxygen.
GraphViz Optional Any recent version For visualizing graphs such as control flow graphs. See Installing GraphViz.
ZGRViewer Optional Any recent version A free Java program for interactive visualization of graphs, supporting features like zooming and panning. See Installing ZGRViewer.
LaTex Optional Any recent version For generating PDF documentation from TeX/LaTeX sources.
dot2tex Optional Any recent version Generates TeX versions of graphs for inclusion into documentation.
Qt Optional 4 For building ROSE's tools that have a graphical user interface. See Installing Qt.
GraphicsMagick Optional Any recent version See Installing GraphicsMagick.
Relational database system Optional SQLite3 and/or PostgreSQL For tools that store results in a database. See Installing a Relational Database Management System.
GNU readline Optional ? For command-line editing in interactive tools. See Installing GNU readline.
libmagic Optional 3 For identifying magic numbers in binary analysis. See Installing libmagic.
yaml-cpp Optional 0.5.1 through 0.5.3 For reading YAML or JSON configuration files and storing results. Yaml-cpp must be compiled against the same version of boost used by ROSE. See Installing YAML-cpp.
Dlib Optional 18.11 - 18.18 For certain binary analysis algorithms. See Installing Dlib.
Wt Optional 3.3.3 through 3.3.7 For binary analysis tools that present results through a web server. Wt must be compiled against the same version of Boost used by ROSE. See Installing Wt.
Yices Optional 1.0.34 An SMT solver used by certain binary analysis algorithms.
Cryptography libs Optional libssl, libxml-2, libgcrypt-11 For various analysis algorithms that use cryptographic functions. See Installing cryptography libraries.
libxml2 Optional Any recent version For parsing XML files in certain tools such as roseHPCT and BinaryContextLookup. See Installing libxml2.
MPI Optional ? For features in ROSE that allow for distributed parallel AST traversals.
Haskell compiler Optional ghc-6.10.x For ROSE API Haskell bindings so that tools can be written in Haskell. ROSE does not parse or support source-to-source analysis and transformation of the Haskell language. See Installing Haskell.
libdwarf and libel Optional dwarf-20160613 - 20170416; libelf-0.133 - 0.169 Used by binary analysis to parse DWARF debugging information. ROSE has its own internal, portable ELF parser, but libdwarf depends on the libelf parser. See Installing libdwarf and libelf.

In the tables above, the "Regularly tested" column lists the versions that are used during integration testing and portability testing. Integration testing is part of the ROSE software release process, but portability testing occurs on a separate schedule and covers only selected ROSE releases. Additional software versions are tested by ROSE authors and users in an ad hoc manner and not recorded in these tables.

Installing Git

Instructions for installing Git, a ROSE software dependency.

Red Hat Enterprise Linux 7:

To install Git, run yum group install "Development Tools" as the administrator.

Debian 7 "Wheezy":

Run apt-get install git as the administrator.

Debian 8 "Jessie":

Run apt-get install git as the administrator.

Ubuntu 14.04 "Trusty Tahr":

Run apt-get install git as the administrator.

Ubuntu 16.04 "Xenial Xerus":

Run apt-get install git as the administrator.

Installing wget

Instructions for installing wget, a ROSE software dependency.

Red Hat Enterprise Linux 7:

Run yum install wget as the administrator.

Debian 7 "Wheezy":

Run apt-get install wget as the administrator.

Debian 8 "Jessie":

Run apt-get install wget as the administrator.

Ubuntu 14.04 "Trusty Tahr":

Run apt-get install wget as the administrator.

Ubuntu 16.04 "Xenial Xerus":

Run apt-get install wget as the administrator.

Installing the GNU Compiler Collection

Instructions for installing GCC, a ROSE software dependency.

Red Hat Enterprise Linux 7:

The default compiler on RHEL 7 is GCC-4.8.5, which is supported by ROSE. To install it, run this command as the adminstrator:

yum group install "Development Tools"

Debian 7 "Wheezy"

The default compiler on Wheezy is GCC-4.7, which is supported by ROSE at this time (Jan 2016). Run these commands as the administrator:

apt-get install build-essential
apt-get install gfortran
g++ --version # make sure it says 4.7

Debian 8 "Jessie"

The default compiler on Jessie is GCC-4.9, which supported by ROSE at this time (Oct 2016).

Ubuntu 14.04 "Trusty Tahr"

The default compiler collection on Trusty Tahr is GCC-4.8.4. To install it, run these commands as the administrator:

apt-get install build-essential
apt-get install g++ gfortran
g++ --version # make sure it says 4.8

Ubuntu 16.04 "Xenial Xerus"

The default compiler collection on Xenial Xerus is GCC-5.4.0. To install it, run these commands as the administrator:

apt-get install build-essential
apt-get install g++ gfortran
g++ --version # make sure it says 5.4.0

Installing GNU Autotools

Instructions for installing GNU autotools, a ROSE software dependency.

Red Hat Enterprise Linux 7

Run yum group install "Development Tools" as the administrator.

Debian 7 "Wheezy"

Run apt-get install libtool automake as the administrator.

Debian 8 "Jessie"

Run apt-get install libtool automake as the administrator.

Ubuntu 14.04 "Trusty Tahr"

Run apt-get install libtool automake as the administrator.

Ubuntu 16.04 "Xenial Xerus"

Run apt-get install libtool automake as the administrator.

Installing CMake

Instructions for installing CMake, a ROSE software dependency.

Red Hat Enterprise Linux 7

Run yum install cmake as the administrator.

Debian 7 "Wheezy"

Run apt-get install cmake as the administrator.

Debian 8 "Jessie"

Run apt-get install cmake as the administrator.

Ubuntu 14.04 "Trusty Tahr"

Run apt-get install cmake as the administrator.

Ubuntu 16.04 "Xenial Xerus"

Run apt-get install cmake as the administrator.

Installing flex and bison

Instructions for installing Flex and bison, ROSE software dependencies.

Red Hat Enterprise Linux 7

Run yum group install "Development Tools" as the administrator.

Debian 7 "Wheezy"

Run apt-get install flex bison as the administrator.

Debian 8 "Jessie"

Run apt-get install flex bison as the administrator.

Ubuntu 14.04 "Trusty Tahr"

Run apt-get install flex bison as the administrator.

Ubuntu 16.04 "Xenial Xerus"

Run apt-get install flex bison as the administrator.

Installing the Java runtime environment

Instructions for installing the Java runtime environment, a ROSE software dependency.

Red Hat Enterprise Linux 7

Debian 7 "Wheezy"

See Debian 8 "Jessie".

Debian 8 "Jessie"

Download the required version of the Java Runtime Environment (JRE). At the time of this writing (Sep 2015) ROSE requires Sun/Oracle Java 7. These instructions assume you've jumped through the appropriate download hoops and have a file named ~/Downloads/jdk-7u51-linux-x64.tar.gz. Then run these commands as the administrator:

mkdir -p /usr/lib/jvm
cd /usr/lib/jvm
tar xf ~/Downloads/jdk-7u51-linux-x64.tar.gz
ln -s jdk1.7.0_51 java-7-sun
cd java-7-sun/bin
for f in $(find . -maxdepth 1 -type f -perm -500 -printf '%f\n'); do \
    [ "$f" != "./apt" ] && update-alternatives --install /usr/bin/$f $f /usr/lib/jvm/java-7-sun/bin/$f 1072; \
done

Make sure the "apt" command doesn't point to a symbolic link in /etc/alternatives (e.g., run ls -l $(which apt)). Once you've completed these steps, make sure that javac -version reports 1.7.0_51.

Ensure that the LD_LIBRARY_PATH contains both the java-7-sun/lib directory and the java-7-sun/jre/lib/amd64/server directory when building ROSE and when running ROSE java analysis or you may experience segmentation faults during the analysis.

Ubuntu 14.04 "Trusty Tahr"

Follow the instructions for Debian 8.

Ubuntu 16.04 "Xenial Xerus"

Follow the instructions for Debian 8, except use "1082" instead of "1072".

Installing the Java development kit

Instructions for installing the Java development kit, a ROSE software dependency.

Red Hat Enterprise Linux 7

A suitable JDK can be installed by running yum install java-1.7.0-openjdk-devel as the administrator.

Debian 7 "Wheezy"

A suitable JDK can be installed by running apt-get install default-jdk as the administrator.

Debian 8 "Jessie"

A suitable JDK can be installed by running apt-get install default-jdk as the administrator.

Ubuntu 14.04 "Trusty Tahr"

A suitable JDK can be installed by running apt-get install default-jdk as the administrator.

Ubuntu 16.04 "Xenial Xerus"

A suitable JDK can be installed by running apt-get install default-jdk as the administrator.

Installing Boost

Instructions for installing Boost, a ROSE software dependency.

It is best to install your own version of Boost from source code. The Boost website has the definitive instructions, but since Boost uses an uncommon build system that has some strange characteristics, use these instructions instead:

Do not use Boost-1.54.0 with GCC-4.8.4

BOOST_ROOT=$HOME/boost/1.50.0  # or whatever you want
wget -O boost-1.50.0.tar.bz2 http://sourceforge.net/projects/boost/files/boost/1.50.0/boost_1_50_0.tar.bz2/download
tar xf boost-1.50.0.tar.bz2
cd boost_1_50_0
./bootstrap.sh --prefix=$BOOST_ROOT --with-libraries=chrono,date_time,filesystem,iostreams,program_options,random,regex,serialization,signals,system,thread,wave
./b2 --prefix=$BOOST_ROOT -sNO_BZIP2=1 install

When compiling boost versions 1.53 and earlier, add "-sNO_COMPRESSION=1 -sNO_ZLIB=1" to the "b2" command before or after the other "-s" switch.

The "serialization" library is optional, used by the binary analysis support to save and restore analysis states (although the headers are required and installed by default during the boost build).

Make sure your LD_LIBRARY_PATH environment variable contains the "lib" directory under your boost installation prefix.

Installing Python

Instructions for installing Python, a ROSE software dependency.

If you encounter the error "configure: error: this package requires Python >= 0.0.0 and < 3.1.4." when configuring ROSE, then edit $ROSE_SRC/config/support-rose.m4 and change "[3.1.4]" to "[4.0.0]" and then rerun ROSE's "build" and "configure" steps.

Red Hat Enterprise Linux 7

Run yum install python-dev as the administrator.

Debian 7 "Wheezy"

Run apt-get install python3-dev as the administrator.

Debian 8 "Jessie"

Run apt-get install python3-dev as the administrator.

Ubuntu 14.04 "Trusty Tahr"

Run apt-get install python3-dev as the administrator.

Ubuntu 16.04 "Xenial Xerus"

Run apt-get install python3-dev as the administrator.

Installing Doxygen

Instructions for installing Doxygen, a ROSE software dependency.

Red Hat Enterprise Linux 7

Run yum install doxygen as the administrator.

Debian 7 "Wheezy"

Run apt-get install doxygen as the administrator.

Debian 8 "Jessie"

Run apt-get install doxygen as the administrator.

Ubuntu 14.04 "Trusty Tahr"

Run apt-get install doxygen as the administrator.

Ubuntu 16.04 "Xenial Xerus"

Run apt-get install doxygen as the administrator.

Installing GraphViz

Instructions for installing GraphViz, a ROSE software dependency.

Red Hat Enterprise Linux 7

Run yum install graphviz as the administrator.

Debian 7 "Wheezy"

Run apt-get install graphviz-dev as the administrator.

Debian 8 "Jessie"

Run apt-get install graphviz-dev as the administrator.

Ubuntu 14.04 "Trusty Tahr"

Run apt-get install graphviz-dev as the administrator.

Ubuntu 16.04 "Xenial Xerus"

Run apt-get install graphviz-dev as the administrator.

Installing ZGRViewer

Instructions for installing ZGRViewer, a ROSE software dependency.

Red Hat Enterprise Linux 7 Debian 8 "Jessie"

Download and untar the ZGRViewer distribution.

Edit it's "run.sh" script so that the ZGRV_HOME variable has the correct value. The scripts/zgrviewerExampleScript has some additional java switches that are useful.

If your shell is bash, edit your ~/.bashrc and add an alias that allows you to run ZGRViewer by typing "zgrviewer":

alias zgrviewer='/path/to/zgrviewer/run.sh'

Ubuntu 14.04 "Trusty Tahr"

Follow the Debian 8 instructions.

Ubuntu 16.04 "Xenial Xerus"

Follow the Debian 8 instructions

Installing Qt

Instructions for installing Qt, a ROSE software dependency.

Red Hat Enterprise Linux 7 Debian 8 "Jessie"

Run apt-get install libqt4-dev qt4-dev-tools as the administrator.

Ubuntu 14.04 "Trusty Tahr"

Run apt-get install libqt4-dev qt4-dev-tools as the administrator.

Ubuntu 16.04 "Xenial Xerus"

Run apt-get install libqt4-dev qt4-dev-tools as the administrator.

Installing GraphicsMagick

Instructions for installing GraphicsMagick, a ROSE software dependency.

Red Hat Enterprise Linux 7 Debian 7 "Wheezy"

Run apt-get install libgraphicsmagick-dev as the administrator.

Debian 8 "Jessie"

Run apt-get install libgraphicsmagick-dev as the administrator.

Ubuntu 14.04 "Trusty Tahr"

Run apt-get install libgraphicsmagick-dev as the administrator.

Ubuntu 16.04 "Xenial Xerus"

Run apt-get install libgraphicsmagick-dev as the administrator.

Installing a Relational Database Management System

Instructions for installing SQLite3 and/or PostgreSQL, a ROSE software dependency.

This document only describes how to install the libraries used by ROSE; it does not describe how to set up or manage a database system.

Red Hat Enterprise Linux 7 Debian 7 "Wheezy"

Run apt-get install libsqlite3-dev and/or apt-get install libpqxx3-dev postgresql as the administrator.

The "postgresql" package is required only if you wish to run the PostgreSQL server locally.

Debian 8 "Jessie"

Run apt-get install libsqlite3-dev and/or apt-get install libpqxx3-dev postgresql as the administrator.

The "postgresql" package is required only if you wish to run the PostgreSQL server locally.

Ubuntu 14.04 "Trusty Tahr"

Run apt-get install libsqlite3-dev and/or apt-get install libpqxx3-dev postgresql as the administrator.

The "postgresql" package is required only if you wish to run the PostgreSQL server locally.

Ubuntu 16.04 "Xenial Xerus"

Run apt-get install libsqlite3-dev and/or apt-get install libpqxx3-dev postgresql as the administrator.

The "postgresql" package is required only if you wish to run the PostgreSQL server locally.

Installing GNU readline

Instructions for installing GNU readline, a ROSE software dependency.

Red Hat Enterprise Linux 7

Run yum install readline-devel as the administrator.

Debian 7 "Wheezy"

Run apt-get install libreadline-dev as the administrator.

Debian 8 "Jessie"

Run apt-get install libreadline-dev as the administrator.

In addition, you may need to find the libreadline library and make a symbolic link in a directory that's normally searched. Do this only if you receive readline link errors in the final ROSE linking step.

Ubuntu 14.04 "Trusty Tahr"

Run apt-get install libreadline-dev as the administrator.

Ubuntu 16.04 "Xenial Xerus"

Run apt-get install libreadline-dev as the administrator.

Installing libmagic

Instructions for installing libmagic, a ROSE software dependency.

Red Hat Enterprise Linux 7 Debian 7 "Wheezy"

Run apt-get install libmagic-dev as the administrator.

Debian 8 "Jessie"

Run apt-get install libmagic-dev as the administrator.

Ubuntu 14.04 "Trusty Tahr"

Run apt-get install libmagic-dev as the administrator.

Ubuntu 16.04 "Xenial Xerus"

Run apt-get install libmagic-dev as the administrator.

Installing YAML-cpp

Instructions for installing YAML-cpp, a ROSE software dependency.

You must install this library from source code unless you're compiling ROSE using your system's default Boost libraries. If you've compiled your own boost libraries then also compile yaml-cpp using that same boost. We recommend that you install yaml-cpp into a directory whose name includes the yaml-cpp version number, the boost version number, and the compiler version number.

BOOST_ROOT=/my/boost/installation/directory
YAMLCPP_ROOT=/my/yamlcpp/installation/directory
# Download source code to ~/Downloads/yaml-cpp-0.5.1.tar.gz, then...
tar xf ~/Downloads/yaml-cpp-0.5.1.tar.gz
mkdir yaml-cpp-0.5.1/_build
cd yaml-cpp-0.5.1/_build
cmake .. -DBOOST_ROOT=$BOOST_ROOT -DCMAKE_INSTALL_PREFIX=$YAMLCPP_ROOT
make install

Installing Dlib

nstructions for installing Dlib, a ROSE software dependency.

Dlib is trivial to install. Just download the tarball and unpack it into your desired installation directory. Dlib is a headers-only library – there is nothing to compile.

Installing Wt

nstructions for installing Wt, a ROSE software dependency.

Since Wt depends on Boost, we recommend that you compile Wt from scratch rather than using a version already packaged for your distribution. It is wise to install Wt into a directory whose name includes the Wt version number, the boost version number, and the compiler version number.

# Download Wt source code, then do the following:
BOOST_ROOT=/my/boost/installation/directory
WT_ROOT=/my/desired/wt/installation/directory
tar xf wt-3.3.7.tar.gz
mkdir wt-3.3.7/_build
cd wt-3.3.7/_build
cmake .. -DBOOST_ROOT=$BOOST_ROOT -DWT_WRASTERIMAGE_IMPLEMENTATION=GraphicsMagick \
         -DCMAKE_INSTALL_PREFIX=$WT_ROOT -DCONFIGDIR=$WT_ROOT/etc/wt
make install

Installing cryptography libraries

Instructions for installing cryptography libraries that are ROSE software dependencies.

Red Hat Enterprise Linux 7

Run these commands as the administrator:

yum install libgcrypt-devel
yum install openssl-devel

Debian 8 "Jessie"

Run apt-get install libssl-dev libgcrypt11-dev as the administrator.

Ubuntu 14.04 "Trusty Tahr"

Run apt-get install libssl-dev libgcrypt11-dev as the administrator.

Ubuntu 16.04 "Xenial Xerus"

Run apt-get install libssl-dev libgcrypt11-dev as the administrator.

Installing libxml2

Instructions for installing libxml2, a ROSE software dependency.

Red Hat Enterprise Linux 7

Run yum install libxml2-devel as the administrator.

Debian 8 "Jessie"

Run apt-get install libxml2-dev as the administrator.

Ubuntu 14.04 "Trusty Tahr"

Run apt-get install libxml2-dev as the administrator.

Ubuntu 16.04 "Xenial Xerus"

Run apt-get install libxml2-dev as the administrator.

Installing Haskell

Instructions for installing ghc, a ROSE software dependency.

The Glasgow Haskell compiler, ghc, is installed by running "configure" and "make install". That should be all that is required. ROSE will detect the existence of "ghc" at "configure" time and setup what is required internally. To turn off the use of Haskell support, use the configure option "--with-haskell=no".

Note that ROSE enforces a particular version of ghc because ROSE requires some default modules that have been removed in more recently released versions of ghc.

Installing libdwarf and libelf

Instructions for installing libdwarf and libel, a ROSE software dependency.

Installing libelf

Although ROSE has its own builtin, portable ELF parser, the libelf library is a dependency of libdwarf, which is how ROSE parses DWARF debugging sections.

To install libelf, download the source code and configure it using the C compiler version corresponding to the C++ compiler used to install ROSE. After configuring, run "make install" in the "libelf" subdirectory. Do not run "make install" in the top directory because doing so will install a "dwarf.h" header file which is incompatible with the one used by libdwarf.

The libelf versions that work with libdwarf-20160613 through libdwarf-20161124 are libelf-0.133 through libelf-0.164; libdwarf-20170416 supports libelf-0.133 through libelf-169.

Installing libdwarf

To install libdwarf, download the source code and in the "libdwarf" subdirectory, run "configure" and "make". The "--enable-shared" and "--disable-nonshared" configure switches should be used.

The makefiles don't have "install" targets, so libdwarf must be installed manually. Copy libdwarf.so.1 to the installation prefix's "lib" directory and create a symbolic link named libdwarf.so. Also copy dwarf.h and libdwarf.h to the installation prefix's "include" directory.

Clone this wiki locally