Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-11460

[R] Use system libraries if present on Linux



    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 6.0.0
    • R


      We currently vendor/bundle all compression libraries and have them disabled in the default build. This is reliable, but it would be nice to use system libraries if they're present.

      It's not as simple as setting ARROW_DEPENDENCY_SOURCE=AUTO because we have to know if we're using them in order to set the right `-lwhatever` flags in the R package build (see ARROW-9303 for what happens if you don't). ARROW-6312 should now track everything we need in the *.pc files, so if we can get that information in our arrow C++ build, we should be able to use AUTO.


      • Make ARROW_DEPENDENCY_SOURCE configurable by env var in build_arrow_static.sh but don't change the default (we want this to be opt-in for this release, can change the default for the next release)
      • If ARROW_DEPENDENCY_SOURCE=AUTO, we'll need to get the -l flags from the build. The right way is with pkg-config (as Kou showed), so if we want to use it, we'll have to check that pkg-config is installed before allowing AUTO. Then after doing the C++ build, call pkg-config on the install directory to set the PKG_LIBS. This probably needs to be done from r/configure because that's where that env var is set. Alternatively, we could try to grep/sed it from the *.pc files.
      • Make sure we have CI that tests both the AUTO and BUNDLED paths.
      • Possibly add the change Kou suggested at https://github.com/apache/arrow/pull/10404#issuecomment-871034191 to handle the case where libs were built outside the R package installation (though we should doublecheck what --static does, we don't want this to only work for a static Arrow C++ build, this should also work for shared libraries here)


        Issue Links



              thisisnic Nicola Crane
              npr Neal Richardson
              0 Vote for this issue
              4 Start watching this issue



                Time Tracking

                  Original Estimate - Not Specified
                  Not Specified
                  Remaining Estimate - 0h
                  Time Spent - 24h 40m
                  24h 40m