Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Build libRoadRunner from Source
#!/bin/bash
#
# Paths
#
ROOT=$(dirname "$(readlink -f "$0")")
RR_SOURCE=${ROOT}/roadrunner
RR_BUILD=${ROOT}/build/libroadrunner
RR_INSTALL=${ROOT}/install/roadrunner
RRDEPS_SOURCE=${ROOT}/libroadrunner-deps
RRDEPS_BUILD=${ROOT}/build/libroadrunner-deps
RRDEPS_INSTALL=${ROOT}/install/roadrunner
LLVM_SOURCE=${ROOT}/llvm
LLVM_BUILD=${ROOT}/build/llvm
LLVM_INSTALL=${ROOT}/install/llvm
#
# Enter Root Dir
#
cd $ROOT
#
# Make Build/Install Directories
#
mkdir -p build/libroadrunner
mkdir -p build/libroadrunner-deps
mkdir -p build/llvm
mkdir -p install/roadrunner
mkdir -p install/llvm
#
# Clone Sources
#
git clone https://github.com/sys-bio/roadrunner.git
git clone https://github.com/sys-bio/libroadrunner-deps.git
git clone http://llvm.org/git/llvm.git
#
# Build LLVM
#
cd $LLVM_SOURCE
git checkout -t origin/release_35
cd $LLVM_BUILD
${LLVM_SOURCE}/configure --prefix=${LLVM_INSTALL} \
--enable-optimized \
--enable-jit \
--enable-targets=x86_64
make -j 8
make install
#
# Build libRR Dependencies
#
cd $RRDEPS_BUILD
cmake -DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_INSTALL_PREFIX=${RRDEPS_INSTALL} \
${RRDEPS_SOURCE}
make -j 8
make install
#
# Build libRR
#
cd $RR_BUILD
cmake -DCMAKE_INSTALL_PREFIX=$RR_INSTALL \
-DTHIRD_PARTY_INSTALL_FOLDER=$RR_INSTALL \
-DBUILD_LLVM=ON \
-DBUILD_PYTHON=ON \
-DUSE_TR1_CXX_NS=ON \
-DBUILD_TESTS=ON \
-DBUILD_TEST_TOOLS=ON \
-DLIBSBML_INCLUDE_DIR=$RR_INSTALL/include \
-DLIBSBML_LIBRARY=$RR_INSTALL/lib/libsbml.so \
-DLIBSBML_STATIC_LIBRARY=$RR_INSTALL/lib/libsbml-static.a \
-DZLIB_LIBRARY=/usr/lib/x86_64-linux-gnu/libz.so \
-DBZ2_LIBRARY=/usr/lib/x86_64-linux-gnu/libbz2.so \
-DLLVM_CONFIG_EXECUTABLE=${LLVM_INSTALL}/bin/llvm-config \
$RR_SOURCE
make -j8 install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.