fireice-uk / xmr-stak

Free Monero RandomX Miner and unified CryptoNight miner
GNU General Public License v3.0
4.05k stars 1.79k forks source link

cmake finds OpenCL 1.1 but there is 1.2 available #566

Closed Kosturek closed 6 years ago

Kosturek commented 6 years ago

xmr@koparka_02 /home/xmr/xmr-stak-master/build $ cmake -DCUDA_ENABLE=OFF -DMICROHTTPD_ENABLE=OFF -DHWLOC_ENABLE=OFF .. -- The C compiler identification is GNU 6.4.0 -- The CXX compiler identification is GNU 6.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Set miner currency to 'monero' and 'aeon' -- Looking for CL_VERSION_2_0 -- Looking for CL_VERSION_2_0 - not found -- Looking for CL_VERSION_1_2 -- Looking for CL_VERSION_1_2 - not found -- Looking for CL_VERSION_1_1 -- Looking for CL_VERSION_1_1 - found -- Found OpenCL: /usr/lib/libOpenCL.so (found version "1.1") -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE
-- Found OpenSSL: /usr/lib64/libcrypto.so (found version "1.0.2n") -- Configuring done -- Generating done -- Build files have been written to: /home/xmr/xmr-stak-master/build xmr@koparka_02 /home/xmr/xmr-stak-master/build $ make install Scanning dependencies of target xmr-stak-c [ 3%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_blake256.c.o [ 6%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_groestl.c.o [ 10%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_jh.c.o [ 13%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_keccak.c.o [ 17%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_skein.c.o [ 20%] Linking C static library bin/libxmr-stak-c.a [ 20%] Built target xmr-stak-c Scanning dependencies of target xmr-stak-backend [ 24%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/jconf.cpp.o [ 27%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/version.cpp.o [ 31%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/hwlocMemory.cpp.o [ 34%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/jconf.cpp.o [ 37%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/minethd.cpp.o [ 41%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/backendConnector.cpp.o [ 44%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/globalStates.cpp.o [ 48%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cryptonight_common.cpp.o [ 51%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/http/httpd.cpp.o [ 55%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/http/webdesign.cpp.o [ 58%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/console.cpp.o [ 62%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/executor.cpp.o [ 65%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/telemetry.cpp.o [ 68%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/utility.cpp.o [ 72%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/net/jpsock.cpp.o [ 75%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/net/socket.cpp.o [ 79%] Linking CXX static library bin/libxmr-stak-backend.a [ 79%] Built target xmr-stak-backend Scanning dependencies of target xmrstak_opencl_backend [ 82%] Building CXX object CMakeFiles/xmrstak_opencl_backend.dir/xmrstak/backend/amd/amd_gpu/gpu.cpp.o /home/xmr/xmr-stak-master/xmrstak/backend/amd/amd_gpu/gpu.cpp: In function ‘const char* err_to_str(cl_int)’: /home/xmr/xmr-stak-master/xmrstak/backend/amd/amd_gpu/gpu.cpp:87:7: error: ‘CL_COMPILE_PROGRAM_FAILURE’ was not declared in this scope case CL_COMPILE_PROGRAM_FAILURE: ^~~~~~ /home/xmr/xmr-stak-master/xmrstak/backend/amd/amd_gpu/gpu.cpp:89:7: error: ‘CL_LINKER_NOT_AVAILABLE’ was not declared in this scope case CL_LINKER_NOT_AVAILABLE: ^~~~~~~ /home/xmr/xmr-stak-master/xmrstak/backend/amd/amd_gpu/gpu.cpp:91:7: error: ‘CL_LINK_PROGRAM_FAILURE’ was not declared in this scope case CL_LINK_PROGRAM_FAILURE: ^~~~~~~ /home/xmr/xmr-stak-master/xmrstak/backend/amd/amd_gpu/gpu.cpp:93:7: error: ‘CL_DEVICE_PARTITION_FAILED’ was not declared in this scope case CL_DEVICE_PARTITION_FAILED: ^~~~~~ /home/xmr/xmr-stak-master/xmrstak/backend/amd/amd_gpu/gpu.cpp:95:7: error: ‘CL_KERNEL_ARG_INFO_NOT_AVAILABLE’ was not declared in this scope case CL_KERNEL_ARG_INFO_NOT_AVAILABLE: ^~~~~~~~ /home/xmr/xmr-stak-master/xmrstak/backend/amd/amd_gpu/gpu.cpp:167:7: error: ‘CL_INVALID_IMAGE_DESCRIPTOR’ was not declared in this scope case CL_INVALID_IMAGE_DESCRIPTOR: ^~~~~~~ /home/xmr/xmr-stak-master/xmrstak/backend/amd/amd_gpu/gpu.cpp:169:7: error: ‘CL_INVALID_COMPILER_OPTIONS’ was not declared in this scope case CL_INVALID_COMPILER_OPTIONS: ^~~~~~~ /home/xmr/xmr-stak-master/xmrstak/backend/amd/amd_gpu/gpu.cpp:171:7: error: ‘CL_INVALID_LINKER_OPTIONS’ was not declared in this scope case CL_INVALID_LINKER_OPTIONS: ^~~~~~~~~ /home/xmr/xmr-stak-master/xmrstak/backend/amd/amd_gpu/gpu.cpp:173:7: error: ‘CL_INVALID_DEVICE_PARTITION_COUNT’ was not declared in this scope case CL_INVALID_DEVICE_PARTITION_COUNT: ^~~~~~~~~ make[2]: [CMakeFiles/xmrstak_opencl_backend.dir/build.make:63: CMakeFiles/xmrstak_opencl_backend.dir/xmrstak/backend/amd/amd_gpu/gpu.cpp.o] Błąd 1 make[1]: [CMakeFiles/Makefile2:143: CMakeFiles/xmrstak_opencl_backend.dir/all] Błąd 2 make: *** [Makefile:130: all] Błąd 2 xmr@koparka_02 /home/xmr/xmr-stak-master/build $ clinfo Number of platforms: 1 Platform Profile: FULL_PROFILE Platform Version: OpenCL 2.0 AMD-APP (2482.3) Platform Name: AMD Accelerated Parallel Processing Platform Vendor: Advanced Micro Devices, Inc. Platform Extensions: cl_khr_icd cl_amd_event_callback cl_amd_offline_devices

Platform Name: AMD Accelerated Parallel Processing Number of devices: 1 Device Type: CL_DEVICE_TYPE_GPU Vendor ID: 1002h Board name: AMD Radeon(TM) HD8800 Series Device Topology: PCI[ B#1, D#0, F#0 ] Max compute units: 5 Max work items dimensions: 3 Max work items[0]: 256 Max work items[1]: 256 Max work items[2]: 256 Max work group size: 256 Preferred vector width char: 4 Preferred vector width short: 2 Preferred vector width int: 1 Preferred vector width long: 1 Preferred vector width float: 1 Preferred vector width double: 1 Native vector width char: 4 Native vector width short: 2 Native vector width int: 1 Native vector width long: 1 Native vector width float: 1 Native vector width double: 1 Max clock frequency: 955Mhz Address bits: 32 Max memory allocation: 1596954214 Image support: Yes Max number of images read arguments: 128 Max number of images write arguments: 8 Max image 2D width: 16384 Max image 2D height: 16384 Max image 3D width: 2048 Max image 3D height: 2048 Max image 3D depth: 2048 Max samplers within kernel: 16 Max size of kernel argument: 1024 Alignment (bits) of base address: 2048 Minimum alignment (bytes) for any datatype: 128 Single precision floating point capability Denorms: No Quiet NaNs: Yes Round to nearest even: Yes Round to zero: Yes Round to +ve and infinity: Yes IEEE754-2008 fused multiply-add: Yes Cache type: Read/Write Cache line size: 64 Cache size: 16384 Global memory size: 2132230144 Constant buffer size: 65536 Max number of constant args: 8 Local memory type: Scratchpad Local memory size: 32768 Max pipe arguments: 0 Max pipe active reservations: 0 Max pipe packet size: 0 Max global variable size: 0 Max global variable preferred total size: 0 Max read/write image args: 0 Max on device events: 0 Queue on device max size: 0 Max on device queues: 0 Queue on device preferred size: 0 SVM capabilities:
Coarse grain buffer: No Fine grain buffer: No Fine grain system: No Atomics: No Preferred platform atomic alignment: 0 Preferred global atomic alignment: 0 Preferred local atomic alignment: 0 Kernel Preferred work group size multiple: 64 Error correction support: 0 Unified memory for Host and Device: 0 Profiling timer resolution: 1 Device endianess: Little Available: Yes Compiler available: Yes Execution capabilities:
Execute OpenCL kernels: Yes Execute native function: No Queue on Host properties:
Out-of-Order: No Profiling : Yes Queue on Device properties:
Out-of-Order: No Profiling : No Platform ID: 0x7feb2966b098 Name: Hainan Vendor: Advanced Micro Devices, Inc. Device OpenCL C version: OpenCL C 1.2 Driver version: 2482.3 Profile: FULL_PROFILE Version: OpenCL 1.2 AMD-APP (2482.3) Extensions: cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_image2d_from_buffer cl_khr_spir cl_khr_gl_event

christophey2k commented 6 years ago

Hello, The same for me with Gentoo Linux

psychocrypt commented 6 years ago

Please remove the opencl versions shipped with the distribution and use the amd app sdk. Cmake found the wrong opencl which is to old.

Kosturek commented 6 years ago

You can compile xmr-stak with mesa OpenCL 1.1 (on Gentoo this was my only option) but you will have to use amdgpu-pro drivers to run it. AMD APP ebuild is absolte, don't use it. Here is instruction how to intall apdgpu-pro on Gentoo.