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

Bitcracker OpenCL Loads of errors on build #46

Open
Elmo299 opened this issue Mar 6, 2022 · 1 comment
Open

Bitcracker OpenCL Loads of errors on build #46

Elmo299 opened this issue Mar 6, 2022 · 1 comment

Comments

@Elmo299
Copy link

Elmo299 commented Mar 6, 2022

I have spend the last 8 days trying to build Bitcracker OpenCL, used different platforms with all the same results...

First, I am not a coder...

The first errors where in the Utils.c file, compared it with the Utils.c from src_Cuda and filled up the missing lines. So it now jumps to Main.c and gives coding errors, compared to Cuda Main, but unclear to me what it means...

====== Build BitCracker OpenCL version ======
rm -rf .o
rm -rf bitcracker_opencl
gcc -I/usr/include -L/usr/lib64 -L/usr/lib -I/opt/intel/oneapi/lib/include -L/opt/intel/oneapi/lib/intel64 -lOpenCL -O3 -Wextra -o bitcracker_opencl main.c opencl_attack.c utils.c w_blocks.c -lOpenCL
In file included from /usr/include/CL/cl.h:20,
from bitcracker.h:37,
from main.c:22:
/usr/include/CL/cl_version.h:22:9: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
| ^~~~~~~
main.c: In function ‘checkDeviceStatistics’:
main.c:101:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘cl_uint’ {aka ‘unsigned int’} [-Wsign-compare]
101 | for (i = 0; i < platformCount; i++)
| ^
main.c:110:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘cl_uint’ {aka ‘unsigned int’} [-Wsign-compare]
110 | for (j = 0; j < deviceCount; j++)
| ^
main.c: In function ‘createClCtx’:
main.c:261:9: warning: ‘clCreateCommandQueue’ is deprecated [-Wdeprecated-declarations]
261 | cqCommandQueue = clCreateCommandQueue(cxGPUContext, cdDevices[gpu_id], 0, &clErr);
| ^~~~~~~~~~~~~~
In file included from bitcracker.h:37,
from main.c:22:
/usr/include/CL/cl.h:1906:1: note: declared here
1906 | clCreateCommandQueue(cl_context context,
| ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/CL/cl.h:20,
from bitcracker.h:37,
from opencl_attack.c:22:
/usr/include/CL/cl_version.h:22:9: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
| ^~~~~~~
opencl_attack.c: In function ‘opencl_attack’:
opencl_attack.c:278:18: warning: ‘d_macIV’ may be used uninitialized in this function [-Wmaybe-uninitialized]
278 | ciErr1 = clEnqueueWriteBuffer(cqCommandQueue, d_macIV, CL_TRUE, 0, IV_SIZE
sizeof(char), macIV, 0, NULL, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
opencl_attack.c:281:18: warning: ‘d_computeMacIV’ may be used uninitialized in this function [-Wmaybe-uninitialized]
281 | ciErr1 = clEnqueueWriteBuffer(cqCommandQueue, d_computeMacIV, CL_TRUE, 0, IV_SIZE*sizeof(char), computeMacIV, 0, NULL, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/CL/cl.h:20,
from bitcracker.h:37,
from utils.c:22:
/usr/include/CL/cl_version.h:22:9: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
| ^~~~~~~
utils.c: In function ‘parse_data’:
utils.c:208:17: warning: ‘fphash’ may be used uninitialized in this function [-Wmaybe-uninitialized]
208 | fclose(fphash);
| ^~~~~~~~~~~~~~
In file included from /usr/include/CL/cl.h:20,
from bitcracker.h:37,
from w_blocks.c:22:
/usr/include/CL/cl_version.h:22:9: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
| ^~~~~~~
w_blocks.c: In function ‘w_block_precomputed’:
w_blocks.c:160:28: warning: ‘ckKernelWBlocks’ may be used uninitialized in this function [-Wmaybe-uninitialized]
160 | if(ckKernelWBlocks)clReleaseKernel(ckKernelWBlocks);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
w_blocks.c:161:18: warning: ‘cpProgram’ may be used uninitialized in this function [-Wmaybe-uninitialized]
161 | if(cpProgram)clReleaseProgram(cpProgram);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: warning: libsvml.so, needed by /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libOpenCL.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libirng.so, needed by /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libOpenCL.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libimf.so, needed by /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libOpenCL.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libintlc.so.5, needed by /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libOpenCL.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libOpenCL.so: undefined reference to `_intel_fast_memset'
collect2: error: ld returned 1 exit status
make: *** [Makefile:9: all] Error 1

@RyanP7577
Copy link

Remove the brace on the end of line 186 of utils.c. It will compile with warnings but no errors.

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

2 participants