-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
f2py bug on OpenBSD "'threads.h': file not found " #19437
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
The underlying issue is explained in Lines 573 to 581 in b32b72e
So, to resolve this issue, we'll need to refine the algorithm for defining F2PY_THREAD_LOCAL_DECL in the same file.
An option is to enable |
as far as I know, OpenBSD doesn't use glibc, so that's a totally different story. |
Sure (notice the A workaround would be to use |
We have
|
@thierry-FreeBSD - what's the state of affairs on FreeBSD here? It does have |
@dimpase Indeed, on FreeBSD it is located at |
The test above passes if I add
rather than |
I'm told there is a clang bug affecting OpenBSD:
|
I can reproduce this issue for numpy 1.21.4 on openbsd built using gfortran. What could be a resolution/workaround for this? |
There appears to be a related clang bug, not sure whether the fix for it
made it into OpenBSD.
…On Sat, 27 Nov 2021, 03:44 sandeep-gh, ***@***.***> wrote:
I can reproduce this issue for numpy 1.21.4 on openbsd built using
gfortran. What could be a resolution/workaround for this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19437 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJXYHHU2ZIF5EIQTKUS4NTUOBH3JANCNFSM5ABNTGDQ>
.
|
Closes rgommers/scipy#125 This is a follow-up of numpygh-18910 (included in 1.20.3 and 1.21.0), which looks incorrect. This fixes warnings like these when building SciPy with Mingw-w64: ``` [94/1557] Compiling C object scipy/linalg/_flapack.cp39-win_amd64.pyd.p/meson-generated_..__flapackmodule.c.obj In file included from C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\core\include/numpy/ndarraytypes.h:4, from C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\core\include/numpy/ndarrayobject.h:12, from C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\core\include/numpy/arrayobject.h:4, from C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\f2py\src/fortranobject.h:13, from scipy/linalg/_flapackmodule.c:16: scipy/linalg/_flapackmodule.c:1248:1: warning: 'thread' attribute directive ignored [-Wattributes] 1248 | static F2PY_THREAD_LOCAL_DECL cb_cselect_in_gees__user__routines_t *_active_cb_cselect_in_gees__user__routines = NULL; | ^~~~~~ scipy/linalg/_flapackmodule.c:1410:1: warning: 'thread' attribute directive ignored [-Wattributes] 1410 | static F2PY_THREAD_LOCAL_DECL cb_zselect_in_gees__user__routines_t *_active_cb_zselect_in_gees__user__routines = NULL; | ^~~~~~ scipy/linalg/_flapackmodule.c:1572:1: warning: 'thread' attribute directive ignored [-Wattributes] 1572 | static F2PY_THREAD_LOCAL_DECL cb_sselect_in_gees__user__routines_t *_active_cb_sselect_in_gees__user__routines = NULL; | ^~~~~~ scipy/linalg/_flapackmodule.c:1738:1: warning: 'thread' attribute directive ignored [-Wattributes] 1738 | static F2PY_THREAD_LOCAL_DECL cb_dselect_in_gees__user__routines_t *_active_cb_dselect_in_gees__user__routines = NULL; | ^~~~~~ ... ``` Also fixes numpygh-19437, where `__STDC_NO_THREADS__` should be defined but isn't (this seems to be more common, e.g. one can reports for ICC about this).
@dimpase see the PR linked just above this comment, I included your fix. That should be backported to 1.22.2, but not anymore to 1.21.x - you can define |
Closes rgommers/scipy#125 This is a follow-up of numpygh-18910 (included in 1.20.3 and 1.21.0), which looks incorrect. This fixes warnings like these when building SciPy with Mingw-w64: ``` [94/1557] Compiling C object scipy/linalg/_flapack.cp39-win_amd64.pyd.p/meson-generated_..__flapackmodule.c.obj In file included from C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\core\include/numpy/ndarraytypes.h:4, from C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\core\include/numpy/ndarrayobject.h:12, from C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\core\include/numpy/arrayobject.h:4, from C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\f2py\src/fortranobject.h:13, from scipy/linalg/_flapackmodule.c:16: scipy/linalg/_flapackmodule.c:1248:1: warning: 'thread' attribute directive ignored [-Wattributes] 1248 | static F2PY_THREAD_LOCAL_DECL cb_cselect_in_gees__user__routines_t *_active_cb_cselect_in_gees__user__routines = NULL; | ^~~~~~ scipy/linalg/_flapackmodule.c:1410:1: warning: 'thread' attribute directive ignored [-Wattributes] 1410 | static F2PY_THREAD_LOCAL_DECL cb_zselect_in_gees__user__routines_t *_active_cb_zselect_in_gees__user__routines = NULL; | ^~~~~~ scipy/linalg/_flapackmodule.c:1572:1: warning: 'thread' attribute directive ignored [-Wattributes] 1572 | static F2PY_THREAD_LOCAL_DECL cb_sselect_in_gees__user__routines_t *_active_cb_sselect_in_gees__user__routines = NULL; | ^~~~~~ scipy/linalg/_flapackmodule.c:1738:1: warning: 'thread' attribute directive ignored [-Wattributes] 1738 | static F2PY_THREAD_LOCAL_DECL cb_dselect_in_gees__user__routines_t *_active_cb_dselect_in_gees__user__routines = NULL; | ^~~~~~ ... ``` Also fixes numpygh-19437, where `__STDC_NO_THREADS__` should be defined but isn't (this seems to be more common, e.g. one can reports for ICC about this).
Closes rgommers/scipy#125 This is a follow-up of numpygh-18910 (included in 1.20.3 and 1.21.0), which looks incorrect. This fixes warnings like these when building SciPy with Mingw-w64: ``` [94/1557] Compiling C object scipy/linalg/_flapack.cp39-win_amd64.pyd.p/meson-generated_..__flapackmodule.c.obj In file included from C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\core\include/numpy/ndarraytypes.h:4, from C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\core\include/numpy/ndarrayobject.h:12, from C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\core\include/numpy/arrayobject.h:4, from C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\numpy\f2py\src/fortranobject.h:13, from scipy/linalg/_flapackmodule.c:16: scipy/linalg/_flapackmodule.c:1248:1: warning: 'thread' attribute directive ignored [-Wattributes] 1248 | static F2PY_THREAD_LOCAL_DECL cb_cselect_in_gees__user__routines_t *_active_cb_cselect_in_gees__user__routines = NULL; | ^~~~~~ scipy/linalg/_flapackmodule.c:1410:1: warning: 'thread' attribute directive ignored [-Wattributes] 1410 | static F2PY_THREAD_LOCAL_DECL cb_zselect_in_gees__user__routines_t *_active_cb_zselect_in_gees__user__routines = NULL; | ^~~~~~ scipy/linalg/_flapackmodule.c:1572:1: warning: 'thread' attribute directive ignored [-Wattributes] 1572 | static F2PY_THREAD_LOCAL_DECL cb_sselect_in_gees__user__routines_t *_active_cb_sselect_in_gees__user__routines = NULL; | ^~~~~~ scipy/linalg/_flapackmodule.c:1738:1: warning: 'thread' attribute directive ignored [-Wattributes] 1738 | static F2PY_THREAD_LOCAL_DECL cb_dselect_in_gees__user__routines_t *_active_cb_dselect_in_gees__user__routines = NULL; | ^~~~~~ ... ``` Also fixes numpygh-19437, where `__STDC_NO_THREADS__` should be defined but isn't (this seems to be more common, e.g. one can reports for ICC about this).
OK, I can confirm all is good on OpenBSD 7.2 and numpy 1.23, thanks again. |
MacOS may not have |
Reproducing:
Build NumPy 1.20.3 on OpenBSD using its usual compiler, clang 10.0.1, and (e)gfortran.
The resulting NumPy's f2py is buggy. It fails the test in #18179, and also builds of SciPy using it are
broken, see scipy/scipy#14364
Error message:
here is Python3 and numpy used/built:
which, while running
give
full log:
C compiler info:
__STDC_NO_THREADS__
is undefined and there is no header:The text was updated successfully, but these errors were encountered: