From 5ef0892236d16434bfffa8f87f1c981214cdaf6c Mon Sep 17 00:00:00 2001 From: Philipp Moritz Date: Thu, 8 Mar 2018 23:22:23 -0800 Subject: [PATCH] Compile boost from source to fix macOS wheels (#1688) --- .travis/install-dependencies.sh | 6 +++--- doc/source/install-on-macosx.rst | 2 +- src/ray/object_manager/object_manager.cc | 4 +++- src/ray/raylet/lineage_cache.h | 2 +- thirdparty/scripts/build_parquet.sh | 1 + thirdparty/scripts/setup.sh | 7 ++----- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.travis/install-dependencies.sh b/.travis/install-dependencies.sh index d13cfe43d..87ff29119 100755 --- a/.travis/install-dependencies.sh +++ b/.travis/install-dependencies.sh @@ -43,7 +43,7 @@ elif [[ "$PYTHON" == "2.7" ]] && [[ "$platform" == "macosx" ]]; then echo "Updating brew." brew update > /dev/null fi - brew install cmake pkg-config automake autoconf libtool boost openssl bison > /dev/null + brew install cmake pkg-config automake autoconf libtool openssl bison > /dev/null # Install miniconda. wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh -nv bash miniconda.sh -b -p $HOME/miniconda @@ -59,7 +59,7 @@ elif [[ "$PYTHON" == "3.5" ]] && [[ "$platform" == "macosx" ]]; then echo "Updating brew." brew update > /dev/null fi - brew install cmake pkg-config automake autoconf libtool boost openssl bison > /dev/null + brew install cmake pkg-config automake autoconf libtool openssl bison > /dev/null # Install miniconda. wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh -nv bash miniconda.sh -b -p $HOME/miniconda @@ -86,7 +86,7 @@ elif [[ "$MAC_WHEELS" == "1" ]]; then echo "Updating brew." brew update > /dev/null fi - brew install cmake pkg-config automake autoconf libtool boost openssl bison > /dev/null + brew install cmake pkg-config automake autoconf libtool openssl bison > /dev/null # We use true to avoid exiting with an error code because the brew install can # fail if a package is already installed. true diff --git a/doc/source/install-on-macosx.rst b/doc/source/install-on-macosx.rst index e1861f2f8..5289fc5fb 100644 --- a/doc/source/install-on-macosx.rst +++ b/doc/source/install-on-macosx.rst @@ -26,7 +26,7 @@ To build Ray, first install the following dependencies. We recommend using .. code-block:: bash brew update - brew install cmake pkg-config automake autoconf libtool boost openssl bison wget + brew install cmake pkg-config automake autoconf libtool openssl bison wget pip install cython diff --git a/src/ray/object_manager/object_manager.cc b/src/ray/object_manager/object_manager.cc index 2796449a1..508a24ca4 100644 --- a/src/ray/object_manager/object_manager.cc +++ b/src/ray/object_manager/object_manager.cc @@ -86,7 +86,9 @@ void ObjectManager::SchedulePull(const ObjectID &object_id, int wait_ms) { pull_requests_[object_id] = Timer(new boost::asio::deadline_timer( io_service_, boost::posix_time::milliseconds(wait_ms))); pull_requests_[object_id]->async_wait( - boost::bind(&ObjectManager::SchedulePullHandler, this, object_id)); + [this, object_id](const boost::system::error_code &error_code) { + RAY_CHECK_OK(SchedulePullHandler(object_id)); + }); } ray::Status ObjectManager::SchedulePullHandler(const ObjectID &object_id) { diff --git a/src/ray/raylet/lineage_cache.h b/src/ray/raylet/lineage_cache.h index 25b47f3b5..728c3cb33 100644 --- a/src/ray/raylet/lineage_cache.h +++ b/src/ray/raylet/lineage_cache.h @@ -16,7 +16,7 @@ class LineageCacheEntry { private: // TODO(swang): This should be an enum of the state of the entry - goes from // completely local, to dirty, to in flight, to committed. - bool dirty_; + // bool dirty_; }; class LineageCacheTaskEntry : public LineageCacheEntry {}; diff --git a/thirdparty/scripts/build_parquet.sh b/thirdparty/scripts/build_parquet.sh index fabf9efa0..e45093410 100755 --- a/thirdparty/scripts/build_parquet.sh +++ b/thirdparty/scripts/build_parquet.sh @@ -20,6 +20,7 @@ if [ ! -d $TP_DIR/build/parquet-cpp ]; then if [ "$unamestr" == "Darwin" ]; then OPENSSL_ROOT_DIR=$OPENSSL_DIR \ PATH="$BISON_DIR:$PATH" \ + BOOST_ROOT=$TP_DIR/pkg/boost \ ARROW_HOME=$TP_DIR/pkg/arrow/cpp/build/cpp-install \ cmake -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=$PARQUET_HOME \ diff --git a/thirdparty/scripts/setup.sh b/thirdparty/scripts/setup.sh index 5f6d75e80..633da0b6d 100755 --- a/thirdparty/scripts/setup.sh +++ b/thirdparty/scripts/setup.sh @@ -31,12 +31,9 @@ bash "$TP_SCRIPT_DIR/build_redis.sh" bash "$TP_SCRIPT_DIR/build_credis.sh" ############################################## -# boost if necessary +# boost ############################################## -if [[ "$unamestr" == "Linux" ]]; then - echo "building boost" - bash "$TP_SCRIPT_DIR/build_boost.sh" -fi +bash "$TP_SCRIPT_DIR/build_boost.sh" ############################################## # flatbuffers if necessary