-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
BLD: Add missing <vector> #29704
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
base: main
Are you sure you want to change the base?
BLD: Add missing <vector> #29704
Conversation
This is required for the vendored-meson build on MacOS
@@ -9,6 +9,7 @@ | |||
#include <functional> | |||
#include <unordered_map> | |||
#include <unordered_set> | |||
#include <vector> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spin build -j 12
builds just fine for me locally on ARM Mac on latest main
with Python 3.12
. Can you provide a bit more information on your reproducible build failure on Mac? Your ticket/issue is a bit hard for me to parse--I do see a bleeding edge 3.15.0a0
version of CPython there--is that the key to reproducing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps the python version is relevant, but with 3.12 I get a similar error.
06:14:33-0600[numpy@main]38208$ python vendored-meson/meson/meson.py compile -C build3.12 INFO: autodetecting backend as ninja INFO: calculating backend command to run: /Users/wrp/x86_64/Darwin/bin/ninja -C /Users/wrp/github/numpy/numpy/build3.12 ninja: Entering directory
/Users/wrp/github/numpy/numpy/build3.12'
[223/523] Compiling C object numpy/_core/libloops_exponent_log.dispatch.h_AVX2.a.p/meson-generated_loops_exponent_log.dispatch.c.o
../numpy/_core/src/umath/loops_exponent_log.dispatch.c.src:51:1: warning: unused function 'fma_get_full_load_mask_pd' [-Wunused-function]
fma_get_full_load_mask_pd(void)
^
../numpy/_core/src/umath/loops_exponent_log.dispatch.c.src:66:1: warning: unused function 'fma_get_partial_load_mask_pd' [-Wunused-function]
fma_get_partial_load_mask_pd(const npy_int num_elem, const npy_int num_lanes)
^
../numpy/_core/src/umath/loops_exponent_log.dispatch.c.src:83:1: warning: unused function 'fma_masked_gather_pd' [-Wunused-function]
fma_masked_gather_pd(__m256d src,
^
../numpy/_core/src/umath/loops_exponent_log.dispatch.c.src:98:1: warning: unused function 'fma_masked_load_pd' [-Wunused-function]
fma_masked_load_pd(__m256i mask, npy_double* addr)
^
../numpy/_core/src/umath/loops_exponent_log.dispatch.c.src:110:1: warning: unused function 'fma_set_masked_lanes_pd' [-Wunused-function]
fma_set_masked_lanes_pd(__m256d x, __m256d val, __m256d mask)
^
5 warnings generated.
[268/523] Compiling C++ object numpy/_core/libunique_hash.a.p/src_multiarray_unique.cpp.o
FAILED: [code=1] numpy/_core/libunique_hash.a.p/src_multiarray_unique.cpp.o
c++ -Inumpy/_core/libunique_hash.a.p -Inumpy/_core -I../numpy/_core -Inumpy/_core/include -I../numpy/_core/include -I../numpy/_core/src/common -I/Users/wrp/.local/share/uv/python/cpython-3.12.9-macos-x86_64-none/lib/pkgconfig/../../include/python3.12 -I/Users/wrp/github/numpy/numpy/build3.12/meson_cpu -fdiagnostics-color=always -Wall -Winvalid-pch -std=c++17 -O2 -g -ftrapping-math -DNPY_HAVE_CLANG_FPSTRICT -msse -msse2 -msse3 -DNPY_HAVE_SSE2 -DNPY_HAVE_SSE -DNPY_HAVE_SSE3 -DNPY_INTERNAL_BUILD -DHAVE_NPY_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -fexceptions -fno-rtti -MD -MQ numpy/_core/libunique_hash.a.p/src_multiarray_unique.cpp.o -MF numpy/_core/libunique_hash.a.p/src_multiarray_unique.cpp.o.d -o numpy/_core/libunique_hash.a.p/src_multiarray_unique.cpp.o -c ../numpy/_core/src/multiarray/unique.cpp
../numpy/_core/src/multiarray/unique.cpp:243:36: error: implicit instantiation of undefined template 'std::vector<npy_unpacked_static_string>'
std::vector<npy_static_string> unpacked_strings(isize, {0, NULL});
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/iosfwd:248:28: note: template is declared here
class _LIBCPP_TEMPLATE_VIS vector;
^
1 error generated.
[273/523] Compiling C object numpy/_core/libloops_autovec.dispatch.h_AVX2.a.p/meson-generated_loops_autovec.dispatch.c.o
ninja: build stopped: subcommand failed.
06:17:36-0600[numpy@main]38208$ python --version
Python 3.12.9`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of the python version, it's more likely related to clang, which is from llvm-project@87f0227cb60147a26a1eeb4fb06e3b505e9c7261. I'll try to find time to play around and narrow down the issue.
I'm able to build NumPy with homebrew's clang if I set CC/CXX appropriately. |
#29703
Build is failing on macos: