Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation failure using numpy 2.0.0b1 #431

Closed
duburcqa opened this issue Mar 15, 2024 · 8 comments
Closed

Compilation failure using numpy 2.0.0b1 #431

duburcqa opened this issue Mar 15, 2024 · 8 comments

Comments

@duburcqa
Copy link
Contributor

I tried to compile Boost::Python 1.84 library against numpy==2.0.0b1, but I'm getting a compilation error:

libs/python/src/numpy/dtype.cpp:101:83: error: no member named 'elsize' in '_PyArray_Descr'
int dtype::get_itemsize() const { return reinterpret_cast<PyArray_Descr*>(ptr())->elsize;}
@duburcqa
Copy link
Contributor Author

duburcqa commented Mar 15, 2024

See related part of numpy documentation: https://numpy.org/devdocs/release/2.0.0-notes.html#descriptor-elsize-and-alignment-access

The new accessor PyDataType_ELSIZE must be used: PyDataType_ELSIZE(reinterpret_cast<PyArray_Descr*>(ptr()))

@jakirkham
Copy link
Contributor

Was this fixed with PR ( #432 )?

@duburcqa
Copy link
Contributor Author

duburcqa commented May 7, 2024

Yes. Closing.

@duburcqa duburcqa closed this as completed May 7, 2024
@jakirkham
Copy link
Contributor

Thanks Alexis! 🙏

buddly27 added a commit to python-cmake/pytest-cmake that referenced this issue Aug 1, 2024
- Upgrade Boost action to use Conan V2 and Boost 1.85;
- Lock Numpy to V1 due to compatibility issues with Boost when
  using Numpy V2 (boostorg/python#431);
- Default example to C++ STD 17 to prevent compilation errors on macOS.
buddly27 added a commit to python-cmake/pytest-cmake that referenced this issue Aug 1, 2024
- Upgrade Boost action to use Conan V2 and Boost 1.85;
- Lock Numpy to V1 due to compatibility issues with Boost when
  using Numpy V2 (boostorg/python#431);
- Default example to C++ STD 17 to prevent compilation errors on macOS.
dennisklein added a commit to dennisklein/FairSoft that referenced this issue Aug 15, 2024
dennisklein added a commit to dennisklein/FairSoft that referenced this issue Aug 15, 2024
dennisklein added a commit to FairRootGroup/FairSoft that referenced this issue Aug 16, 2024
dennisklein added a commit to FairRootGroup/FairSoft that referenced this issue Aug 16, 2024
dennisklein added a commit to FairRootGroup/FairSoft that referenced this issue Aug 16, 2024
@jakobandersen
Copy link

While fixed now, it doesn't seem possible to build any prior Boost release if NumPy 2.x is installed. Is it possible to disable just the NumPy part when building via the central b2?

@jakirkham
Copy link
Contributor

Boost 1.86.0 got released just a few days ago. Did this not make it in there?

@jakobandersen
Copy link

Boost 1.86.0 got released just a few days ago. Did this not make it in there?

It doesn't look like it :-(

@jakirkham
Copy link
Contributor

@stefanseefeld what do we need to do to get this in the next Boost release? Is 1.86.1 an option?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants