Skip to content

[Rcpp-devel] Help with R CMD CHECK for rtree package

8 messages · Iñaki Ucar, Kent Johnson, Dirk Eddelbuettel

#
Hi,

I am a maintainer of this package - https://github.com/akoyabio/rtree - originally inspired by this example - https://gallery.rcpp.org/articles/Rtree-examples/. This package wraps the rtree implementation from BH 1.7.2.0-3 to provide fast methods for finding points nearby to other points in large data sets.

 I want to submit the package to CRAN but I have a CMD CHECK warning on Windows that I can't resolve.

Running CMD CHECK from GitHub Actions, on Microsoft Windows Server 2019 10.0.17763, I get this error message:
-- R CMD check results ---------------------------------------- rtree 0.2.0 ----
Duration: 1m 42.7s
See below...

0 errors v | 1 warning x | 0 notes v
Error: Error: R CMD check found WARNINGs
Execution halted
Error: Process completed with exit code 1.

The full output is here: https://github.com/akoyabio/rtree/runs/2502841486?check_suite_focus=true
The message says "See below..." but there is nothing below?

Running on my local Windows 10 PC I get this warning and a note:
-- R CMD check results ---------------------------------------- rtree 0.2.0 ----
Duration: 1m 2.2s
See below...
Note: information on .o files for x64 is not available
  File 'C:/Research/rtree.Rcheck/rtree/libs/x64/rtree.dll':
    Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)
    Found 'exit', possibly from 'exit' (C), 'stop' (Fortran)
    Found 'printf', possibly from 'printf' (C)

  Compiled code should not call entry points which might terminate R nor
  write to stdout/stderr instead of to the console, nor use Fortran I/O
  nor system RNGs. The detected symbols are linked into the code but
  might come from libraries and not actually be called.

  See 'Writing portable packages' in the 'Writing R Extensions' manual.

0 errors v | 1 warning x | 1 note x
Error: R CMD check found WARNINGs
Execution halted

Exited with status 1.

Again I have the "See below..." message and a confusing NOTE - I do not have any calls to abort, exit or printf in my code.

Any help in fixing the warning and note is much appreciated. If this is not an appropriate place to ask, please let me know what would be better. I'm perplexed.

Thank you,
Kent Johnson
Principal Software Developer
Akoya Biosciences
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20210505/e8a87b0f/attachment.html>
#
On 5 May 2021 at 15:54, Kent Johnson wrote:
| I am a maintainer of this package - https://github.com/akoyabio/rtree - originally inspired by this example - https://gallery.rcpp.org/articles/Rtree-examples/. This package wraps the rtree implementation from BH 1.7.2.0-3 to provide fast methods for finding points nearby to other points in large data sets.
| 
|  I want to submit the package to CRAN but I have a CMD CHECK warning on Windows that I can't resolve.
| 
| Running CMD CHECK from GitHub Actions, on Microsoft Windows Server 2019 10.0.17763, I get this error message:
| -- R CMD check results ---------------------------------------- rtree 0.2.0 ----
| Duration: 1m 42.7s
| 
| > checking whether package 'rtree' can be installed ... WARNING
|   See below...
| 
| 0 errors v | 1 warning x | 0 notes v
| Error: Error: R CMD check found WARNINGs
| Execution halted
| Error: Process completed with exit code 1.

It actually failed for me on RHub and on Win-Builder once I removed the
hard-equality constraint on a BH version no longer on CRAN:

  LinkingTo: Rcpp, BH (== 1.72.0-3)

That makes in unbuildable in most situations, I fear.
 
| The full output is here: https://github.com/akoyabio/rtree/runs/2502841486?check_suite_focus=true
| The message says "See below..." but there is nothing below?
| 
| Running on my local Windows 10 PC I get this warning and a note:
| -- R CMD check results ---------------------------------------- rtree 0.2.0 ----
| Duration: 1m 2.2s
| 
| > checking whether package 'rtree' can be installed ... WARNING
|   See below...
| 
| > checking compiled code ... NOTE
|   Note: information on .o files for x64 is not available
|   File 'C:/Research/rtree.Rcheck/rtree/libs/x64/rtree.dll':
|     Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)
|     Found 'exit', possibly from 'exit' (C), 'stop' (Fortran)
|     Found 'printf', possibly from 'printf' (C)

