This is an automated email from the ASF dual-hosted git repository.

raulcd pushed a commit to branch maint-13.0.0
in repository https://gitbox.apache.org/repos/asf/arrow.git

commit 73660ff383b116166d73a38f957330d5f7654e78
Author: Dewey Dunnington <[email protected]>
AuthorDate: Tue Aug 15 21:09:18 2023 -0300

    GH-36969: [R] Disable GCS by default when doing a bundled build on gcc-13 
(#37147)
    
    ### Rationale for this change
    
    Currently a naive `install.packages("arrow")` will result in a failed build 
if gcc-13 is the compiler. This is because we include GCS by default on this 
type of build (bundled). CRAN's check farm includes at least one system where 
gcc-13 is the compiler and so we can't error or suggest a user workaround.
    
    ### What changes are included in this PR?
    
    This PR explicitly sets the relevant environment variable if the compiler 
version string contains "g++" and "13.XX.XX". This is admittedly crude; 
however, the alternative of updating Abseil results in a cascading set of 
changes that may break other parts of Arrow. Few if any actual users will build 
the Arrow R package from source using gcc-13, so this has a much lower 
footprint (and a workaround: you can just set the ARROW_GCS environment 
variable + custom abseil location yourself bef [...]
    
    ### Are these changes tested?
    
    Tested via crossbow (see below).
    
    ### Are there any user-facing changes?
    
    No.
    * Closes: #36969
    
    Authored-by: Dewey Dunnington <[email protected]>
    Signed-off-by: Jacob Wujciak-Jens <[email protected]>
---
 r/configure | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/r/configure b/r/configure
index e019877345..20b743d4f9 100755
--- a/r/configure
+++ b/r/configure
@@ -100,6 +100,21 @@ if [ ! "`${R_HOME}/bin/R CMD config CXX17`" ]; then
   exit 1
 fi
 
+# GH-36969: The version of Abseil used in the bundled build won't build on
+# gcc-13. As a workaround for the 13.0.0 release, explicitly set
+# ARROW_WITH_GOOGLE_CLOUD_CPP to OFF (if not already set)
+if [ -z "$ARROW_GCS" ]; then
+  CXX17=`${R_HOME}/bin/R CMD config CXX17`
+  CXX17_VERSION=`$CXX17 --version`
+  if echo "$CXX17_VERSION" | grep -e "g++" > /dev/null ; then
+    if echo "$CXX17_VERSION" | grep -e "13.[0-9]\+.[0-9]\+" > /dev/null ; then
+      echo "*** Disabling Arrow build with GCS on gcc-13."
+      echo "*** Set ARROW_GCS=ON to explicitly enable."
+      export ARROW_GCS="OFF"
+    fi
+  fi
+fi
+
 # Test if pkg-config is available to use
 if ${PKG_CONFIG} --version >/dev/null 2>&1; then
   PKG_CONFIG_AVAILABLE="true"

Reply via email to