How-to: Install ROSE on RHEL 7
Installing ROSE on RedHat Enterprise Linux (RHEL) 7.2 is as straightforward as executing this Bash script:
#!/bin/bash -ex
#
# Author: Justin Too
# Date: February 19, 2016
#
# Tested on Amazon Web Services (AWS) EC2 image: ami-d1315fb1 (~35 minutes).
# - m4.2xlarge and m4.4xlarge
# - 30 GB EBS volume
#
# Compiler:
# - System GCC 4.8.5
#
#-----------------------------------------------------------------------------
# 4/27/17: update to EDG 4.12 and C++11 mode
#-----------------------------------------------------------------------------
: ${PARALLELISM:=$(cat /proc/cpuinfo | grep processor | wc -l)}
: ${ROSE_VERSION:=master}
: ${GMP_VERSION:=5.1.2}
: ${MPFR_VERSION:=3.1.2}
: ${MPC_VERSION:=1.0}
: ${GCC_VERSION:=5.3.0}
: ${BOOST_VERSION:=1.62.0}
sudo yum upgrade -y
yum groupinstall -y "Development Tools"
sudo yum install -y wget git gcc-c++ automake autoconf libtool flex ghostscript graphviz
# optional editor
sudo yum install -y emacs vim
mkdir -p ~/opt/autoconf
cd ~/opt/autoconf
curl -s https://gist.githubusercontent.com/rosecompiler/679d0aae205f687a7091/raw/1cd8b2e1843c6301b20b537770d0fe512aff24d5/install-autoconf.sh | bash /dev/stdin 2.69
source 2.69/setup.sh
mkdir -p ~/opt/automake
cd ~/opt/automake
curl -s https://gist.githubusercontent.com/rosecompiler/0354522d809b5803f17a/raw/d5c091a53e8831279b1ce49385572f28176771e8/install-automake.sh | bash /dev/stdin 1.14
source 1.14/autoconf/2.69/setup.sh
mkdir -p ~/opt/libtool
cd ~/opt/libtool
curl -s https://gist.githubusercontent.com/rosecompiler/f13bf9725f9ac99f6639/raw/2e759064a70d6a136509339bf279929910da9277/install-libtool.sh | bash /dev/stdin 2.4
source 2.4/automake/1.14/autoconf/2.69/setup.sh
mkdir -p ~/opt/bison
cd ~/opt/bison
curl -s https://gist.githubusercontent.com/justintoo/4d43442f1970690f846d/raw/395224c39452f5980ba513390c55393261410fd5/install-bison.sh | bash /dev/stdin 3.0
source 3.0/setup.sh
mkdir -p ~/opt/gmp
cd ~/opt/gmp
curl -s https://gist.githubusercontent.com/rosecompiler/815bdf7fbe90ec2dfe8c/raw/048a81419e8e013a9352d31e76eeabd6b8e00fa9/install-gmp.sh | \
bash /dev/stdin ${GMP_VERSION} && \
source ${GMP_VERSION}/setup.sh
mkdir -p ~/opt/mpfr
cd ~/opt/mpfr
curl -s https://gist.githubusercontent.com/rosecompiler/8f00ffbd5e13f8978c08/raw/eeaba5a779d7a8b5d05f00101c3d14689933b700/install-mpfr.sh | \
bash /dev/stdin ${MPFR_VERSION} && \
source ${MPFR_VERSION}/gmp/${GMP_VERSION}/setup.sh
mkdir -p ~/opt/mpc
cd ~/opt/mpc
curl -s https://gist.githubusercontent.com/justintoo/468f0a097caa320be54828a9310ca3a5/raw/12cfd322d6aeae3e8f7949c482d3bd9010167428/install-mpc.sh | \
bash /dev/stdin ${MPC_VERSION} && \
source ${MPC_VERSION}/mpfr/${MPFR_VERSION}/gmp/${GMP_VERSION}/setup.sh
mkdir -p ~/opt/gcc
cd ~/opt/gcc/
curl -s https://gist.githubusercontent.com/justintoo/a2120618ad858245ea8862f9306ada63/raw/9bf07c0d8ba1e10fb84a78f918d099af9693eec4/install-gcc.sh | \
bash /dev/stdin ${GCC_VERSION}
source ${GCC_VERSION}/setup.sh
mkdir -p ~/opt/boost
cd ~/opt/boost/
curl -s https://gist.githubusercontent.com/justintoo/47571bc6f0cc58aa0bfb8f1122294e40/raw/5e1a7a3ab07590a96b1f9077168e46acda7a5cd3/install-boost-c++11.sh | bash /dev/stdin ${BOOST_VERSION}
source ~/opt/boost/${BOOST_VERSION}/gcc/${GCC_VERSION}/setup.sh
mkdir -p "~/rose/${ROSE_VERSION}"
cd "~/rose/${ROSE_VERSION}"
cat > setup.sh <<-EOF
source "${BISON_HOME}/setup.sh"
source "${LIBTOOL_HOME}/setup.sh"
source "${BOOST_HOME}/setup.sh"
export ROSE_WORKSPACE="$(pwd)"
export ROSE_SOURCE="\${ROSE_WORKSPACE}/rose"
export ROSE_BUILD="\${ROSE_WORKSPACE}/build"
export ROSE_HOME="\${ROSE_WORKSPACE}/installation"
export PATH="\${ROSE_HOME}/bin:\${PATH}"
export LD_LIBRARY_PATH="\${ROSE_HOME}/lib:\${LD_LIBRARY_PATH}"
EOF
source setup.sh
mkdir -p "${ROSE_HOME}"
cp setup.sh "${ROSE_HOME}"
git clone https://github.com/rose-compiler/rose-develop.git "${ROSE_SOURCE}"
cd "${ROSE_SOURCE}"
./build || exit 1
mkdir "${ROSE_BUILD}"
cd "${ROSE_BUILD}"
"${ROSE_SOURCE}/configure" \
--prefix="${ROSE_HOME}" \
--with-boost="${BOOST_HOME}" \
--disable-boost-version-check \
--enable-edg_version=4.12 \
--enable-languages=c,c++,binaries \
CXXFLAGS=-std=c++11 || exit 1
make -j${PARALLELISM} install-core || exit 1
cat >> ~/.bash_profile <<-EOF
source "${ROSE_HOME}/setup.sh" || false
EOF
cat <<-EOF
-------------------------------------------------------------------------------
[SUCCESS} ROSE was successfully installed here:
[SUCCESS}
[SUCCESS} ${ROSE_HOME}
[SUCCESS}
[SUCCESS} Use this command to add ROSE to your shell environment:
[SUCCESS}
[SUCCESS} $ source "${ROSE_HOME}/setup.sh"
[SUCCESS}
[SUCCESS} Note: This command was added to your ~/.bash_profile.
-------------------------------------------------------------------------------
EOF
You can copy-and-paste the script above or just run it from my Github Gist on a single command-line:
$ curl -s https://gist.githubusercontent.com/justintoo/ca2fd668b1a0e3abb653/raw/b536269290c513698309301ad3114653781034e2/install-rose-rhel-7.2.sh | bash /dev/stdin
See the official ROSE documentation for the latest instructions if this script doesn't work for you.