Last active
December 30, 2015 21:29
-
-
Save cypres/7887803 to your computer and use it in GitHub Desktop.
Canonical way to install https://github.com/facebook/folly on OS 10.9 (Mavericks)
This file contains hidden or 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
#!/bin/bash | |
# Canonical way to install folly on OS 10.9 (Mavericks) | |
# For deps try: brew install boost glog gflags jemalloc scons autoconf automake libtool | |
git clone [email protected]:facebook/folly.git fb-folly | |
cd fb-folly | |
# Commit 79c25e6f4a breaks complilation on OS X, so checkout previous version | |
git checkout 6d89f3d33268eaa12d5eb03a4afa5caa856306c5 | |
git clone https://code.google.com/p/double-conversion/ | |
cp folly/SConstruct.double-conversion double-conversion/ | |
cd double-conversion/ | |
scons -f SConstruct.double-conversion | |
cd ../folly/ | |
# Fix String.h on case insensitive OS X | |
mv String.cpp FollyString.cpp | |
mv String.h FollyString.h | |
find . -type f \( -name "*.cpp" -or -name "*.h" \) -print0 | xargs -0 -n 1 sed -i '' -e 's/folly\/String\./folly\/FollyString\./g' | |
find . -type f \( -name "*.cpp" -or -name "*.h" \) -print0 | xargs -0 -n 1 sed -i '' -e 's/include "String\./include "FollyString\./g' | |
find . -type f -name "Makefile*" -print0 | xargs -0 -n 1 sed -i '' -e "s/\([[:space:]]\)String.h/\\1FollyString\.h/g" | |
find . -type f -name "Makefile*" -print0 | xargs -0 -n 1 sed -i '' -e "s/\([[:space:]]\)String.cpp/\\1FollyString\.cpp/g" | |
# Install gtest | |
cd test | |
wget http://googletest.googlecode.com/files/gtest-1.7.0.zip | |
unzip gtest-1.7.0.zip | |
sed -i -e s/gtest-1.6.0/gtest-1.7.0/g Makefile.am | |
cd ../ | |
# Auto tools | |
autoreconf --install | |
# requires bash for the next step | |
CXX="clang++" CC="clang" LDFLAGS="-L$PWD/../double-conversion/" CPPFLAGS="-I$PWD/../double-conversion/src/" ./configure | |
make | |
make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment