Skip to content

Instantly share code, notes, and snippets.

@anupdhml
Last active August 5, 2020 16:00
Show Gist options
  • Save anupdhml/fff25acf3e4eb86599ccfe982de86c4f to your computer and use it in GitHub Desktop.
Save anupdhml/fff25acf3e4eb86599ccfe982de86c4f to your computer and use it in GitHub Desktop.
# Steps for compiling tremor succesfully on centos6
# drop to centos6 environment
# https://hub.docker.com/_/centos
docker pull centos:6.6
docker run -i -t centos:6.6 /bin/bash
cd ~
# to get the needed source code
# (nss update resolves ssl issues during downloads)
yum install nss tar wget git
# extra repo needed for deps like clang/libmpc-devel
yum install epel-release
# install gcc
yum install gcc gcc-c++
# compile gcc9 (can't just use devtoolset-9 for our deps)
# https://gcc.gnu.org/install/prerequisites.html
yum install gmp-devel mpfr-devel libmpc-devel
wget http://ftpmirror.gnu.org/gnu/gcc/gcc-9.3.0/gcc-9.3.0.tar.gz
tar xvzf gcc-9.3.0.tar.gz
cd gcc-9.3.0
./configure --disable-multilib --enable-languages=c,c++ --prefix=/usr/local
make -j$(nproc)
make -j install
export LD_LIBRARY_PATH=/usr/local/lib64
# remove old gcc now that we have new one
yum remove gcc gcc-c++
# placeholder for cc (similar to what gcc package did for /usr/bin/gcc)
ln -s /usr/local/bin/gcc /usr/local/bin/cc
# compile cmake >=3.8.2 (needed for snmalloc)
wget https://github.com/Kitware/CMake/releases/download/v3.18.1/cmake-3.18.1.tar.gz
tar xvzf cmake-3.18.1.tar.gz
cd cmake-3.18.1
./bootstrap --prefix=/usr/local -- -DCMAKE_USE_OPENSSL=OFF
make
make install
# install rust
wget https://sh.rustup.rs -O rustup.sh
chmod +x rustup.sh
./rustup.sh
source $HOME/.cargo/env
# install other system deps
yum install clang openssl-devel
# finally compile tremor
# verified as working for: https://github.com/wayfair-tremor/tremor-runtime/tree/7182fb091ad9d58129bf2f0dc03dbb1c6c4c8ef0
git clone https://github.com/wayfair-tremor/tremor-runtime.git
cd tremor-runtime
cargo build -p tremor-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment