diff --git a/r/inst/build_arrow_static.sh b/r/inst/build_arrow_static.sh index 34a607cfb6f7..79010f981264 100755 --- a/r/inst/build_arrow_static.sh +++ b/r/inst/build_arrow_static.sh @@ -77,7 +77,7 @@ read -r -a ARROW_EXTRA_CMAKE_FLAGS <<< "${EXTRA_CMAKE_FLAGS}" mkdir -p "${BUILD_DIR}" pushd "${BUILD_DIR}" "${CMAKE_COMMAND[@]}" -DARROW_BOOST_USE_SHARED=OFF \ - -DARROW_SNAPPY_USE_SHARED=OFF \ + -DARROW_SNAPPY_USE_SHARED="${ARROW_SNAPPY_USE_SHARED:-OFF}" \ -DARROW_BUILD_TESTS=OFF \ -DARROW_BUILD_SHARED=OFF \ -DARROW_BUILD_STATIC=ON \ diff --git a/r/tools/nixlibs.R b/r/tools/nixlibs.R index 3c184f6fe232..90a4ae5fe734 100644 --- a/r/tools/nixlibs.R +++ b/r/tools/nixlibs.R @@ -909,6 +909,7 @@ with_wasm_support <- function(env_var_list) { CMAKE_WRAPPER = "emcmake", ARROW_DEPENDENCY_SOURCE = "BUNDLED", ARROW_DEPENDENCY_USE_SHARED = "OFF", + ARROW_SNAPPY_USE_SHARED = "OFF", ARROW_ENABLE_THREADING = "OFF", ARROW_GCS = "OFF", ARROW_AZURE = "OFF", diff --git a/r/vignettes/install.Rmd b/r/vignettes/install.Rmd index 099ed6d3580c..77d39fd7af42 100644 --- a/r/vignettes/install.Rmd +++ b/r/vignettes/install.Rmd @@ -196,6 +196,11 @@ uses only system-installed dependencies (when set to `SYSTEM`) or checks system-installed dependencies first and only installs dependencies which aren't already present (when set to `AUTO`, the default). +Snappy is an exception: by default it is always linked statically, even when +`ARROW_DEPENDENCY_SOURCE` is `SYSTEM`. If your system only provides a shared +`libsnappy`, set `ARROW_SNAPPY_USE_SHARED=ON` to link against it; the library +must then be present at runtime. + These dependencies vary by platform; however, if you wish to install these yourself prior to libarrow installation, we recommend that you take a look at the [docker file for whichever of our CI builds](https://github.com/apache/arrow/tree/main/ci/docker)