diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 3f877b4aa3035..4dd61befab6cb 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -195,7 +195,8 @@ jobs: ARROW_BUILD_TYPE: release ARROW_FLIGHT: ON ARROW_FLIGHT_SQL: ON - ARROW_GANDIVA: ON + # ARROW-17728: SEGV on MinGW + ARROW_GANDIVA: OFF ARROW_GCS: ON ARROW_HDFS: OFF ARROW_HOME: /ucrt${{ matrix.mingw-n-bits }} diff --git a/ci/scripts/cpp_test.sh b/ci/scripts/cpp_test.sh index 2bd7db8b2c4c3..06b7d0fe41368 100755 --- a/ci/scripts/cpp_test.sh +++ b/ci/scripts/cpp_test.sh @@ -55,22 +55,20 @@ case "$(uname)" in exclude_tests="gandiva-internals-test" exclude_tests="${exclude_tests}|gandiva-projector-test" exclude_tests="${exclude_tests}|gandiva-utf8-test" - if [ "${MSYSTEM}" = "MINGW32" ]; then - exclude_tests="${exclude_tests}|gandiva-binary-test" - exclude_tests="${exclude_tests}|gandiva-boolean-expr-test" - exclude_tests="${exclude_tests}|gandiva-date-time-test" - exclude_tests="${exclude_tests}|gandiva-decimal-single-test" - exclude_tests="${exclude_tests}|gandiva-decimal-test" - exclude_tests="${exclude_tests}|gandiva-filter-project-test" - exclude_tests="${exclude_tests}|gandiva-filter-test" - exclude_tests="${exclude_tests}|gandiva-hash-test" - exclude_tests="${exclude_tests}|gandiva-if-expr-test" - exclude_tests="${exclude_tests}|gandiva-in-expr-test" - exclude_tests="${exclude_tests}|gandiva-literal-test" - exclude_tests="${exclude_tests}|gandiva-null-validity-test" - exclude_tests="${exclude_tests}|gandiva-precompiled-test" - exclude_tests="${exclude_tests}|gandiva-projector-test" - fi + exclude_tests="${exclude_tests}|gandiva-binary-test" + exclude_tests="${exclude_tests}|gandiva-boolean-expr-test" + exclude_tests="${exclude_tests}|gandiva-date-time-test" + exclude_tests="${exclude_tests}|gandiva-decimal-single-test" + exclude_tests="${exclude_tests}|gandiva-decimal-test" + exclude_tests="${exclude_tests}|gandiva-filter-project-test" + exclude_tests="${exclude_tests}|gandiva-filter-test" + exclude_tests="${exclude_tests}|gandiva-hash-test" + exclude_tests="${exclude_tests}|gandiva-if-expr-test" + exclude_tests="${exclude_tests}|gandiva-in-expr-test" + exclude_tests="${exclude_tests}|gandiva-literal-test" + exclude_tests="${exclude_tests}|gandiva-null-validity-test" + exclude_tests="${exclude_tests}|gandiva-precompiled-test" + exclude_tests="${exclude_tests}|gandiva-projector-test" ctest_options+=(--exclude-regex "${exclude_tests}") ;; *) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 14584e17fb82b..d67142e056940 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -128,6 +128,7 @@ set(ARROW_DOC_DIR "share/doc/${PROJECT_NAME}") set(BUILD_SUPPORT_DIR "${CMAKE_SOURCE_DIR}/build-support") set(ARROW_LLVM_VERSIONS + "15.0" "14.0" "13.0" "12.0" diff --git a/cpp/cmake_modules/Findzstd.cmake b/cpp/cmake_modules/FindzstdAlt.cmake similarity index 82% rename from cpp/cmake_modules/Findzstd.cmake rename to cpp/cmake_modules/FindzstdAlt.cmake index d907467f94750..476006a768b30 100644 --- a/cpp/cmake_modules/Findzstd.cmake +++ b/cpp/cmake_modules/FindzstdAlt.cmake @@ -15,7 +15,20 @@ # specific language governing permissions and limitations # under the License. +if(zstdAlt_FOUND) + return() +endif() + +set(find_package_args) +if(zstdAlt_FIND_VERSION) + list(APPEND find_package_args ${zstdAlt_FIND_VERSION}) +endif() +if(zstdAlt_FIND_QUIETLY) + list(APPEND find_package_args QUIET) +endif() +find_package(zstd ${find_package_args}) if(zstd_FOUND) + set(zstdAlt_FOUND TRUE) return() endif() @@ -83,11 +96,17 @@ else() endif() endif() -find_package_handle_standard_args(zstd REQUIRED_VARS ZSTD_LIB ZSTD_INCLUDE_DIR) +find_package_handle_standard_args(zstdAlt REQUIRED_VARS ZSTD_LIB ZSTD_INCLUDE_DIR) -if(zstd_FOUND) - add_library(zstd::libzstd UNKNOWN IMPORTED) - set_target_properties(zstd::libzstd +if(zstdAlt_FOUND) + if(ARROW_ZSTD_USE_SHARED) + set(zstd_TARGET zstd::libzstd_shared) + add_library(${zstd_TARGET} SHARED IMPORTED) + else() + set(zstd_TARGET zstd::libzstd_static) + add_library(${zstd_TARGET} STATIC IMPORTED) + endif() + set_target_properties(${zstd_TARGET} PROPERTIES IMPORTED_LOCATION "${ZSTD_LIB}" INTERFACE_INCLUDE_DIRECTORIES "${ZSTD_INCLUDE_DIR}") endif() diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index 52847a99f9b4d..a45ae61015e95 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -2397,30 +2397,32 @@ macro(build_zstd) file(MAKE_DIRECTORY "${ZSTD_PREFIX}/include") - add_library(zstd::libzstd STATIC IMPORTED) - set_target_properties(zstd::libzstd + add_library(zstd::libzstd_static STATIC IMPORTED) + set_target_properties(zstd::libzstd_static PROPERTIES IMPORTED_LOCATION "${ZSTD_STATIC_LIB}" INTERFACE_INCLUDE_DIRECTORIES "${ZSTD_PREFIX}/include") add_dependencies(toolchain zstd_ep) - add_dependencies(zstd::libzstd zstd_ep) + add_dependencies(zstd::libzstd_static zstd_ep) - list(APPEND ARROW_BUNDLED_STATIC_LIBS zstd::libzstd) + list(APPEND ARROW_BUNDLED_STATIC_LIBS zstd::libzstd_static) + + set(ZSTD_VENDORED TRUE) endmacro() if(ARROW_WITH_ZSTD) # ARROW-13384: ZSTD_minCLevel was added in v1.4.0, required by ARROW-13091 resolve_dependency(zstd + HAVE_ALT + TRUE PC_PACKAGE_NAMES libzstd REQUIRED_VERSION 1.4.0) - if(TARGET zstd::libzstd) - set(ARROW_ZSTD_LIBZSTD zstd::libzstd) + if(ZSTD_VENDORED) + set(ARROW_ZSTD_LIBZSTD zstd::libzstd_static) else() - # "SYSTEM" source will prioritize cmake config, which exports - # zstd::libzstd_{static,shared} if(ARROW_ZSTD_USE_SHARED) if(TARGET zstd::libzstd_shared) set(ARROW_ZSTD_LIBZSTD zstd::libzstd_shared)