Skip to content

Commit

Permalink
Adding support for Ubuntu 12.04
Browse files Browse the repository at this point in the history
Summary:
Adds support for building on Ubuntu 12.04 (for all folks who haven't upgraded yet)

This also fixes a minor bug in the deps.sh script, where it doesn't exit if fbthrift/folly fail to build
Closes #15
Github Author: delow12 <[email protected]>

{sync, type="child", parent="github", parentrepo="facebook/proxygen", parentprnum="15", parentprfbid="991375867544448"}

Test Plan: Imported from GitHub, without a `Test Plan:` line.

Reviewed By: [email protected]

Subscribers: doug, bmatheny

FB internal diff: D1674609

Signature: t1:1674609:1415756820:a84f67d7932e7ca24c3212a8b29f7d7145addc48
  • Loading branch information
dcsommer authored and Dave Watson committed Nov 19, 2014
1 parent db7a15b commit 67c82a9
Showing 1 changed file with 47 additions and 2 deletions.
49 changes: 47 additions & 2 deletions proxygen/deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,51 @@ sudo apt-get install -yq \
gperf \
autoconf-archive \
libevent-dev \
libgoogle-glog-dev \
wget

# Adding support for Ubuntu 12.04.x
# Needs libdouble-conversion-dev, google-gflags and double-conversion
# deps.sh in fbthrift and folly builds anyways (no trap there)
if ! sudo apt-get install libgoogle-glog-dev;
then
echo "fetching glog from svn (apt-get fails)"
if [ ! -e google-glog ]; then
svn checkout http://google-glog.googlecode.com/svn/trunk/ google-glog
cd google-glog
./configure
make
sudo make install
cd ..
fi
fi

if ! sudo apt-get install libgflags-dev;
then
if [ ! -e google-gflags ]; then
echo "Fetching and building libgflags"
wget https://github.com/schuhschuh/gflags/archive/v2.0.tar.gz
mkdir google-gflags
tar xf v2.0.tar.gz -C google-gflags
cd google-gflags/gflags-2.0/
./configure
make
sudo make install
cd ../../
fi
fi

if ! sudo apt-get install libdouble-conversion-dev;
then
if [ ! -e double-conversion ]; then
git clone https://code.google.com/p/double-conversion double-conversion
cd double-conversion
cmake . -DBUILD_SHARED_LIBS=ON
sudo make install
cd ..
fi
fi


git clone https://github.com/facebook/fbthrift || true
cd fbthrift/thrift

Expand All @@ -41,7 +83,10 @@ if [ -e folly/folly ]; then
fi

# Build folly and fbthrift
./deps.sh
if ! ./deps.sh; then
echo "fatal: fbthrift+folly build failed"
exit -1
fi

# Build proxygen
cd ../..
Expand Down

0 comments on commit 67c82a9

Please sign in to comment.