Skip to content

[R] Link-time optimization reports violations of one-definition rule in the R package #33701

@paleolimbot

Description

@paleolimbot

Describe the bug, including details regarding any error messages, version, and platform.

The warning:

* checking whether package ‘arrow’ can be installed ... [18m/17m] WARNING
Found the following significant warnings:
  /arrow/cpp/src/arrow/type.h:323: warning: virtual table of type ‘struct NestedType’ violates one definition rule [-Wodr]
  /arrow/cpp/src/arrow/type.h:288: warning: virtual table of type ‘struct FixedWidthType’ violates one definition rule [-Wodr]
See ‘/arrow/r/check/arrow.Rcheck/00install.out’ for details.

‘/arrow/r/check/arrow.Rcheck/00install.out’ (for details): https://dev.azure.com/ursacomputing/crossbow/_build/results?buildId=42712&view=logs&j=0da5d1d9-276d-5173-c4c4-9d4d4ed14fdb&t=6c939d89-0d1a-51f2-8b30-091a7a82e98c&l=1591

/arrow/cpp/src/arrow/type.h:323: warning: virtual table of type ‘struct NestedType’ violates one definition rule [-Wodr]
  323 | class ARROW_EXPORT NestedType : public DataType, public ParametricType {
      | 
/arrow/r/check/arrow.Rcheck/00_pkg_src/arrow/libarrow/arrow-10.0.1.9000/include/arrow/type.h:323:20: note: the conflicting type defined in another translation unit
  323 | class ARROW_EXPORT NestedType : public DataType, public ParametricType {
      |                    ^
/arrow/r/check/arrow.Rcheck/00_pkg_src/arrow/libarrow/arrow-10.0.1.9000/include/arrow/type.h:177:22: note: virtual method ‘storage_id’
  177 |   virtual Type::type storage_id() const { return id_; }
      |                      ^
<built-in>: note: ought to match virtual method ‘__cxa_pure_virtual’ but does not
/arrow/cpp/src/arrow/type.h:288: warning: virtual table of type ‘struct FixedWidthType’ violates one definition rule [-Wodr]
  288 | class ARROW_EXPORT FixedWidthType : public DataType {
      | 
/arrow/r/check/arrow.Rcheck/00_pkg_src/arrow/libarrow/arrow-10.0.1.9000/include/arrow/type.h:288:20: note: the conflicting type defined in another translation unit
  288 | class ARROW_EXPORT FixedWidthType : public DataType {
      |                    ^
/arrow/r/check/arrow.Rcheck/00_pkg_src/arrow/libarrow/arrow-10.0.1.9000/include/arrow/type.h:177:22: note: virtual method ‘storage_id’
  177 |   virtual Type::type storage_id() const { return id_; }
      |                      ^
<built-in>: note: ought to match virtual method ‘__cxa_pure_virtual’ but does not

I think this is an R package problem...somehow we are mixing up the includes or the linking in such a way that we're picking up includes outside of the package directory (which we really don't want in case there's a user install of Arrow that's a different version!).

Component(s)

R

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions