-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add build script for Thrift 0.11.0 #83
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
9699adf
Add build script for Thrift 0.11.0
StephanErb 22fdc7b
Disable QT compiliation
StephanErb f257879
Extend extract utility to support .tgz endings
StephanErb fb7bf1a
Refactor Thrift 0.11.0 build script filesystem layout
StephanErb e6ff366
Fix typo in thrift comment
cosmicexplorer b1c38a7
Build Thrift with bison 3.2
StephanErb fc20e9d
Make MacOS 10.14 the canonical Thrift 0.11 build script location
StephanErb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/bin/bash | ||
|
||
root=$(pwd -P) | ||
INSTALL_PREFIX=install_dir | ||
|
||
# NB: The custom bison/yacc setup works around old versions in Centos 6, | ||
# OSX Yosemite, and OSX Sierra which are too old for Thrift 0.11. | ||
# | ||
# On OSX we also boostrap a custom flex. On Centos you will need to install | ||
# it manually via: | ||
# yum install -y flex flex-devel | ||
|
||
curl -O http://ftp.gnu.org/gnu/bison/bison-2.5.1.tar.gz && \ | ||
rm -rf bison-2.5.1 && \ | ||
tar -xzf bison-2.5.1.tar.gz && ( | ||
cd bison-2.5.1 && \ | ||
sh ./configure --prefix="$(pwd -P)/$INSTALL_PREFIX" && \ | ||
make install | ||
) | ||
|
||
curl -O ftp://ftp.invisible-island.net/byacc/byacc-20140715.tgz && \ | ||
rm -rf byacc-20140715 && \ | ||
tar -xzf byacc-20140715.tgz && ( | ||
cd byacc-20140715 && \ | ||
sh ./configure --prefix="$(pwd -P)/$INSTALL_PREFIX" && \ | ||
make install | ||
) | ||
|
||
export PATH=$(pwd -P)/bison-2.5.1/$INSTALL_PREFIX/bin:$(pwd -P)/byacc-20140715/$INSTALL_PREFIX/bin:$PATH | ||
|
||
if [[ "`uname`" == "Darwin"* ]]; then | ||
# Upgraded to 2.6.0 to pick up OSX linker fix: https://sourceforge.net/p/flex/bugs/182/ | ||
curl -L -O http://sourceforge.mirrorservice.org/f/fl/flex/flex-2.6.0.tar.gz && \ | ||
rm -rf flex-2.6.0 && \ | ||
tar -xzf flex-2.6.0.tar.gz && ( | ||
cd flex-2.6.0 && \ | ||
./autogen.sh | ||
sh ./configure --prefix="$(pwd -P)/$INSTALL_PREFIX" && \ | ||
make install | ||
) | ||
|
||
export PATH=$(pwd -P)/flex-2.6.0/$INSTALL_PREFIX/bin:$PATH | ||
LDFLAGS="-L$(pwd -P)/flex-2.6.0/$INSTALL_PREFIX/lib" | ||
fi | ||
|
||
# NB: The configure --wthout-* flags just disable building any runtime libs | ||
# for the generated code. We only want the codegen side of things. | ||
curl -O http://archive.apache.org/dist/thrift/0.11.0/thrift-0.11.0.tar.gz && \ | ||
rm -rf thrift-0.11.0 && \ | ||
tar -xzf thrift-0.11.0.tar.gz && \ | ||
LDFLAGS="-all-static $LDFLAGS" && \ | ||
cd thrift-0.11.0 && \ | ||
sh ./configure \ | ||
--disable-shared \ | ||
--without-cpp \ | ||
--without-c_glib \ | ||
--without-csharp \ | ||
--without-erlang \ | ||
--without-java \ | ||
--without-erlang \ | ||
--without-lua \ | ||
--without-python \ | ||
--without-perl \ | ||
--without-php \ | ||
--without-php_extension \ | ||
--without-dart \ | ||
--without-ruby \ | ||
--without-haskell \ | ||
--without-go \ | ||
--without-nodejs \ | ||
--without-rs \ | ||
--without-haxe \ | ||
--without-dotnetcore \ | ||
--without-d && \ | ||
make clean && \ | ||
make LDFLAGS="$LDFLAGS" | ||
mv compiler/cpp/thrift ${root}/thrift-0.11.0.binary |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if these were always neglected or new targets but it would be good to add:
We're safe in the centos image I believe, but just in case the OSX-using builder has qt installed.