Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

BLD: add missing include #27959

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

Merged
merged 1 commit into from
Dec 10, 2024
Merged

Conversation

charris
Copy link
Member

@charris charris commented Dec 9, 2024

Backport of #27956.

This is required to build with the main and 3.13 branches of CPython when built with freethredaing enabled.

Without this I am seeing failures like

FAILED: numpy/_core/_multiarray_tests.cpython-313t-x86_64-linux-gnu.so.p/src_common_npy_hashtable.cpp.o
ccache c++ -Inumpy/_core/_multiarray_tests.cpython-313t-x86_64-linux-gnu.so.p -Inumpy/_core -I../numpy/_core -I../numpy/_core/src/multiarray -I../numpy/_core/src/npymath -Inumpy/_core/include -I../numpy/_core/include -I../numpy/_core/src/common -I/home/tcaswell/.pybuild/cp3131t/include/python3.13t -I/tmp/build-via-sdist-wsekxulh/numpy-2.3.0.dev0/.mesonpy-evozizae/meson_cpu -fvisibility=default -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++17 -O3 -msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -maes -mpclmul -mbmi -mbmi2 -DNPY_HAVE_SSE2 -DNPY_HAVE_SSE -DNPY_HAVE_SSE3 -DNPY_HAVE_SSSE3 -DNPY_HAVE_SSE41 -DNPY_HAVE_POPCNT -DNPY_HAVE_SSE42 -DNPY_HAVE_AVX -DNPY_HAVE_F16C -DNPY_HAVE_FMA3 -DNPY_HAVE_AVX2 -fpermissive -fPIC -MD -MQ numpy/_core/_multiarray_tests.cpython-313t-x86_64-linux-gnu.so.p/src_common_npy_hashtable.cpp.o -MF numpy/_core/_multiarray_tests.cpython-313t-x86_64-linux-gnu.so.p/src_common_npy_hashtable.cpp.o.d -o numpy/_core/_multiarray_tests.cpython-313t-x86_64-linux-gnu.so.p/src_common_npy_hashtable.cpp.o -c ../numpy/_core/src/common/npy_hashtable.cpp
../numpy/_core/src/common/npy_hashtable.cpp: In function ‘PyArrayIdentityHash* PyArrayIdentityHash_New(int)’:
../numpy/_core/src/common/npy_hashtable.cpp:114:27: error: ‘nothrow’ is not a member of ‘std’
  114 |     res->mutex = new(std::nothrow) std::shared_mutex();
      |                           ^~~~~~~
../numpy/_core/src/common/npy_hashtable.cpp:20:1: note: ‘std::nothrow’ is defined in header ‘<new>’; this is probably fixable by adding ‘#include <new>’
   19 | #include "npy_hashtable.h"
  +++ |+#include <new>
   20 |

when building with freethreading with gcc (GCC) 14.2.1 20240910. I see this on main, 3.13, and with v3.13.1 so I'm pretty sure this is not a CPython change. I did not bisect back on numpy to see if this is a recent change in numpy or due to gcc getting upgraded locally.

I will admit to not fully understanding this change, but I did what the compiler said to do and it built....

This is required to build with the main and 3.13 branches of CPython when built with freethredaing enabled.

This is required to build with the main and 3.13 branches of CPython when built
with freethredaing enabled.
@charris charris added 08 - Backport Used to tag backport PRs 36 - Build Build related PR labels Dec 9, 2024
@charris charris added this to the 2.2.1 release milestone Dec 9, 2024
@charris charris merged commit de6597f into numpy:maintenance/2.2.x Dec 10, 2024
68 checks passed
@charris charris deleted the backport-27956 branch December 10, 2024 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
08 - Backport Used to tag backport PRs 36 - Build Build related PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.