We would have to find out where this comes from.  But for starters, can you
make it work at your end with the currently released BH version, 1.75.0-0 ?

Dirk

|   Compiled code should not call entry points which might terminate R nor
|   write to stdout/stderr instead of to the console, nor use Fortran I/O
|   nor system RNGs. The detected symbols are linked into the code but
|   might come from libraries and not actually be called.
| 
|   See 'Writing portable packages' in the 'Writing R Extensions' manual.
| 
| 0 errors v | 1 warning x | 1 note x
| Error: R CMD check found WARNINGs
| Execution halted
| 
| Exited with status 1.
| 
| Again I have the "See below..." message and a confusing NOTE - I do not have any calls to abort, exit or printf in my code.
| 
| Any help in fixing the warning and note is much appreciated. If this is not an appropriate place to ask, please let me know what would be better. I'm perplexed.
| 
| Thank you,
| Kent Johnson
| Principal Software Developer
| Akoya Biosciences
| _______________________________________________
| Rcpp-devel mailing list
| Rcpp-devel at lists.r-forge.r-project.org
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
#
Thanks for your suggestion. I updated to build with latest BH and get the same errors:
https://github.com/akoyabio/rtree/runs/2513098433?check_suite_focus=true

(I was using BH 1.72 because in 1.75 boost::geometry requires C++ 14 which IIUC is not fully supported in R 3.6 on Windows.)

Kent
#
On 5 May 2021 at 22:49, Kent Johnson wrote:
| Thanks for your suggestion. I updated to build with latest BH and get the same errors:
| https://github.com/akoyabio/rtree/runs/2513098433?check_suite_focus=true

Yes, as I said, it doesn't even work for me at all on RHub or Win-Builder.
Might be compiler-related as it does build for me on Linux.

| (I was using BH 1.72 because in 1.75 boost::geometry requires C++ 14 which IIUC is not fully supported in R 3.6 on Windows.)

Well R 4.0.0 was released a year ago so I don't care too too much about 3.6.0.

Dirk
#
Hi Kent,
On Wed, 5 May 2021 at 17:54, Kent Johnson <kjohnson at akoyabio.com> wrote:
Below I see this:

* checking whether package 'rtree' can be installed ... WARNING
Found the following significant warnings:

  D:/a/_temp/Library/BH/include/boost/geometry/index/detail/varray_detail.hpp:544:13:
warning: 'void* memcpy(void*, const void*, size_t)' writing to an
object of type 'struct std::pair<boost::geometry::model::point<double,
2, boost::geometry::cs::cartesian>, unsigned int>' with no trivial
copy-assignment; use copy-assignment or copy-initialization instead
[-Wclass-memaccess]

  D:/a/_temp/Library/BH/include/boost/geometry/index/detail/varray_detail.hpp:578:13:
warning: 'void* memcpy(void*, const void*, size_t)' writing to an
object of type 'struct std::pair<double,
boost::variant<boost::geometry::index::detail::rtree::variant_leaf<std::pair<boost::geometry::model::point<double,
2, boost::geometry::cs::cartesian>, unsigned int>,
boost::geometry::index::quadratic<16>,
boost::geometry::model::box<boost::geometry::model::point<double, 2,
boost::geometry::cs::cartesian> >,
boost::geometry::index::detail::rtree::allocators<boost::container::new_allocator<std::pair<boost::geometry::model::point<double,
2, boost::geometry::cs::cartesian>, unsigned int> >,
std::pair<boost::geometry::model::point<double, 2,
boost::geometry::cs::cartesian>, unsigned int>,
boost::geometry::index::quadratic<16>,
boost::geometry::model::box<boost::geometry::model::point<double, 2,
boost::geometry::cs::cartesian> >,
boost::geometry::index::detail::rtree::node_variant_static_tag>,
boost::geometry::index::detail::rtree::node_variant_static_tag>,
boost::geometry::index::detail::rtree::variant_internal_node<std::pair<boost::geometry::model::point<double,
2, boost::geometry::cs::cartesian>, unsigned int>,
boost::geometry::index::quadratic<16, 4>,
boost::geometry::model::box<boost::geometry::model::point<double, 2,
boost::geometry::cs::cartesian> >,
boost::geometry::index::detail::rtree::allocators<boost::container::new_allocator<std::pair<boost::geometry::model::point<double,
2, boost::geometry::cs::cartesian>, unsigned int> >,
std::pair<boost::geometry::model::point<double, 2,
boost::geometry::cs::cartesian>, unsigned int>,
boost::geometry::index::quadratic<16, 4>,
boost::geometry::model::box<boost::geometry::model::point<double, 2,
boost::geometry::cs::cartesian> >,
boost::geometry::index::detail::rtree::node_variant_static_tag>,
boost::geometry::index::detail::rtree::node_variant_static_tag> >*>'
with no trivial copy-assignment; use copy-assignment or
copy-initialization instead [-Wclass-memaccess]

  D:/a/_temp/Library/BH/include/boost/geometry/index/detail/varray_detail.hpp:237:13:
warning: 'void* memcpy(void*, const void*, size_t)' writing to an
object of type 'struct std::pair<boost::geometry::model::point<double,
2, boost::geometry::cs::cartesian>, unsigned int>' with no trivial
copy-assignment; use copy-assignment or copy-initialization instead
[-Wclass-memaccess]

See 'D:/a/rtree/rtree/check/rtree.Rcheck/00install.out' for details.

And even more details if you download the artifacts of your build and
review that file. So it's a Boost thing, and there's probably nothing
you can do about it beyond talking to CRAN. There are packages on CRAN
with these warnings.
This is problably a false positive.
#
On 6 May 2021 at 10:45, Iñaki Ucar wrote:
| Hi Kent,
|
| On Wed, 5 May 2021 at 17:54, Kent Johnson <kjohnson at akoyabio.com> wrote:
| >
| > Hi,
| >
| > I am a maintainer of this package - https://github.com/akoyabio/rtree - originally inspired by this example - https://gallery.rcpp.org/articles/Rtree-examples/. This package wraps the rtree implementation from BH 1.7.2.0-3 to provide fast methods for finding points nearby to other points in large data sets.
| >
| >  I want to submit the package to CRAN but I have a CMD CHECK warning on Windows that I can't resolve.
| >
| > Running CMD CHECK from GitHub Actions, on Microsoft Windows Server 2019 10.0.17763, I get this error message:
| >
| > -- R CMD check results ---------------------------------------- rtree 0.2.0 ----
| > Duration: 1m 42.7s
| >
| > > checking whether package 'rtree' can be installed ... WARNING
| >   See below...
| >
| > 0 errors v | 1 warning x | 0 notes v
| > Error: Error: R CMD check found WARNINGs
| > Execution halted
| > Error: Process completed with exit code 1.
| >
| > The full output is here: https://github.com/akoyabio/rtree/runs/2502841486?check_suite_focus=true
| > The message says "See below..." but there is nothing below?
| 
| Below I see this:
| 
| * checking whether package 'rtree' can be installed ... WARNING
| Found the following significant warnings:
| 
|   D:/a/_temp/Library/BH/include/boost/geometry/index/detail/varray_detail.hpp:544:13:
| warning: 'void* memcpy(void*, const void*, size_t)' writing to an
| object of type 'struct std::pair<boost::geometry::model::point<double,
| 2, boost::geometry::cs::cartesian>, unsigned int>' with no trivial
| copy-assignment; use copy-assignment or copy-initialization instead
| [-Wclass-memaccess]
| 
|   D:/a/_temp/Library/BH/include/boost/geometry/index/detail/varray_detail.hpp:578:13:
| warning: 'void* memcpy(void*, const void*, size_t)' writing to an
| object of type 'struct std::pair<double,
| boost::variant<boost::geometry::index::detail::rtree::variant_leaf<std::pair<boost::geometry::model::point<double,
| 2, boost::geometry::cs::cartesian>, unsigned int>,
| boost::geometry::index::quadratic<16>,
| boost::geometry::model::box<boost::geometry::model::point<double, 2,
| boost::geometry::cs::cartesian> >,
| boost::geometry::index::detail::rtree::allocators<boost::container::new_allocator<std::pair<boost::geometry::model::point<double,
| 2, boost::geometry::cs::cartesian>, unsigned int> >,
| std::pair<boost::geometry::model::point<double, 2,
| boost::geometry::cs::cartesian>, unsigned int>,
| boost::geometry::index::quadratic<16>,
| boost::geometry::model::box<boost::geometry::model::point<double, 2,
| boost::geometry::cs::cartesian> >,
| boost::geometry::index::detail::rtree::node_variant_static_tag>,
| boost::geometry::index::detail::rtree::node_variant_static_tag>,
| boost::geometry::index::detail::rtree::variant_internal_node<std::pair<boost::geometry::model::point<double,
| 2, boost::geometry::cs::cartesian>, unsigned int>,
| boost::geometry::index::quadratic<16, 4>,
| boost::geometry::model::box<boost::geometry::model::point<double, 2,
| boost::geometry::cs::cartesian> >,
| boost::geometry::index::detail::rtree::allocators<boost::container::new_allocator<std::pair<boost::geometry::model::point<double,
| 2, boost::geometry::cs::cartesian>, unsigned int> >,
| std::pair<boost::geometry::model::point<double, 2,
| boost::geometry::cs::cartesian>, unsigned int>,
| boost::geometry::index::quadratic<16, 4>,
| boost::geometry::model::box<boost::geometry::model::point<double, 2,
| boost::geometry::cs::cartesian> >,
| boost::geometry::index::detail::rtree::node_variant_static_tag>,
| boost::geometry::index::detail::rtree::node_variant_static_tag> >*>'
| with no trivial copy-assignment; use copy-assignment or
| copy-initialization instead [-Wclass-memaccess]
| 
|   D:/a/_temp/Library/BH/include/boost/geometry/index/detail/varray_detail.hpp:237:13:
| warning: 'void* memcpy(void*, const void*, size_t)' writing to an
| object of type 'struct std::pair<boost::geometry::model::point<double,
| 2, boost::geometry::cs::cartesian>, unsigned int>' with no trivial
| copy-assignment; use copy-assignment or copy-initialization instead
| [-Wclass-memaccess]
| 
| See 'D:/a/rtree/rtree/check/rtree.Rcheck/00install.out' for details.
| 
| And even more details if you download the artifacts of your build and
| review that file. So it's a Boost thing, and there's probably nothing
| you can do about it beyond talking to CRAN. There are packages on CRAN
| with these warnings.

But for me it actually failed to build at
 - RHub
 - win-builder r-release
 - win-builder r-devel
when I submitted an unchanged tarball (with me as maintainer to get the result). 

So there may be more going on.  Could just be a setup issue which happens at
RHub and win-builder.  But Boost Geometry may be a more dicey part of Boost.

| > Running on my local Windows 10 PC I get this warning and a note:
| >
| > -- R CMD check results ---------------------------------------- rtree 0.2.0 ----
| > Duration: 1m 2.2s
| >
| > > checking whether package 'rtree' can be installed ... WARNING
| >   See below...
| >
| > > checking compiled code ... NOTE
| >   Note: information on .o files for x64 is not available
| >   File 'C:/Research/rtree.Rcheck/rtree/libs/x64/rtree.dll':
| >     Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)
| >     Found 'exit', possibly from 'exit' (C), 'stop' (Fortran)
| >     Found 'printf', possibly from 'printf' (C)
| 
| This is problably a false positive.

Maybe. Maybe not. It does not seem to reproduce on Linux.

Dirk
#
From: Dirk Eddelbuettel <edd at debian.org>
Sent: Thursday, May 6, 2021 8:42 AM
On 6 May 2021 at 10:45, Iñaki Ucar wrote:
| > The full output is here: https://github.com/akoyabio/rtree/runs/2502841486?check_suite_focus=true
| > The message says "See below..." but there is nothing below?
|
| Below I see this:
|
| * checking whether package 'rtree' can be installed ... WARNING
| Found the following significant warnings:
|
|   D:/a/_temp/Library/BH/include/boost/geometry/index/detail/varray_detail.hpp:544:13:
| warning: 'void* memcpy(void*, const void*, size_t)' writing to an
| object of type 'struct std::pair<boost::geometry::model::point<double,
| 2, boost::geometry::cs::cartesian>, unsigned int>' with no trivial
| copy-assignment; use copy-assignment or copy-initialization instead
| [-Wclass-memaccess]
|
| And even more details if you download the artifacts of your build and
| review that file. So it's a Boost thing, and there's probably nothing
| you can do about it beyond talking to CRAN. There are packages on CRAN
| with these warnings.

Thank you Iñaki for pointing me to the actual warning. With some digging I have found the cause but not the solution.

This warning is disabled via #pragma in boost/container/detail/copy_move_algo.hpp; the changeset (from Sept 2018) is here:
https://github.com/boostorg/container/commit/6504af87080ec0f5193e0cd623795dedc4a5d9c3

In the BH package, these #pragmas have been commented out here:
https://github.com/eddelbuettel/bh/commit/54182166369ef0ac1e7a58ef331afc02f1c5dd2c
which then causes my code to emit the warnings.

I'm not sure how to proceed. I can try submitting to CRAN with an explanation of the warnings. ISTM it would be better for {BH} to be submitted with the #pragmas in place; then there is just one fix and one exception, rather than the possibility of multiple packages having this issue. Dirk, do you have any recommendation?

But for me it actually failed to build at
 - RHub
 - win-builder r-release
 - win-builder r-devel
when I submitted an unchanged tarball (with me as maintainer to get the result).

When I submit to RHub and build on "Windows Server 2008 R2 SP1, R-release, 32/64 bit" I get the same errors as I see on GitHub and local builds. I did not try win-builder.

So there may be more going on.  Could just be a setup issue which happens at
RHub and win-builder.  But Boost Geometry may be a more dicey part of Boost.

I think the commented-out #pragmas explain these warnings.

| > Running on my local Windows 10 PC I get this warning and a note:
| >
| > -- R CMD check results ---------------------------------------- rtree 0.2.0 ----
| > Duration: 1m 2.2s
| >
| > > checking whether package 'rtree' can be installed ... WARNING
| >   See below...
| >
| > > checking compiled code ... NOTE
| >   Note: information on .o files for x64 is not available
| >   File 'C:/Research/rtree.Rcheck/rtree/libs/x64/rtree.dll':
| >     Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)
| >     Found 'exit', possibly from 'exit' (C), 'stop' (Fortran)
| >     Found 'printf', possibly from 'printf' (C)
|
| This is problably a false positive.

Maybe. Maybe not. It does not seem to reproduce on Linux.

I think this is a false positive, there are other reports of this on Stack Overflow.

Thank you both for your help, any suggestions on the best way to proceed are very welcome.

Kent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20210506/7aaa1ea9/attachment-0001.html>
#
On 6 May 2021 at 19:05, Kent Johnson wrote:
| I'm not sure how to proceed. I can try submitting to CRAN with an explanation of the warnings. ISTM it would be better for {BH} to be submitted with the #pragmas in place; then there is just one fix and one exception, rather than the possibility of multiple packages having this issue. Dirk, do you have any recommendation?

The #pragmas are deactivated because CRAN explicitly says so.
 
Dirk