You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/20 21:39:39 UTC

[GitHub] [arrow] jonkeane commented on a diff in pull request #11666: ARROW-14638: [C++][R] Unknown C compiler / ccache on Arch Linux

jonkeane commented on code in PR #11666:
URL: https://github.com/apache/arrow/pull/11666#discussion_r854575316


##########
r/tools/nixlibs.R:
##########
@@ -301,8 +301,10 @@ build_libarrow <- function(src_dir, dst_dir) {
     # EXTRA_CMAKE_FLAGS will often be "", but it's convenient later to have it defined
     EXTRA_CMAKE_FLAGS = Sys.getenv("EXTRA_CMAKE_FLAGS"),
     # Make sure we build with the same compiler settings that R is using
-    CC = R_CMD_config("CC"),
-    CXX = paste(R_CMD_config("CXX11"), R_CMD_config("CXX11STD")),
+    # but we remove ccache, since `ARROW_USE_CCACHE` does that for our dependencies, and
+    # having ccache here as well leads to compile errors
+    CC = gsub("^.*ccache", "", R_CMD_config("CC")),
+    CXX = paste(gsub("^.*ccache", "", R_CMD_config("CXX11")), R_CMD_config("CXX11STD")),

Review Comment:
   I'm not 100% sure this is what we should do, but it _does_ work. 
   
   Our dependencies + builds should use ccache by default if it's available:
   
   https://github.com/apache/arrow/blob/83cc5727571c6291dad513e5a2cab15e6182b569/cpp/CMakeLists.txt#L195-L207
   
   So we shouldn't need to _also_ specify ccache before g++, etc. and that seems to be what has been causing issues for some folks.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org