Skip to content

ROSE Install

Nathan Pinnow edited this page Oct 18, 2019 · 4 revisions

This page describes the configuration of ROSE Compiler using Autoconf or Cmake. Other pages will tell you more about how ROSE is distributed, the hardware requirements, and the software dependencies to compile and utilize ROSE. If you encounter an issue, you might find a solution on the troubleshooting page.

These steps assume you have a compatible version of GCC and BOOST, if you do not see Installing the compiler and boost from source for instructions on how to set up gcc and boost. The variable NUM_PROCESSORS sets up how parallel the install process will be with each one needing 1.4GB of RAM.

Here is the Collaboration diagram for installing ROSE

We provide system specific step-by-step instructions for:

Configuring ROSE

ROSE must be configured before it can be built. Two mechanisms are supported: GNU autotools and CMake. Most tests, tools, and projects can only be built with autotools at this time. Both methods boil down to running some configuration step that detects (or is told) what optional software is available, and this produces a set of makefiles for building ROSE.

In the instructions that follow, "$ROSE_SRC" is the top-level directory holding the ROSE source code, and "$ROSE_BLD" is a build directory that these instructions have you create to hold files generated during the build.

Configuring and building with GNU autotools

If you desire to configure ROSE with GNU autotools instead of CMake, follow these steps:

  • Run "./build" in the $ROSE_SRC directory. This script takes no arguments and modifies the ROSE source tree to prepare it for using the GNU autoconf tool. This includes building the "configure" script used in the third step below. The "build" script must be run when $ROSE_SRC is the current working directory.

  • Create a new directory that will serve as the build area. The following steps use "$ROSE_BLD" to indicate this directory. The build directory can be anywhere in your filesystem, usually outside the source tree. ROSE will take substantially less time to build if the build tree is a local disk instead of NFS.

  • With the current directory set to the top of the build tree ("cd $ROSE_BLD") run the "$ROSE_SRC/configure", giving it "--prefix=DIR", "--enable-languages=LIST", and "--with-boost=DIR" switches. The $ROSE_SRC directory should be an absolute path name (beginning with "/"). The "--help" switch will list all available configure switches, some of which are not routinely tested by the ROSE team. In short, "--prefix=DIR" specifies where ROSE will ultimately be installed, "--enable-languages=LIST" takes a list of languages that ROSE should support, and "--with-boost=DIR" specifies the location of the Boost headers and libraries (or you can omit this to use system-installed versions). If you specify non-system locations for Boost or other libraries you may need to also set the LD_LIBRARY_PATH environment variable. The variable NUM_PROCESSORS sets up how parallel the install process will be with each one needing 1.4GB of RAM.

The following command lines are usually used to install rose on RedHat 7 systems:

JAVA_PATH=/path/to/my/java/installation/directory
BOOST_ROOT=/path/to/my/boost/installation/directory
export LD_LIBRARY_PATH="$BOOST_ROOT/lib:$LD_LIBRARY_PATH"
git clone https://github.com/rose-compiler/rose
cd rose
./build
cd ..
mkdir buildrose 
cd buildrose
../rose/configure --prefix=$HOME/my-rose-installation --enable-languages=c,c++ --enable-edg_version=5.0 --with-boost=$BOOST_ROOT --with-java=$JAVA_PATH
make rose-core -j${NUM_PROCESSORS}
make install-core -j${NUM_PROCESSORS}

The following command lines show how to install on Ubuntu 18.04 systems:

git clone https://github.com/rose-compiler/rose
cd rose/
./build
cd ..
mkdir buildrose
cd buildrose/
../rose/configure --prefix=/home/demo/opt/rose-inst --enable-edg_version=5.0 --with-boost-libdir=/usr/lib/x86_64-linux-gnu --with-boost=/usr
make rose-core -j${NUM_PROCESSORS}
make install-core -j${NUM_PROCESSORS}

Configuring and building with CMake

If you desire to configure ROSE with CMake instead of GNU autotools, Follow these steps:

  • Create a new directory that will serve as the build area. The following steps use "$ROSE_BLD" to indicate this directory. The build directory can be anywhere in your filesystem, usually outside the source tree. ROSE will take substantially less time to build if the build tree is a local disk instead of NFS.
  • With the current directory set to the top of the build tree (cd $ROSE_BLD), run "cmake" and give it the relative name (starting with "..", not "/") of the $ROSE_SRC directory. The "cmake" command also takes additional switches to specify the final ROSE installation directory, the locations of software dependencies, and other configuration options. You may also need to add directories to your LD_LIBRARY_PATH on Linux in order for cmake to find shared libraries that you've installed in non-standard places.
cd $ROSE_BLD
ROSE_SRC=../relative/path/to/the/rose/source/tree
BOOST_ROOT=/path/to/my/boost/installation/directory
export LD_LIBRARY_PATH="$BOOST_ROOT/lib:$LD_LIBRARY_PATH"
cmake $ROSE_SRC -DCMAKE_INSTALL_PREFIX=$HOME/my-rose-installation -DBOOST_ROOT=$BOOST_ROOT
make -j4

Other notes

If you encounter errors about downloading EDG binary tarballs, see Installing EDG.

If you modify a ROSE header file then run "make -C $ROSE_BLD clean" before rebuilding if you're using GNU automake (not necessary for CMake).

Using the library