You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2023/08/28 05:24:25 UTC

[arrow] branch main updated: GH-37208: [R] Use currrently running R binary to compile test program (nix install) (#37225)

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

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new f27dc02f4a GH-37208: [R] Use currrently running R binary to compile test program (nix install) (#37225)
f27dc02f4a is described below

commit f27dc02f4afded28ab37c1536ebc60766da232d0
Author: Bruno Tremblay <br...@boostao.ca>
AuthorDate: Mon Aug 28 01:24:14 2023 -0400

    GH-37208: [R] Use currrently running R binary to compile test program (nix install) (#37225)
    
    ### Rationale for this change
    
    See #37208.
    
    ### What changes are included in this PR?
    
    Use the currrently running R binary to compile test program (nix install).
    
    ### Are these changes tested?
    
    No. Installation.
    
    ### Are there any user-facing changes?
    
    No
    
    * Closes: #37208
    
    Lead-authored-by: Bruno Tremblay <br...@boostao.ca>
    Co-authored-by: Sutou Kouhei <ko...@cozmixng.org>
    Co-authored-by: Neal Richardson <ne...@gmail.com>
    Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
 r/tools/nixlibs.R | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/r/tools/nixlibs.R b/r/tools/nixlibs.R
index 90ea868ea3..dca277c809 100644
--- a/r/tools/nixlibs.R
+++ b/r/tools/nixlibs.R
@@ -197,7 +197,14 @@ compile_test_program <- function(code) {
   # Note: if we wanted to check for openssl on macOS, we'd have to set the brew
   # path as a -I directory. But since we (currently) only run this code to
   # determine whether we can download a Linux binary, it's not relevant.
-  runner <- "`R CMD config CXX17` `R CMD config CPPFLAGS` `R CMD config CXX17FLAGS` `R CMD config CXX17STD` -E -xc++"
+  runner <- paste(
+    R_CMD_config("CXX17"),
+    R_CMD_config("CPPFLAGS"),
+    R_CMD_config("CXX17FLAGS"),
+    R_CMD_config("CXX17STD"),
+    "-E",
+    "-xc++"
+  )
   suppressWarnings(system2("echo", sprintf('"%s" | %s -', code, runner), stdout = FALSE, stderr = TRUE))
 }