Apache DataFusion SQL Query Engine
ARROW-10856: [R] CC and CXX environment variables passing to cmake
Jonathan Keaneb88ee0d5fd2c
diff --git a/.env b/.envindex 2c23b0d16e..907fec5b61 100644--- a/.env+++ b/.env@@ -47,3 +47,5 @@ ARROW_R_DEV=TRUER_ORG=rhubR_IMAGE=ubuntu-gcc-releaseR_TAG=latest+# -1 does not attempt to install a devtoolset version, any positive integer will install devtoolset-n+DEVTOOLSET_VERSION=-1diff --git a/ci/docker/linux-r.dockerfile b/ci/docker/linux-r.dockerfileindex 5223d7aafa..ac414829d4 100644--- a/ci/docker/linux-r.dockerfile+++ b/ci/docker/linux-r.dockerfile@@ -27,6 +27,9 @@ ENV R_BIN=${r_bin}ARG r_dev=FALSEENV ARROW_R_DEV=${r_dev}+ARG devtoolset_version=-1+ENV DEVTOOLSET_VERSION=${devtoolset_version}+# Make sure R is on the path for the R-hub devel versions (where RPREFIX is set in its dockerfile)ENV PATH "${RPREFIX}/bin:${PATH}"diff --git a/ci/scripts/r_docker_configure.sh b/ci/scripts/r_docker_configure.shindex e6594e03a8..3e553fe9ed 100755--- a/ci/scripts/r_docker_configure.sh+++ b/ci/scripts/r_docker_configure.sh@@ -39,6 +39,18 @@ if [ "$RHUB_PLATFORM" = "linux-x86_64-fedora-clang" ]; thenrm -rf $(${R_BIN} RHOME)/etc/Makeconf.bakfi+# Special hacking to try to reproduce quirks on centos using non-default build+# tooling.+if [[ "$DEVTOOLSET_VERSION" -gt 0 ]]; then+ if [ "`which dnf`" ]; then+ dnf install -y centos-release-scl+ dnf install -y "devtoolset-$DEVTOOLSET_VERSION"+ else+ yum install -y centos-release-scl+ yum install -y "devtoolset-$DEVTOOLSET_VERSION"+ fi+fi+# Install openssl for S3 supportif [ "$ARROW_S3" == "ON" ] || [ "$ARROW_R_DEV" == "TRUE" ]; thenif [ "`which dnf`" ]; thendiff --git a/ci/scripts/r_test.sh b/ci/scripts/r_test.shindex a2428e912b..2aabf21818 100755--- a/ci/scripts/r_test.sh+++ b/ci/scripts/r_test.sh@@ -52,6 +52,11 @@ export TEXMFVAR=/tmp/texmf-var# Not all Suggested packages are needed for checking, so in case they aren't installed don't failexport _R_CHECK_FORCE_SUGGESTS_=FALSE+if [[ "$DEVTOOLSET_VERSION" -gt 0 ]]; then+ # enable the devtoolset version to use it+ source /opt/rh/devtoolset-$DEVTOOLSET_VERSION/enable+fi+# Make sure we aren't writing to the home dir (CRAN _hates_ this but there is no official check)BEFORE=$(ls -alh ~/)diff --git a/dev/tasks/r/azure.linux.yml b/dev/tasks/r/azure.linux.ymlindex 0081818434..7ffe8c581c 100644--- a/dev/tasks/r/azure.linux.yml+++ b/dev/tasks/r/azure.linux.yml@@ -36,6 +36,7 @@ jobs:export R_ORG={{ r_org }}export R_IMAGE={{ r_image }}export R_TAG={{ r_tag }}+ export DEVTOOLSET_VERSION={{ devtoolset_version|default("-1") }}docker-compose pull --ignore-pull-failures rdocker-compose build rdisplayName: Docker builddiff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.ymlindex a909ef14e9..62a4bc0249 100644--- a/dev/tasks/tasks.yml+++ b/dev/tasks/tasks.yml@@ -1766,6 +1766,16 @@ tasks:r_tag: 3.6-centos8not_cran: "TRUE"+ test-r-rstudio-r-base-3.6-centos7-devtoolset-8:+ ci: azure+ template: r/azure.linux.yml+ params:+ r_org: rstudio+ r_image: r-base+ r_tag: 3.6-centos7+ not_cran: "TRUE"+ devtoolset_version: 8+test-r-rstudio-r-base-3.6-opensuse15:ci: azuretemplate: r/azure.linux.ymldiff --git a/docker-compose.yml b/docker-compose.ymlindex dfea89b080..a2e7a67bb3 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -867,6 +867,7 @@ services:args:base: ${R_ORG}/${R_IMAGE}:${R_TAG}r_dev: ${ARROW_R_DEV}+ devtoolset_version: ${DEVTOOLSET_VERSION}shm_size: *shm-sizeenvironment:LIBARROW_DOWNLOAD: "false"@@ -874,6 +875,7 @@ services:ARROW_R_DEV: ${ARROW_R_DEV}# To test for CRAN release, delete ^^ these two env vars so we download the Apache releaseARROW_USE_PKG_CONFIG: "false"+ DEVTOOLSET_VERSION: ${DEVTOOLSET_VERSION}volumes:- .:/arrow:delegatedcommand: >