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



##########
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:
       If I read versions.txt correctly, I think you could get the env vars 
from the files like:
   
   ```
   files <- dir(Sys.getenv("ARROW_THIRDPARTY_DEPENDENCY_DIR"))
   toupper(sub("(.*?)-.*", "ARROW_\\1_URL", files))
    [1] "ARROW_ABSL_URL"       "ARROW_AWS_URL"        "ARROW_AWS_URL"       
    [4] "ARROW_AWS_URL"        "ARROW_AWS_URL"        "ARROW_BOOST_URL"     
    [7] "ARROW_BROTLI_URL"     "ARROW_BZIP2_URL"      "ARROW_CARES_URL"     
   [10] "ARROW_GBENCHMARK_URL" "ARROW_GFLAGS_URL"     "ARROW_GLOG_URL"      
   [13] "ARROW_GRPC_URL"       "ARROW_GTEST_URL"      "ARROW_JEMALLOC_URL"  
   [16] "ARROW_LZ4_URL"        "ARROW_MIMALLOC_URL"   "ARROW_ORC_URL"       
   [19] "ARROW_PROTOBUF_URL"   "ARROW_RAPIDJSON_URL"  "ARROW_RE2_URL"       
   [22] "ARROW_SNAPPY_URL"     "ARROW_THRIFT_URL"     "ARROW_UTF8PROC_URL"  
   [25] "ARROW_XSIMD_URL"      "ARROW_ZLIB_URL"       "ARROW_ZSTD_URL"    
   ```
   
   though the AWS ones need some special handling. I would just take whatever 
is in that dir and set those, don't worry about any being missing or whether 
someone has already set an env var for one of these (seems unlikely and worth 
discouraging). 
   
   Agree that the download function should just return the dir it downloaded 
to. Could also print a message about setting that env var before building.
   
   Solaris doesn't turn JSON off because downloading isn't the problem on 
Solaris, and rapidjson compiles fine. It's somehow handled differently than the 
other third party dependencies so it doesn't go into 
`libarrow_bundled_dependencies.a`, the building of which seemed to be the 
problem on Solaris. Though I would be fine disabling it on solaris too, once 
that is an option--it just wasn't necessary when we were trying to get a 
passing build there.




-- 
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