JPaulMora / Pyrit

The famous WPA precomputed cracker, Migrated from Google.
GNU General Public License v3.0
1.04k stars 271 forks source link

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

Open Olegt0rr opened 3 years ago

Olegt0rr commented 3 years ago

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