-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
BUG: Cannot build main on MacOS M1 #24450
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
Comments
Have you tried using Could you provide the Meson log? You can find it at |
Yes, sorry for not clarifying this. Absolutely fresh setup, starting with git/git clone has the same problem.
Sure, let me know if I missed something that could help |
The configuration stage appears to be correct, and the auto-generated file is not empty and well-defined. However, an empty inclusion has somehow been included within the following code section: numpy/numpy/core/src/umath/_umath_tests.dispatch.c Lines 14 to 18 in f884cf6
To address this issue, it's suggested that you apply the following patch to explicitly define the generated config macros and rebuild the code to determine if the build process passes: diff --git a/numpy/core/src/umath/_umath_tests.dispatch.c b/numpy/core/src/umath/_umath_tests.dispatch.c
index 9d8df4c86..73a11a16d 100644
--- a/numpy/core/src/umath/_umath_tests.dispatch.c
+++ b/numpy/core/src/umath/_umath_tests.dispatch.c
@@ -13,6 +13,17 @@
#ifndef NPY_DISABLE_OPTIMIZATION
#include "_umath_tests.dispatch.h"
+ /* Autogenerated by the Meson features module. */
+ /* Do not edit, your changes will be lost. */
+ #undef NPY__MTARGETS_EXPAND
+ #define NPY__MTARGETS_EXPAND(X) X
+
+ #undef NPY_MTARGETS_CONF_BASELINE
+ #define NPY_MTARGETS_CONF_BASELINE(EXEC_CB, ...) NPY__MTARGETS_EXPAND(EXEC_CB(__VA_ARGS__))
+
+ #undef NPY_MTARGETS_CONF_DISPATCH
+ #define NPY_MTARGETS_CONF_DISPATCH(TEST_CB, EXEC_CB, ...) \
+ NPY__MTARGETS_EXPAND(EXEC_CB((TEST_CB(ASIMD)&&TEST_CB(ASIMDHP)), ASIMDHP, __VA_ARGS__))
#endif
NPY_CPU_DISPATCH_DECLARE(const char *_umath_tests_dispatch_func, (void)) However, before applying the patch, it would be helpful to provide the complete build log to gain better insights into the issue. You can generate the build log using the following command:
Then please attach the or maybe not empty header but likely the disutils configuration header been generated in place through the command:
so please make sure of cleaning the directory before using spin build through:
|
Yes, this seems to be the issue. |
Just in case, these are the files that were removed by
|
@stefanv is there a way to pass a list of files to extend |
@code-of-kpp Thank you for your assistance in investigating this bug. I've updated the reproducer code within the pull request description and have also opened a pull request that fixes this issue (#24468). @mattip, It seems the easiest fix is to ensures that distutils generates these headers in the build directory, even with the inplace option enabled |
We don't have such a command, and I don't think we should add it. It's going to be inherently unreliable just like |
Thank you all! A couple of notes (and feel free to let me know, if they deserve an issue on their own):
|
Describe the issue:
Most likely related to 4ec0182 by @seiko2plus and gh-23096.
Fresh install, git clone, submodules update
dependencies installed via
pip install -r
(I installed all the files, but when just build dependencies installed, the situation is the same).I'm building with openblass installed from homebrew, and I do:
export PKG_CONFIG_PATH=/opt/homebrew/Cellar/openblas/0.3.23/lib/pkgconfig/
for it to get detected.
I tried to build with clang 16.0.6 from brew and 14.0.3 (coming with MacOs).
spin build
fails.Reproduce the code example:
Edit(Sayed): You have to build numpy using distutils with the in-place option enabled, followed by
spin build --clean
.Error message:
Runtime information:
Context for the issue:
I was working on
numpy
sprint at EuroSciPy and couldn't finish the setup./cc @seberg
The text was updated successfully, but these errors were encountered: