Last active
February 2, 2018 17:15
-
-
Save radimk/004157b1f70dd2ca13ae3820e78857bd to your computer and use it in GitHub Desktop.
thrift build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get upgrade | |
# possibly reboot to new kernel | |
sudo apt-get install g++ libevent-2.0.5 zlib1g zlib1g-dev python patch make | |
sudo apt-get install autoconf automake libtool pkg-config libssl-dev flex bison | |
sudo apt-get install ant # installs also openjdk | |
wget https://archive.apache.org/dist/thrift/0.9.1/thrift-0.9.1.tar.gz | |
tar xzf thrift-0.9.1.tar.gz | |
cd thrift-0.9.1/ | |
# wget http://gitpaste.rfiserve.net/paste/595/raw/ -O withoutcxx11.patch | |
# patch -p1 -d . <withoutcxx11.patch | |
# rm withoutcxx11.patch | |
wget https://github.com/radimk/thrift/commit/79643d6a55878638c96c93623b10d122d096b1a3.patch -O g++6.patch | |
patch -p1 g++6.patch | |
rm g++6.patch | |
openssl version | |
mkdir target | |
export PY_PREFIX=$(pwd)/target | |
export JAVA_PREFIX=$(pwd)/target | |
cd ;wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.tar.gz | |
sudo mkdir /opt/jdk/ | |
sudo tar x -C /opt/jdk -f jdk-8u66-linux-x64.tar.gz | |
sudo update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_66/bin/java 100 | |
sudo update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_66/bin/javac 100 | |
sudo update-alternatives --config java | |
cd thrift-0.9.1/ | |
/configure --with-lua=no --with-perl=no --with-php=no --with-ruby=no --with-boost=/boost_1_58 --with-openssl --disable-shared --prefix=$(pwd)/target --with-pic | |
make | |
make install | |
mkdir target1 | |
cp target/libthrift-0.9.1.jar target1/ | |
cp -r target/bin target1/ | |
cp -r target/include target1/ | |
mkdir target1/pylib | |
cp -r target/lib/python2.7/site-packages/thrift target1/pylib/ | |
mkdir target1/lib | |
cp target/lib/libthrift* target1/lib/ | |
mv target1 thrift-0.9.1 | |
tar czvf ~/thrift-0.9.1-pic.tar.gz thrift-0.9.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
patch -p1 < g++6.patch