Skip to content

Fedora 42: Compile error: Boost: PyArray_Descr has no member named ‘elsize’ #409

@radon-at-beeper

Description

@radon-at-beeper

The following error occurs when compiling on Fedora 42:

libs/python/src/numpy/dtype.cpp: In member function ‘int boost::python::numpy::dtype::get_itemsize() const’:
libs/python/src/numpy/dtype.cpp:101:83: error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘elsize’
  101 | int dtype::get_itemsize() const { return reinterpret_cast<PyArray_Descr*>(ptr())->elsize;}
      |                                                                                   ^~~~~~

The compilation command line is:

./build/fbcode_builder/getdeps.py build mvfst --verbose

Adding the --allow-system-packages argument makes no difference to the error that is reported, even if the boost-devel package is installed system-wide.

Notably: https://github.com/boostorg/boost version 1.89.0 compiles perfectly fine on the same system, using the same command-line options that are displayed in the log. However, version 1.83.0, which seems to be the specific version wanted by mvfst, does not compile, and exhibits the same error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions