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

[R] Function not declared in scope

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 7.0.0
    • R

    Description

      Starting with ARROW-13111, CI for R versions 3.4 and 3.3 have been failing with:

      In file included from ./arrow_types.h:22:0,
                       from altrep.cpp:18:
      ././arrow_cpp11.h: In lambda function:
      ././arrow_cpp11.h:108:23: error: ‘STRING_PTR_RO’ was not declared in this scope
           const SEXP* p_x = STRING_PTR_RO(x);
                             ^~~~~~~~~~~~~
      ././arrow_cpp11.h:108:23: note: suggested alternative: ‘STRING_PTR’
           const SEXP* p_x = STRING_PTR_RO(x);
                             ^~~~~~~~~~~~~
                             STRING_PTR
      altrep.cpp: In function ‘std::shared_ptr<arrow::Array> arrow::r::altrep::vec_to_arrow_altrep_bypass(SEXP)’:
      altrep.cpp:709:24: error: ambiguating new declaration of ‘std::shared_ptr<arrow::Array> arrow::r::altrep::vec_to_arrow_altrep_bypass(SEXP)’
       std::shared_ptr<Array> vec_to_arrow_altrep_bypass(SEXP x) { return nullptr; }
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from altrep.cpp:18:0:
      ./arrow_types.h:190:31: note: old declaration ‘std::shared_ptr<arrow::ChunkedArray> arrow::r::altrep::vec_to_arrow_altrep_bypass(SEXP)’
       std::shared_ptr<ChunkedArray> vec_to_arrow_altrep_bypass(SEXP);
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
      g++ -std=gnu++11 -I/opt/R/3.4.4/lib/R/include -DNDEBUG -I/arrow/r/check/arrow.Rcheck/00_pkg_src/arrow/libarrow/arrow-6.0.1.9000/include  -DARROW_R_WITH_ARROW -DARROW_R_WITH_PARQUET -DARROW_R_WITH_DATASET -DARROW_R_WITH_S3 -DARROW_R_WITH_JSON -I../inst/include/  -I/usr/local/include   -fpic  -g -O2 -c array.cpp -o array.o
      In file included from ./arrow_types.h:22:0,
                       from array.cpp:18:
      ././arrow_cpp11.h: In lambda function:
      ././arrow_cpp11.h:108:23: error: ‘STRING_PTR_RO’ was not declared in this scope
           const SEXP* p_x = STRING_PTR_RO(x);
                             ^~~~~~~~~~~~~
      /opt/R/3.4.4/lib/R/etc/Makeconf:168: recipe for target 'altrep.o' failed
      make: *** [altrep.o] Error 1
      make: *** Waiting for unfinished jobs....
      ././arrow_cpp11.h:108:23: note: suggested alternative: ‘STRING_PTR’
           const SEXP* p_x = STRING_PTR_RO(x);
                             ^~~~~~~~~~~~~
                             STRING_PTR
      /opt/R/3.4.4/lib/R/etc/Makeconf:168: recipe for target 'array.o' failed
      make: *** [array.o] Error 1
      ERROR: compilation failed for package ‘arrow’
      * removing ‘/arrow/r/check/arrow.Rcheck/arrow’
      

      https://github.com/ursacomputing/crossbow/runs/4295709576?check_suite_focus=true#step:8:1402

      It looks like we need a bit more gating here to only use this code when altrep is available in R

      Attachments

        Issue Links

          Activity

            People

              jonkeane Jonathan Keane
              jonkeane Jonathan Keane
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 20m
                  2h 20m

                  Slack

                    Issue deployment