Skip to content

Commit

Permalink
Build zstd before folly and use a release version instead of dev
Browse files Browse the repository at this point in the history
Summary:
Currently we build folly without zstd and then build zstd for fbthrift. This results in a side effect that upon rebuild, folly will pick up the zstd and trigger rebuild.

Interestingly, this hits another problem - we're using a dev version of zstd that may contain breaking API changes. I'm pinning 1.3.7 as 1.3.8 actually introduced an API change that is not handled in folly yet.

Reviewed By: andreazevedo

Differential Revision: D14205367

fbshipit-source-id: 495eba7666d42e6c4076b8edf260d43ee4e912a3
  • Loading branch information
spalamarchuk authored and facebook-github-bot committed Feb 25, 2019
1 parent 597c0f8 commit b7bd7d9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
10 changes: 0 additions & 10 deletions mcrouter/scripts/recipes/fbthrift.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@ if [ ! -d "$PKG_DIR/mstch" ]; then
make $MAKE_ARGS && make install $MAKE_ARGS
fi

if [ ! -d "$PKG_DIR/zstd" ]; then
cd "$PKG_DIR" || die "cd fail"
git clone https://github.com/facebook/zstd

cd "$PKG_DIR/zstd" || die "cd fail"

cmake -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" build/cmake/
make $MAKE_ARGS && make install $MAKE_ARGS
fi

cd "$PKG_DIR/fbthrift/build" || die "cd fbthrift failed"

CXXFLAGS="$CXXFLAGS -fPIC" \
Expand Down
12 changes: 12 additions & 0 deletions mcrouter/scripts/recipes/folly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ if [ ! -d /usr/include/double-conversion ]; then
export CPPFLAGS="-I$INSTALL_DIR/include $CPPFLAGS"
fi

if [ ! -d "$PKG_DIR/zstd" ]; then
cd "$PKG_DIR" || die "cd fail"
git clone https://github.com/facebook/zstd

cd "$PKG_DIR/zstd" || die "cd fail"

# Checkout zstd-1.3.7 release
git checkout 21cd8a9d95a321f1fe256dc837e388bbc168fdbf
cmake -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" build/cmake/
make $MAKE_ARGS && make install $MAKE_ARGS
fi

cd "$PKG_DIR/folly/folly/" || die "cd fail"

CXXFLAGS="$CXXFLAGS -fPIC" \
Expand Down

0 comments on commit b7bd7d9

Please sign in to comment.