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

[R] If pkg-config finds arrow on default search path, we don't know if it was built with ARROW_S3

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0.0
    • None
    • Packaging, R
    • None

    Description

      When (for example) using libarrow as installed by a system package manager, pkg-config will find it when installing the R package and will use it. But, it seems that if the install location is on the default search path, pkg-config won't return a -L flag, so the search for the cmake config (https://github.com/apache/arrow/blob/master/r/configure#L178-L179) won't find it, and we'll build without S3.

      A workaround is to export ARROW_R_CXXFLAGS=-DARROW_R_WITH_S3 to hard-code the S3 flag.

      A proper fix might check for -L in the return of pkg-config (in PKGCONFIG_LIBS), and if not present, walk the search path to determine where arrow (and thus the cmake file) is.

      ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012 | sed -E 's@SEARCH_DIR...(.*)..$@\1@g'
      

      seems to give a list of dirs in the search path, so we could loop over those until the file is found, then use that later.

      A different solution would be to compile a test program instead of digging through cmake options.

      Attachments

        Activity

          People

            Unassigned Unassigned
            npr Neal Richardson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: