diff --git a/ci/docker/centos-7-cpp.dockerfile b/ci/docker/centos-7-cpp.dockerfile index f4e0430aad69..8c1893cbbb2a 100644 --- a/ci/docker/centos-7-cpp.dockerfile +++ b/ci/docker/centos-7-cpp.dockerfile @@ -17,28 +17,27 @@ FROM centos:centos7 -RUN yum install -y \ - centos-release-scl \ - curl \ - diffutils \ - gcc-c++ \ - libcurl-devel \ - make \ - openssl-devel \ - wget \ - which - # devtoolset is required for C++17 -RUN yum install -y devtoolset-8 - -# yum install cmake version is too old -ARG cmake=3.23.1 -RUN mkdir /opt/cmake-${cmake} -RUN wget -nv -O - https://github.com/Kitware/CMake/releases/download/v${cmake}/cmake-${cmake}-Linux-x86_64.tar.gz | \ - tar -xzf - --strip-components=1 -C /opt/cmake-${cmake} +RUN \ + yum install -y \ + centos-release-scl \ + epel-release && \ + yum install -y \ + cmake3 \ + curl \ + devtoolset-8 \ + diffutils \ + gcc-c++ \ + libcurl-devel \ + make \ + openssl-devel \ + openssl11-devel \ + wget \ + which COPY ci/scripts/install_sccache.sh /arrow/ci/scripts/ RUN bash /arrow/ci/scripts/install_sccache.sh unknown-linux-musl /usr/local/bin -ENV PATH=/opt/cmake-${cmake}/bin:$PATH \ - ARROW_R_DEV=TRUE +ENV \ + ARROW_R_DEV=TRUE \ + CMAKE=/usr/bin/cmake3 diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 14de0cd496af..b6d18cd39f49 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -491,6 +491,7 @@ enable_testing() # For arrow.pc. Cflags.private, Libs.private and Requires.private are # used when "pkg-config --cflags --libs --static arrow" is used. +set(ARROW_PC_CFLAGS "") set(ARROW_PC_CFLAGS_PRIVATE " -DARROW_STATIC") set(ARROW_PC_LIBS_PRIVATE "") set(ARROW_PC_REQUIRES_PRIVATE "") diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index 8b7e62b734f7..2232177dd914 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -3872,7 +3872,11 @@ macro(build_grpc) "${EP_COMMON_CMAKE_ARGS}" "-DCMAKE_C_FLAGS=${GRPC_C_FLAGS}" "-DCMAKE_CXX_FLAGS=${GRPC_CXX_FLAGS}" + -DCMAKE_INSTALL_PREFIX=${GRPC_PREFIX} -DCMAKE_PREFIX_PATH='${GRPC_PREFIX_PATH_ALT_SEP}' + -DOPENSSL_CRYPTO_LIBRARY=${OPENSSL_CRYPTO_LIBRARY} + -DOPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR} + -DOPENSSL_SSL_LIBRARY=${OPENSSL_SSL_LIBRARY} -DgRPC_ABSL_PROVIDER=package -DgRPC_BUILD_CSHARP_EXT=OFF -DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF @@ -3888,14 +3892,10 @@ macro(build_grpc) -DgRPC_PROTOBUF_PROVIDER=package -DgRPC_RE2_PROVIDER=package -DgRPC_SSL_PROVIDER=package - -DgRPC_ZLIB_PROVIDER=package - -DCMAKE_INSTALL_PREFIX=${GRPC_PREFIX}) + -DgRPC_ZLIB_PROVIDER=package) if(PROTOBUF_VENDORED) list(APPEND GRPC_CMAKE_ARGS -DgRPC_PROTOBUF_PACKAGE_TYPE=CONFIG) endif() - if(OPENSSL_ROOT_DIR) - list(APPEND GRPC_CMAKE_ARGS -DOPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR}) - endif() # XXX the gRPC git checkout is huge and takes a long time # Ideally, we should be able to use the tarballs, but they don't contain @@ -4224,10 +4224,10 @@ macro(build_google_cloud_cpp_storage) -DGOOGLE_CLOUD_CPP_ENABLE=storage # We need this to build with OpenSSL 3.0. # See also: https://github.com/googleapis/google-cloud-cpp/issues/8544 - -DGOOGLE_CLOUD_CPP_ENABLE_WERROR=OFF) - if(OPENSSL_ROOT_DIR) - list(APPEND GOOGLE_CLOUD_CPP_CMAKE_ARGS -DOPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR}) - endif() + -DGOOGLE_CLOUD_CPP_ENABLE_WERROR=OFF + -DOPENSSL_CRYPTO_LIBRARY=${OPENSSL_CRYPTO_LIBRARY} + -DOPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR} + -DOPENSSL_SSL_LIBRARY=${OPENSSL_SSL_LIBRARY}) add_custom_target(google_cloud_cpp_dependencies) @@ -4729,16 +4729,25 @@ macro(build_awssdk) set(AWSSDK_BUILD_TYPE release) endif() - # provide hint for AWS SDK to link with the already located openssl - get_filename_component(OPENSSL_ROOT_HINT "${OPENSSL_INCLUDE_DIR}" DIRECTORY) set(AWSSDK_COMMON_CMAKE_ARGS ${EP_COMMON_CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${AWSSDK_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${AWSSDK_PREFIX} - -DCMAKE_PREFIX_PATH=${AWSSDK_PREFIX}\\$${OPENSSL_ROOT_HINT} + -DCMAKE_PREFIX_PATH=${AWSSDK_PREFIX} -DENABLE_TESTING=OFF -DENABLE_UNITY_BUILD=ON - -DOPENSSL_ROOT_DIR=${OPENSSL_ROOT_HINT}) + -DOPENSSL_CRYPTO_LIBRARY=${OPENSSL_CRYPTO_LIBRARY} + -DOPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR} + -DOPENSSL_SSL_LIBRARY=${OPENSSL_SSL_LIBRARY} + -Dcrypto_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR} + -Dcrypto_LIBRARY=${OPENSSL_CRYPTO_LIBRARY}) + if(ARROW_OPENSSL_USE_SHARED) + list(APPEND AWSSDK_COMMON_CMAKE_ARGS + -Dcrypto_SHARED_LIBRARY=${OPENSSL_CRYPTO_LIBRARY}) + else() + list(APPEND AWSSDK_COMMON_CMAKE_ARGS + -Dcrypto_STATIC_LIBRARY=${OPENSSL_CRYPTO_LIBRARY}) + endif() set(AWSSDK_CMAKE_ARGS ${AWSSDK_COMMON_CMAKE_ARGS} -DBUILD_DEPS=OFF @@ -4754,10 +4763,10 @@ macro(build_awssdk) # provide hint for AWS SDK to link with the already located libcurl and zlib list(APPEND AWSSDK_CMAKE_ARGS - -DCURL_LIBRARY=${CURL_ROOT_HINT}/lib -DCURL_INCLUDE_DIR=${CURL_ROOT_HINT}/include - -DZLIB_LIBRARY=${ZLIB_ROOT_HINT}/lib - -DZLIB_INCLUDE_DIR=${ZLIB_ROOT_HINT}/include) + -DCURL_LIBRARY=${CURL_ROOT_HINT}/lib + -DZLIB_INCLUDE_DIR=${ZLIB_ROOT_HINT}/include + -DZLIB_LIBRARY=${ZLIB_ROOT_HINT}/lib) endif() file(MAKE_DIRECTORY ${AWSSDK_INCLUDE_DIR}) @@ -4879,9 +4888,15 @@ macro(build_awssdk) set(S2N_TLS_CMAKE_ARGS ${AWSSDK_COMMON_CMAKE_ARGS}) list(APPEND S2N_TLS_CMAKE_ARGS - -DS2N_INTERN_LIBCRYPTO=ON # internalize libcrypto to avoid name conflict with openssl - -DCMAKE_PREFIX_PATH=${AWS_LC_PREFIX} # path to find crypto provided by aws-lc - -DCMAKE_C_FLAGS=${S2N_TLS_C_FLAGS}) + # internalize libcrypto to avoid name conflict with OpenSSL + -DS2N_INTERN_LIBCRYPTO=ON + # path to find crypto provided by aws-lc + -DCMAKE_PREFIX_PATH=${AWS_LC_PREFIX} + -DCMAKE_C_FLAGS=${S2N_TLS_C_FLAGS} + # paths to find crypto provided by aws-lc + -Dcrypto_INCLUDE_DIR=${AWS_LC_PREFIX}/include + -Dcrypto_LIBRARY=${AWS_LC_STATIC_LIBRARY} + -Dcrypto_STATIC_LIBRARY=${AWS_LC_STATIC_LIBRARY}) externalproject_add(s2n_tls_ep ${EP_COMMON_OPTIONS} diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt index 28f37af9bf14..a3e9f7c7334b 100644 --- a/cpp/src/arrow/CMakeLists.txt +++ b/cpp/src/arrow/CMakeLists.txt @@ -601,6 +601,23 @@ if(ARROW_BUILD_BUNDLED_DEPENDENCIES) string(APPEND ARROW_PC_LIBS_PRIVATE " -larrow_bundled_dependencies") list(INSERT ARROW_STATIC_INSTALL_INTERFACE_LIBS 0 "Arrow::arrow_bundled_dependencies") endif() + +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + set(GLIBCXX_USE_CXX11_ABI_SOURCE + ${CMAKE_CURRENT_BINARY_DIR}/try_compile_glibcxx_use_cxx_abi.cc) + file(WRITE ${GLIBCXX_USE_CXX11_ABI_SOURCE} + "#include \n" + "#if !_GLIBCXX_USE_CXX11_ABI\n" + "#error Not using CXX11 ABI\n" + "#endif\n" + "int main(void) {return 0;}\n") + try_compile(IS_GLIBCXX_USE_CXX11_ABI ${CMAKE_CURRENT_BINARY_DIR}/try_compile + SOURCES ${GLIBCXX_USE_CXX11_ABI_SOURCE}) + if(NOT IS_GLIBCXX_USE_CXX11_ABI) + string(APPEND ARROW_PC_CFLAGS " -D_GLIBCXX_USE_CXX11_ABI=0") + endif() +endif() + # Need -latomic on Raspbian. # See also: https://issues.apache.org/jira/browse/ARROW-12860 if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND ${CMAKE_SYSTEM_PROCESSOR} MATCHES "armv7") @@ -614,7 +631,7 @@ endif() # linking. ARROW_PC_* except ARROW_PC_*_PRIVATE are for the static # linking case. if(NOT ARROW_BUILD_SHARED AND ARROW_BUILD_STATIC) - set(ARROW_PC_CFLAGS "${ARROW_PC_CFLAGS_PRIVATE}") + string(APPEND ARROW_PC_CFLAGS "${ARROW_PC_CFLAGS_PRIVATE}") set(ARROW_PC_CFLAGS_PRIVATE "") set(ARROW_PC_LIBS "${ARROW_PC_LIBS_PRIVATE}") set(ARROW_PC_LIBS_PRIVATE "") @@ -624,7 +641,6 @@ if(NOT ARROW_BUILD_SHARED AND ARROW_BUILD_STATIC) string(APPEND ARROW_TESTING_PC_CFLAGS "${ARROW_TESTING_PC_CFLAGS_PRIVATE}") set(ARROW_TESTING_PC_CFLAGS_PRIVATE "") else() - set(ARROW_PC_CFLAGS "") set(ARROW_PC_LIBS "") set(ARROW_PC_REQUIRES "") endif() diff --git a/dev/tasks/macros.jinja b/dev/tasks/macros.jinja index 9cb0c0f8a847..8eedb971635b 100644 --- a/dev/tasks/macros.jinja +++ b/dev/tasks/macros.jinja @@ -320,12 +320,12 @@ on: path: repo/libarrow/bin/windows {% endif %} {% if get_nix %} - {% for os in ["ubuntu-18.04", "ubuntu-22.04", "centos-7"] %} - - name: Get {{ os }} binary + {% for openssl_version in ["1.0", "1.1", "3.0"] %} + - name: Get Linux OpenSSL {{ openssl_version }} binary uses: actions/download-artifact@v3 with: - name: r-lib__libarrow__bin__{{ os }} - path: repo/libarrow/bin/{{ os }} + name: r-lib__libarrow__bin__linux-openssl-{{ openssl_version }} + path: repo/libarrow/bin/linux-openssl-{{ openssl_version }} {% endfor %} {% endif %} - name: Get src pkg diff --git a/dev/tasks/r/github.packages.yml b/dev/tasks/r/github.packages.yml index b02fc0ade5cd..1ecacb057502 100644 --- a/dev/tasks/r/github.packages.yml +++ b/dev/tasks/r/github.packages.yml @@ -57,18 +57,23 @@ jobs: path: arrow/r/arrow_*.tar.gz linux-cpp: - name: C++ Binary {{ '${{ matrix.config.os }}-${{ matrix.config.version }}' }} + name: C++ Binary Linux OpenSSL {{ '${{ matrix.openssl }}' }} runs-on: ubuntu-latest needs: source strategy: fail-fast: false matrix: - config: - - { os: ubuntu, version: "18.04" } - - { os: ubuntu, version: "22.04" } - - { os: centos, version: "7" } - env: - UBUNTU: {{ '${{ matrix.config.version }}' }} + include: + - openssl: "3.0" + os: ubuntu + ubuntu: "22.04" + - extra-cmake-flags: >- + -DCMAKE_INCLUDE_PATH=/usr/include/openssl11 + -DCMAKE_LIBRARY_PATH=/usr/lib64/openssl11 + openssl: "1.1" + os: centos + - openssl: "1.0" + os: centos steps: {{ macros.github_checkout_arrow()|indent }} {{ macros.github_change_r_pkg_version(is_fork, '${{ needs.source.outputs.pkg_version }}')|indent }} @@ -77,12 +82,14 @@ jobs: - name: Build libarrow shell: bash env: - UBUNTU: {{ '"${{ matrix.config.version }}"' }} + UBUNTU: {{ '"${{ matrix.ubuntu }}"' }} {{ macros.github_set_sccache_envvars()|indent(8) }} run: | sudo sysctl -w kernel.core_pattern="core.%e.%p" ulimit -c unlimited - archery docker run {{ '${{ matrix.config.os}}' }}-cpp-static + archery docker run \ + -e EXTRA_CMAKE_FLAGS="{{ '${{ matrix.extra-cmake-flags }}' }}" \ + {{ '${{ matrix.os }}' }}-cpp-static - name: Bundle libarrow shell: bash env: @@ -96,7 +103,7 @@ jobs: - name: Upload binary artifact uses: actions/upload-artifact@v3 with: - name: r-lib__libarrow__bin__{{ '${{ matrix.config.os}}-${{ matrix.config.version}}' }} + name: r-lib__libarrow__bin__linux-openssl-{{ '${{ matrix.openssl }}' }} path: arrow/r/libarrow/dist/arrow-*.zip windows-cpp: diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index b345bcd48e9a..f387fdbf945f 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -989,9 +989,9 @@ tasks: custom_version: Unset artifacts: - r-lib__libarrow__bin__windows__arrow-{no_rc_r_version}\.zip - - r-lib__libarrow__bin__centos-7__arrow-{no_rc_r_version}\.zip - - r-lib__libarrow__bin__ubuntu-18.04__arrow-{no_rc_r_version}\.zip - - r-lib__libarrow__bin__ubuntu-22.04__arrow-{no_rc_r_version}\.zip + - r-lib__libarrow__bin__linux-openssl-1.0__arrow-{no_rc_r_version}\.zip + - r-lib__libarrow__bin__linux-openssl-1.1__arrow-{no_rc_r_version}\.zip + - r-lib__libarrow__bin__linux-openssl-3.0__arrow-{no_rc_r_version}\.zip - r-pkg__bin__windows__contrib__4.1__arrow_{no_rc_r_version}\.zip - r-pkg__bin__windows__contrib__4.2__arrow_{no_rc_r_version}\.zip - r-pkg__bin__macosx__contrib__4.1__arrow_{no_rc_r_version}\.tgz diff --git a/docker-compose.yml b/docker-compose.yml index c9b02c45d1c5..31595f791fc9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -443,7 +443,7 @@ services: ARROW_DEPENDENCY_SOURCE: BUNDLED ARROW_HOME: /arrow LIBARROW_MINIMAL: "false" - command: /bin/bash -c " + command: /bin/bash -c " scl enable devtoolset-8 '/arrow/r/inst/build_arrow_static.sh'" ubuntu-cpp-bundled: diff --git a/r/configure b/r/configure index 05ff4ae93c2d..dc0e8e63192b 100755 --- a/r/configure +++ b/r/configure @@ -211,6 +211,9 @@ else else # This case must be ARROW_DEPENDENCY_SOURCE=BUNDLED. PKG_CFLAGS="-I${LIB_DIR}/../include $PKG_CFLAGS" + if grep -q "_GLIBCXX_USE_CXX11_ABI=0" "${LIB_DIR}/pkgconfig/arrow.pc"; then + PKG_CFLAGS="${PKG_CFLAGS} -D_GLIBCXX_USE_CXX11_ABI=0" + fi PKG_DIRS="-L${LIB_DIR}" if [ "${OPENSSL_ROOT_DIR}" != "" ]; then PKG_DIRS="${PKG_DIRS} -L${OPENSSL_ROOT_DIR}/lib" diff --git a/r/tools/nixlibs.R b/r/tools/nixlibs.R index 3d9edf03687b..b1af28272ad1 100644 --- a/r/tools/nixlibs.R +++ b/r/tools/nixlibs.R @@ -96,12 +96,13 @@ download_binary <- function(lib) { # of action based on the current system. Other values you can set it to: # * "FALSE" (not case-sensitive), to skip this option altogether # * "TRUE" (not case-sensitive), to try to discover your current OS, or -# * Some other string: a "distro-version" that corresponds to a binary that is -# available, to override what this function may discover by default. +# * Some other string: a "linux-openssl-${OPENSSL_VERSION}" that corresponds to +# a binary that is available, to override what this function may discover by +# default. # Possible values are: -# * "centos-7" (gcc 8 (devtoolset), openssl 1, glib 2.17) -# * "ubuntu-18.04" (gcc 8, openssl 1, glib 2.27) -# * "ubuntu-22.04" (openssl 3) +# * "linux-openssl-1.0" (OpenSSL 1.0) +# * "linux-openssl-1.1" (OpenSSL 1.1) +# * "linux-openssl-3.0" (OpenSSL 3.0) # These string values, along with `NULL`, are the potential return values of # this function. identify_binary <- function(lib = Sys.getenv("LIBARROW_BINARY"), info = distro()) { @@ -160,7 +161,7 @@ select_binary <- function(os = tolower(Sys.info()[["sysname"]]), } } -# This tests that curl and openssl are present (bc we can include their headers) +# This tests that curl and OpenSSL are present (bc we can include their headers) # and it checks for other versions/features and raises errors that we grep for test_for_curl_and_openssl <- " #include @@ -168,15 +169,14 @@ test_for_curl_and_openssl <- " #error Using libc++ #endif -#if !( __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 27) -#error glibc version too old -#endif - #include #include #if OPENSSL_VERSION_NUMBER < 0x10002000L #error OpenSSL version too old #endif +#if OPENSSL_VERSION_NUMBER < 0x10100000L +#error Using OpenSSL version 1.0 +#endif #if OPENSSL_VERSION_NUMBER >= 0x30000000L #error Using OpenSSL version 3 #endif @@ -190,14 +190,13 @@ compile_test_program <- function(code) { suppressWarnings(system2("echo", sprintf('"%s" | %s -', code, runner), stdout = FALSE, stderr = TRUE)) } -# TODO(ARROW-16976): drop "ubuntu-18.04" and just use "centos-7" # (built with newer devtoolset but older glibc (2.17) for broader compatibility,# like manylinux2014) determine_binary_from_stderr <- function(errs) { if (is.null(attr(errs, "status"))) { - # There was no error in compiling: so we found libcurl and openssl > 1.0.2, - # openssl is < 3.0, glibc is >= 2.27, and we're not using a strict libc++ - cat("*** Found libcurl and openssl >= 1.0.2\n") - return("ubuntu-18.04") + # There was no error in compiling: so we found libcurl and OpenSSL >= 1.1, + # openssl is < 3.0 + cat("*** Found libcurl and OpenSSL >= 1.1\n") + return("linux-openssl-1.1") # Else, check for dealbreakers: } else if (any(grepl("Using libc++", errs, fixed = TRUE))) { # Our binaries are all built with GNU stdlib so they fail with libc++ @@ -207,23 +206,18 @@ determine_binary_from_stderr <- function(errs) { cat("*** libcurl not found\n") return(NULL) } else if (header_not_found("openssl/opensslv", errs)) { - cat("*** openssl not found\n") + cat("*** OpenSSL not found\n") return(NULL) } else if (any(grepl("OpenSSL version too old", errs))) { - cat("*** openssl found but version >= 1.0.2 is required for some features\n") + cat("*** OpenSSL found but version >= 1.0.2 is required for some features\n") return(NULL) # Else, determine which other binary will work - } else if (any(grepl("glibc version too old", errs))) { - # ubuntu-18.04 has glibc 2.27, so even if you install newer compilers - # (e.g. devtoolset on centos) and have curl/openssl, you run into problems - # TODO(ARROW-16976): build binaries with older glibc - cat("*** Checking glibc version\n") - # If we're here, we're on an older OS but with a new enough compiler - # (e.g. CentOS 7 with devtoolset-8) - return("centos-7") + } else if (any(grepl("Using OpenSSL version 1.0", errs))) { + cat("*** Found libcurl and OpenSSL < 1.1\n") + return("linux-openssl-1.0") } else if (any(grepl("Using OpenSSL version 3", errs))) { - cat("*** Found libcurl and openssl >= 3.0.0\n") - return("ubuntu-22.04") + cat("*** Found libcurl and OpenSSL >= 3.0.0\n") + return("linux-openssl-3.0") } NULL } diff --git a/r/tools/test-nixlibs.R b/r/tools/test-nixlibs.R index 631ff7a3e351..e099dcdad4ac 100644 --- a/r/tools/test-nixlibs.R +++ b/r/tools/test-nixlibs.R @@ -26,7 +26,7 @@ source("nixlibs.R", local = TRUE) test_that("identify_binary() based on LIBARROW_BINARY", { expect_null(identify_binary("FALSE")) - expect_identical(identify_binary("ubuntu-18.04"), "ubuntu-18.04") + expect_identical(identify_binary("linux-openssl-1.0"), "linux-openssl-1.0") expect_null(identify_binary("", info = list(id = "debian"))) }) @@ -52,22 +52,29 @@ test_that("determine_binary_from_stderr", { expect_output( expect_identical( determine_binary_from_stderr(compile_test_program("int a;")), - "ubuntu-18.04" + "linux-openssl-1.1" ), - "Found libcurl and openssl >= 1.0.2" + "Found libcurl and OpenSSL >= 1.1" + ) + expect_output( + expect_identical( + determine_binary_from_stderr(compile_test_program("#error Using OpenSSL version 1.0")), + "linux-openssl-1.0" + ), + "Found libcurl and OpenSSL < 1.1" ) expect_output( expect_identical( determine_binary_from_stderr(compile_test_program("#error Using OpenSSL version 3")), - "ubuntu-22.04" + "linux-openssl-3.0" ), - "Found libcurl and openssl >= 3.0.0" + "Found libcurl and OpenSSL >= 3.0.0" ) expect_output( expect_null( determine_binary_from_stderr(compile_test_program("#error OpenSSL version too old")) ), - "openssl found but version >= 1.0.2 is required for some features" + "OpenSSL found but version >= 1.0.2 is required for some features" ) }) @@ -75,16 +82,23 @@ test_that("select_binary() with test program", { expect_output( expect_identical( select_binary("linux", "x86_64", "int a;"), - "ubuntu-18.04" + "linux-openssl-1.1" + ), + "Found libcurl and OpenSSL >= 1.1" + ) + expect_output( + expect_identical( + select_binary("linux", "x86_64", "#error Using OpenSSL version 1.0"), + "linux-openssl-1.0" ), - "Found libcurl and openssl >= 1.0.2" + "Found libcurl and OpenSSL < 1.1" ) expect_output( expect_identical( select_binary("linux", "x86_64", "#error Using OpenSSL version 3"), - "ubuntu-22.04" + "linux-openssl-3.0" ), - "Found libcurl and openssl >= 3.0.0" + "Found libcurl and OpenSSL >= 3.0.0" ) }) diff --git a/r/vignettes/developers/setup.Rmd b/r/vignettes/developers/setup.Rmd index 88f14a189737..f678338fc0cf 100644 --- a/r/vignettes/developers/setup.Rmd +++ b/r/vignettes/developers/setup.Rmd @@ -53,10 +53,10 @@ recent version of the library without building from source. On Linux, you can download a .zip file containing libarrow from the [nightly repository](https://nightlies.apache.org/arrow/r/libarrow/bin/). -The directory names correspond to the OS the binaries where built on: -- "centos-7" (gcc 8 via devtoolset, openssl 1, glib 2.17) -- "ubuntu-18.04" (gcc 8, openssl 1, glib 2.27) -- "ubuntu-22.04" (openssl 3) +The directory names correspond to the OpenSSL version the binaries built with: +- "linux-openssl-1.0" (OpenSSL 1.0) +- "linux-openssl-1.1" (OpenSSL 1.1) +- "linux-openssl-3.0" (OpenSSL 3.0) Version numbers in that repository correspond to dates. diff --git a/r/vignettes/install.Rmd b/r/vignettes/install.Rmd index 8051debc8439..b33c439236fc 100644 --- a/r/vignettes/install.Rmd +++ b/r/vignettes/install.Rmd @@ -297,8 +297,8 @@ See below for more in-depth explanations of these environment variables. will work with your system. You can set it to `false` to skip this option altogether, or you can specify a string "distro-version" that corresponds to a binary that is available, to override what this function may discover by - default. Possible values are: "centos-7", - "ubuntu-18.04" (both with gcc 8, and openssl 1), "ubuntu-22.04" (openssl 3). + default. Possible values are: "linux-openssl-1.0", "linux-openssl-1.1", + "linux-openssl-3.0". * `LIBARROW_BUILD` : If set to `false`, the build script will not attempt to build the C++ from source. This means you will only get a working arrow R package if a prebuilt binary is found.