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

MacOS: 'cl.h' file not found #616

Open
Olegt0rr opened this issue Jul 4, 2021 · 0 comments
Open

MacOS: 'cl.h' file not found #616

Olegt0rr opened this issue Jul 4, 2021 · 0 comments

Comments

@Olegt0rr
Copy link

Olegt0rr commented Jul 4, 2021

Got 'cl.h' file not found on trying to build OpenCL module on macOS

running build
running build_ext
Building modules...
building 'cpyrit._cpyrit_opencl' extension
cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -iwithsysroot /usr/local/libressl/include -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -I/System/Library/Frameworks/OpenCL.framework/Headers -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _cpyrit_opencl.c -o build/temp.macosx-11.4-x86_64-2.7/_cpyrit_opencl.o -Wall -fno-strict-aliasing -DVERSION="0.5.0"
_cpyrit_opencl.c:43:14: fatal error: 'cl.h' file not found
    #include <cl.h>
             ^~~~~~
1 error generated.
error: command 'cc' failed with exit status 1

Workaround

Edit _cpyrit_opencl.c
Replace #include <cl.h> with #include <OpenCL/cl.h>

Special thanks for stackoverflow answer

@Olegt0rr Olegt0rr changed the title 'cl.h' file not found MacOS: 'cl.h' file not found Jul 4, 2021
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

1 participant