nealrichardson commented on a change in pull request #11001:
URL: https://github.com/apache/arrow/pull/11001#discussion_r696722328



##########
File path: r/tools/nixlibs.R
##########
@@ -329,18 +288,22 @@ build_libarrow <- function(src_dir, dst_dir) {
     LDFLAGS = R_CMD_config("LDFLAGS")
   )
   env_vars <- paste0(names(env_var_list), '="', env_var_list, '"', collapse = 
" ")
+  # Add env variables like ARROW_S3=ON. Order doesn't matter. Depends on 
`download_ok`
   env_vars <- with_s3_support(env_vars)
   env_vars <- with_mimalloc(env_vars)
-  if (tolower(Sys.info()[["sysname"]]) %in% "sunos") {
-    # jemalloc doesn't seem to build on Solaris
-    # nor does thrift, so turn off parquet,
-    # and arrowExports.cpp requires parquet for dataset (ARROW-11994), so turn 
that off
-    # xsimd doesn't compile, so set SIMD level to NONE to skip it
-    # re2 and utf8proc do compile,
-    # but `ar` fails to build libarrow_bundled_dependencies, so turn them off
-    # so that there are no bundled deps
-    env_vars <- paste(env_vars, "ARROW_JEMALLOC=OFF ARROW_PARQUET=OFF 
ARROW_DATASET=OFF ARROW_WITH_RE2=OFF ARROW_WITH_UTF8PROC=OFF 
EXTRA_CMAKE_FLAGS=-DARROW_SIMD_LEVEL=NONE")
-  }
+  env_vars <- with_jemalloc(env_vars)

Review comment:
       This is cool, but it kinda feels like we're reimplementing cmake here, 
and there's lots of subtleties that we can get wrong. I wonder if there's a 
simpler approach:
   
   * Instead of checking for all of the `*_SOURCE_URL`s in env vars, we could 
add a single env var like `THIRDPARTY_DEPENDENCY_DIR`, and build all those 
source URLs in this script if that is set. 
   * Simplify the build configuration logic here: if `!download_ok && 
!dir.exists(Sys.getenv("THIRDPARTY_DEPENDENCY_DIR")) && 
Sys.getenv("ARROW_DEPENDENCY_SOURCE") != "SYSTEM"` turn everything off (like 
the solaris case here, plus any others you've identified)
   
   Later, if/when ARROW-8155 happens, we can make some of those "OFFs" become 
optionally on if the system has them.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to