update ray cmake build process (#2853)
* use cmake to build ray project, no need to appply build.sh before cmake, fix some abuse of cmake, improve the build performance
* support boost external project, avoid using the system or build.sh boost
* keep compatible with build.sh, remove boost and arrow build from it.
* bugfix: parquet bison version control, plasma_java lib install problem
* bugfix: cmake, do not compile plasma java client if no need
* bugfix: component failures test timeout machenism has problem for plasma manager failed case
* bugfix: arrow use lib64 in centos, travis check-git-clang-format-output.sh does not support other branches except master
* revert some fix
* set arrow python executable, fix format error in component_failures_test.py
* make clean arrow python build directory
* update cmake code style, back to support cmake minimum version 3.4
2018-09-13 02:19:33 +08:00
|
|
|
# arrow external project
|
|
|
|
# target:
|
|
|
|
# - arrow_ep
|
|
|
|
# depends:
|
|
|
|
#
|
|
|
|
# this module defines:
|
|
|
|
# - ARROW_HOME
|
|
|
|
# - ARROW_SOURCE_DIR
|
|
|
|
# - ARROW_INCLUDE_DIR
|
|
|
|
# - ARROW_SHARED_LIB
|
|
|
|
# - ARROW_STATIC_LIB
|
|
|
|
# - PLASMA_INCLUDE_DIR
|
|
|
|
# - PLASMA_STATIC_LIB
|
|
|
|
# - PLASMA_SHARED_LIB
|
|
|
|
|
|
|
|
set(arrow_URL https://github.com/apache/arrow.git)
|
2018-10-02 00:08:47 -07:00
|
|
|
# The PR for this commit is https://github.com/apache/arrow/pull/2664. We
|
2018-09-21 04:37:44 +08:00
|
|
|
# include the link here to make it easier to find the right commit because
|
|
|
|
# Arrow often rewrites git history and invalidates certain commits.
|
2018-10-02 00:08:47 -07:00
|
|
|
set(arrow_TAG 3545186d6997b943ffc3d79634f2d08eefbd7322)
|
update ray cmake build process (#2853)
* use cmake to build ray project, no need to appply build.sh before cmake, fix some abuse of cmake, improve the build performance
* support boost external project, avoid using the system or build.sh boost
* keep compatible with build.sh, remove boost and arrow build from it.
* bugfix: parquet bison version control, plasma_java lib install problem
* bugfix: cmake, do not compile plasma java client if no need
* bugfix: component failures test timeout machenism has problem for plasma manager failed case
* bugfix: arrow use lib64 in centos, travis check-git-clang-format-output.sh does not support other branches except master
* revert some fix
* set arrow python executable, fix format error in component_failures_test.py
* make clean arrow python build directory
* update cmake code style, back to support cmake minimum version 3.4
2018-09-13 02:19:33 +08:00
|
|
|
|
|
|
|
set(ARROW_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/arrow-install)
|
|
|
|
set(ARROW_HOME ${ARROW_INSTALL_PREFIX})
|
|
|
|
set(ARROW_SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/external/arrow/src/arrow_ep)
|
|
|
|
|
|
|
|
# The following is needed because in CentOS, the lib directory is named lib64
|
|
|
|
if(EXISTS "/etc/redhat-release" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
|
|
set(LIB_SUFFIX 64)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(ARROW_INCLUDE_DIR ${ARROW_HOME}/include)
|
|
|
|
set(ARROW_LIBRARY_DIR ${ARROW_HOME}/lib${LIB_SUFFIX})
|
|
|
|
set(ARROW_SHARED_LIB ${ARROW_LIBRARY_DIR}/libarrow${CMAKE_SHARED_LIBRARY_SUFFIX})
|
|
|
|
set(ARROW_STATIC_LIB ${ARROW_LIBRARY_DIR}/libarrow.a)
|
|
|
|
|
|
|
|
# plasma in arrow
|
|
|
|
set(PLASMA_INCLUDE_DIR ${ARROW_HOME}/include)
|
|
|
|
set(PLASMA_SHARED_LIB ${ARROW_LIBRARY_DIR}/libplasma${CMAKE_SHARED_LIBRARY_SUFFIX})
|
|
|
|
set(PLASMA_STATIC_LIB ${ARROW_LIBRARY_DIR}/libplasma.a)
|
|
|
|
|
|
|
|
find_package(PythonInterp REQUIRED)
|
|
|
|
message(STATUS "PYTHON_EXECUTABLE for arrow: ${PYTHON_EXECUTABLE}")
|
|
|
|
|
|
|
|
set(ARROW_CMAKE_ARGS
|
|
|
|
-DCMAKE_BUILD_TYPE:STRING=Release
|
|
|
|
-DCMAKE_INSTALL_PREFIX=${ARROW_INSTALL_PREFIX}
|
|
|
|
-DCMAKE_C_FLAGS=-g -O3 ${EP_C_FLAGS}
|
|
|
|
-DCMAKE_CXX_FLAGS=-g -O3 ${EP_CXX_FLAGS}
|
|
|
|
-DARROW_BUILD_TESTS=off
|
|
|
|
-DARROW_HDFS=on
|
|
|
|
-DARROW_BOOST_USE_SHARED=off
|
|
|
|
-DPYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE}
|
|
|
|
-DARROW_PYTHON=on
|
|
|
|
-DARROW_PLASMA=on
|
|
|
|
-DARROW_TENSORFLOW=on
|
|
|
|
-DARROW_JEMALLOC=off
|
|
|
|
-DARROW_WITH_BROTLI=off
|
|
|
|
-DARROW_WITH_LZ4=off
|
|
|
|
-DARROW_WITH_ZSTD=off
|
|
|
|
-DFLATBUFFERS_HOME=${FLATBUFFERS_HOME}
|
|
|
|
-DBOOST_ROOT=${BOOST_ROOT})
|
|
|
|
|
2018-09-21 04:37:44 +08:00
|
|
|
if ("${CMAKE_RAY_LANG_PYTHON}" STREQUAL "YES")
|
|
|
|
# PyArrow needs following settings.
|
|
|
|
set(ARROW_CMAKE_ARGS ${ARROW_CMAKE_ARGS}
|
|
|
|
-DARROW_WITH_THRIFT=ON
|
|
|
|
-DARROW_PARQUET=ON
|
|
|
|
-DARROW_WITH_ZLIB=ON)
|
|
|
|
else()
|
|
|
|
set(ARROW_CMAKE_ARGS ${ARROW_CMAKE_ARGS}
|
|
|
|
-DARROW_WITH_THRIFT=OFF
|
|
|
|
-DARROW_PARQUET=OFF
|
|
|
|
-DARROW_WITH_ZLIB=OFF)
|
|
|
|
endif ()
|
|
|
|
if (APPLE)
|
|
|
|
set(ARROW_CMAKE_ARGS ${ARROW_CMAKE_ARGS}
|
|
|
|
-DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison)
|
|
|
|
endif()
|
|
|
|
|
update ray cmake build process (#2853)
* use cmake to build ray project, no need to appply build.sh before cmake, fix some abuse of cmake, improve the build performance
* support boost external project, avoid using the system or build.sh boost
* keep compatible with build.sh, remove boost and arrow build from it.
* bugfix: parquet bison version control, plasma_java lib install problem
* bugfix: cmake, do not compile plasma java client if no need
* bugfix: component failures test timeout machenism has problem for plasma manager failed case
* bugfix: arrow use lib64 in centos, travis check-git-clang-format-output.sh does not support other branches except master
* revert some fix
* set arrow python executable, fix format error in component_failures_test.py
* make clean arrow python build directory
* update cmake code style, back to support cmake minimum version 3.4
2018-09-13 02:19:33 +08:00
|
|
|
if ("${CMAKE_RAY_LANG_JAVA}" STREQUAL "YES")
|
|
|
|
set(ARROW_CMAKE_ARGS ${ARROW_CMAKE_ARGS} -DARROW_PLASMA_JAVA_CLIENT=ON)
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
message(STATUS "ARROW_CMAKE_ARGS: ${ARROW_CMAKE_ARGS}")
|
|
|
|
|
|
|
|
if (CMAKE_VERSION VERSION_GREATER "3.7")
|
|
|
|
set(ARROW_CONFIGURE SOURCE_SUBDIR "cpp" CMAKE_ARGS ${ARROW_CMAKE_ARGS})
|
|
|
|
else()
|
|
|
|
set(ARROW_CONFIGURE CONFIGURE_COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}"
|
|
|
|
${ARROW_CMAKE_ARGS} "${ARROW_SOURCE_DIR}/cpp")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
ExternalProject_Add(arrow_ep
|
|
|
|
PREFIX external/arrow
|
2018-09-23 21:52:33 +07:00
|
|
|
DEPENDS flatbuffers boost
|
update ray cmake build process (#2853)
* use cmake to build ray project, no need to appply build.sh before cmake, fix some abuse of cmake, improve the build performance
* support boost external project, avoid using the system or build.sh boost
* keep compatible with build.sh, remove boost and arrow build from it.
* bugfix: parquet bison version control, plasma_java lib install problem
* bugfix: cmake, do not compile plasma java client if no need
* bugfix: component failures test timeout machenism has problem for plasma manager failed case
* bugfix: arrow use lib64 in centos, travis check-git-clang-format-output.sh does not support other branches except master
* revert some fix
* set arrow python executable, fix format error in component_failures_test.py
* make clean arrow python build directory
* update cmake code style, back to support cmake minimum version 3.4
2018-09-13 02:19:33 +08:00
|
|
|
GIT_REPOSITORY ${arrow_URL}
|
|
|
|
GIT_TAG ${arrow_TAG}
|
|
|
|
${ARROW_CONFIGURE}
|
|
|
|
BUILD_BYPRODUCTS "${ARROW_SHARED_LIB}" "${ARROW_STATIC_LIB}")
|
|
|
|
|
|
|
|
if ("${CMAKE_RAY_LANG_JAVA}" STREQUAL "YES")
|
|
|
|
ExternalProject_Add_Step(arrow_ep arrow_ep_install_java_lib
|
|
|
|
COMMAND bash -c "cd ${ARROW_SOURCE_DIR}/java && mvn clean install -pl plasma -am -Dmaven.test.skip > /dev/null"
|
|
|
|
DEPENDEES build)
|
|
|
|
|
|
|
|
# add install of library plasma_java, it is not configured in plasma CMakeLists.txt
|
|
|
|
ExternalProject_Add_Step(arrow_ep arrow_ep_install_plasma_java
|
|
|
|
COMMAND bash -c "cp ${CMAKE_CURRENT_BINARY_DIR}/external/arrow/src/arrow_ep-build/release/libplasma_java.* ${ARROW_LIBRARY_DIR}/"
|
|
|
|
DEPENDEES install)
|
|
|
|
endif ()
|