bkerler / opencl_brute

MD5,SHA1,SHA256,SHA512,HMAC,PBKDF2,SCrypt Bruteforcing tools using OpenCL (GPU, yay!) and Python
MIT License
163 stars 44 forks source link

error #19

Open Noname400 opened 2 years ago

Noname400 commented 2 years ago

PS D:\Downloads\opencl_brute-master (1)\opencl_brute-master> python .\test.py 1 Using salt: b'salty123' Testing md5 .. Traceback (most recent call last): File "D:\Downloads\opencl_brute-master (1)\opencl_brute-master\test.py", line 370, in main(sys.argv) File "D:\Downloads\opencl_brute-master (1)\opencl_brute-master\test.py", line 324, in main md5_test(opencl_algos, passwordlist) File "D:\Downloads\opencl_brute-master (1)\opencl_brute-master\test.py", line 54, in md5_test ctx = opencl_algo.cl_md5_init() File "D:\Downloads\opencl_brute-master (1)\opencl_brute-master\Library\opencl.py", line 638, in cl_md5_init prg = self.opencl_ctx.compile(bufStructs, 'md5.cl', option) File "D:\Downloads\opencl_brute-master (1)\opencl_brute-master\Library\opencl.py", line 155, in compile prg = cl.Program(self.ctx, src).build() File "C:\Python39\lib\site-packages\pyopencl__init.py", line 536, in build self._prg, was_cached = self._build_and_catch_errors( File "C:\Python39\lib\site-packages\pyopencl\init__.py", line 584, in _build_and_catch_errors raise err pyopencl._cl.RuntimeError: clBuildProgram failed: BUILD_PROGRAM_FAILURE - clBuildProgram failed: BUILD_PROGRAM_FAILURE - clBuildProgram failed: BUILD_PROGRAM_FAILURE

Build on <pyopencl.Device 'AMD Athlon(tm) X4 840 Quad Core Processor' on 'Intel(R) CPU Runtime for OpenCL(TM) Applications' at 0x1d550997f70>:

Compilation started 1:128:5: error: implicit declaration of function 'mod' is invalid in OpenCL def_printFromWord(private, printFromWord, "") ^ 1:116:22: note: expanded from macro 'def_printFromWord' word r = mod(j,wordSize) * 8; \ ^ 1:129:5: warning: use of out-of-scope declaration of 'mod' def_printFromWord(global, printFromWord_glbl, "") ^ 1:116:22: note: expanded from macro 'def_printFromWord' word r = mod(j,wordSize) 8; \ ^ 1:128:5: note: previous declaration is here def_printFromWord(__private, printFromWord, "") ^ 1:116:22: note: expanded from macro 'def_printFromWord' word r = mod(j,wordSize) 8; \ ^ 1:130:5: warning: use of out-of-scope declaration of 'mod' def_printFromWord(__private, printFromWord_n, "\n") ^ 1:116:22: note: expanded from macro 'def_printFromWord' word r = mod(j,wordSize) 8; \ ^ 1:128:5: note: previous declaration is here def_printFromWord(__private, printFromWord, "") ^ 1:116:22: note: expanded from macro 'def_printFromWord' word r = mod(j,wordSize) 8; \ ^ 1:131:5: warning: use of out-of-scope declaration of 'mod' def_printFromWord(global, printFromWord_glbl_n, "\n") ^ 1:116:22: note: expanded from macro 'def_printFromWord' word r = mod(j,wordSize) * 8; \ ^ 1:128:5: note: previous declaration is here def_printFromWord(private, printFromWord, "") ^ 1:116:22: note: expanded from macro 'def_printFromWord' word r = mod(j,wordSize) * 8; \ ^ Compilation failed

(options: -I C:\Python39\lib\site-packages\pyopencl\cl) (source saved as C:\Users\Work\AppData\Local\Temp\tmp38il0rcl.cl) PS D:\Downloads\opencl_brute-master (1)\opencl_brute-master>

nekrondev commented 2 years ago

Just disable ##debug define in structs and you are fine (had the same issue on Intel HD OpenCL compiler).