fireice-uk / xmr-stak-amd

Monero AMD miner

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WARNING: Target "xmrstak_opencl_backend" requests linking to directory "/opt/rocm/opencl/lib/x86_64".

minzak opened this issue · comments

Debian 9, last kernel 4.19 + Latest ROCm 2.0.1

All clinfo, rocminfo, etc is worked.
clinfo.txt
rocm_smi.txt
rocminfo.txt

I have gcc 6.3 and gcc 8.3 and i can use lates if add:
-DCMAKE_C_COMPILER=/usr/local/bin/gcc-8 -DCMAKE_CXX_COMPILER=/usr/local/bin/g++-8
But i use:

cmake -DCMAKE_LINK_STATIC=OFF -DXMR-STAK_COMPILE=native -DCMAKE_BUILD_TYPE=Release -DHWLOC_ENABLE=ON \
-DCUDA_ENABLE=OFF -DOpenCL_ENABLE=ON -DCPU_ENABLE=ON -DMICROHTTPD_ENABLE=ON -DOpenSSL_ENABLE=ON \
-DOpenCL_INCLUDE_DIR=/opt/rocm/opencl/include/CL -DOpenCL_LIBRARY=/opt/rocm/opencl/lib/x86_64 -DCMAKE_INSTALL_PREFIX=/opt/xmr-stak ..
make -j8

and got:

-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.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
-- Looking for CL_VERSION_2_2
-- Looking for CL_VERSION_2_2 - not found
-- Looking for CL_VERSION_2_1
-- Looking for CL_VERSION_2_1 - not found
-- 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 - not found
-- Looking for CL_VERSION_1_0
-- Looking for CL_VERSION_1_0 - not found
-- Found OpenCL: /opt/rocm/opencl/lib/x86_64
-- 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/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.0j")
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Configuring done
WARNING: Target "xmrstak_opencl_backend" requests linking to directory "/opt/rocm/opencl/lib/x86_64".  Targets may link only to libraries.  CMake is dropping the item.
-- Generating done
-- Build files have been written to: /usr/src/xmr-stak/build
Scanning dependencies of target xmr-stak-asm
[  2%] Building ASM object CMakeFiles/xmr-stak-asm.dir/xmrstak/backend/cpu/crypto/asm/cryptonight_v8_main_loop.S.o
[  5%] Building ASM object CMakeFiles/xmr-stak-asm.dir/xmrstak/backend/cpu/crypto/asm/cnR/CryptonightR_template.S.o
[  7%] Linking C static library bin/libxmr-stak-asm.a
[  7%] Built target xmr-stak-asm
Scanning dependencies of target xmr-stak-c
[ 13%] 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_groestl.c.o
[ 15%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_keccak.c.o
[ 21%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_blake256.c.o
[ 21%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_skein.c.o
[ 23%] Linking C static library bin/libxmr-stak-c.a
[ 23%] Built target xmr-stak-c
Scanning dependencies of target xmr-stak-backend
[ 31%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/backendConnector.cpp.o
[ 31%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/CryptonightR_gen.cpp.o
[ 31%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cn_gpu_ssse3.cpp.o
[ 34%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/cpuType.cpp.o
[ 36%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cn_gpu_avx.cpp.o
[ 42%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cryptonight_common.cpp.o
[ 42%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/hwlocMemory.cpp.o
[ 44%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/jconf.cpp.o
In file included from /usr/src/xmr-stak/xmrstak/backend/amd/minethd.hpp:3:0,
                 from /usr/src/xmr-stak/xmrstak/backend/backendConnector.cpp:38:
/usr/src/xmr-stak/xmrstak/backend/amd/amd_gpu/gpu.hpp:9:19: fatal error: CL/cl.h: No such file or directory
 #include <CL/cl.h>
                   ^
compilation terminated.
CMakeFiles/xmr-stak-backend.dir/build.make:62: recipe for target 'CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/backendConnector.cpp.o' failed
make[2]: *** [CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/backendConnector.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:112: recipe for target 'CMakeFiles/xmr-stak-backend.dir/all' failed
make[1]: *** [CMakeFiles/xmr-stak-backend.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

root@z820:/usr/src/xmr-stak/build#

And i have all libraries:

root@z820:/opt/rocm# tree
.
├── atmi
│   ├── include
│   │   ├── atmi.h
│   │   └── atmi_runtime.h
│   └── lib
│       └── libatmi_runtime.so
├── bin
│   ├── clang-ocl
│   ├── rocm_agent_enumerator
│   ├── rocminfo
│   ├── rocm-smi -> rocm_smi.py
│   └── rocm_smi.py
├── hsa
│   ├── include
│   │   └── hsa
│   │       ├── amd_hsa_common.h
│   │       ├── amd_hsa_elf.h
│   │       ├── amd_hsa_kernel_code.h
│   │       ├── amd_hsa_queue.h
│   │       ├── amd_hsa_signal.h
│   │       ├── amd_hsa_tools_interfaces.h
│   │       ├── Brig.h
│   │       ├── hsa_api_trace.h
│   │       ├── hsa_ext_amd.h
│   │       ├── hsa_ext_debugger.h
│   │       ├── hsa_ext_finalize.h
│   │       ├── hsa_ext_image.h
│   │       ├── hsa_ext_profiler.h
│   │       ├── hsa.h
│   │       ├── hsa_ven_amd_aqlprofile.h
│   │       └── hsa_ven_amd_loader.h
│   ├── lib
│   │   ├── libhsa-ext-image64.so.1 -> libhsa-ext-image64.so.1.1.9
│   │   ├── libhsa-ext-image64.so.1.1.9
│   │   ├── libhsa-runtime64.so.1 -> libhsa-runtime64.so.1.1.9
│   │   ├── libhsa-runtime64.so.1.1.9
│   │   ├── libhsa-runtime-tools64.so.1 -> libhsa-runtime-tools64.so.1.1.9
│   │   └── libhsa-runtime-tools64.so.1.1.9
│   ├── LICENSE.txt
│   └── README.md
├── include
│   ├── amd_comgr.h
│   ├── amd_hsa_common.h
│   ├── amd_hsa_elf.h
│   ├── amd_hsa_kernel_code.h
│   ├── amd_hsa_queue.h
│   ├── amd_hsa_signal.h
│   ├── as.h
│   ├── device_amd_hsa.h
│   ├── hsa -> ../hsa/include/hsa
│   ├── hsa.h
│   ├── hsakmt.h
│   ├── hsakmttypes.h
│   ├── linux
│   │   └── kfd_ioctl.h
│   ├── ockl.h
│   ├── ockl_hsa.h
│   ├── ocml.h
│   ├── opencl1.2-c.pch
│   └── opencl2.0-c.pch
├── lib
│   ├── cmake
│   │   ├── amd_comgr
│   │   │   ├── amd_comgr-config.cmake
│   │   │   ├── amd_comgr-targets.cmake
│   │   │   └── amd_comgr-targets-release.cmake
│   │   └── AMDDeviceLibs
│   │       └── AMDDeviceLibsConfig.cmake
│   ├── hc.amdgcn.bc
│   ├── hip.amdgcn.bc
│   ├── libamd_comgr.so
│   ├── libhsakmt.so -> libhsakmt.so.1
│   ├── libhsakmt.so.1 -> libhsakmt.so.1.0.9
│   ├── libhsakmt.so.1.0.9
│   ├── libhsa-runtime64.so -> ../hsa/lib/libhsa-runtime64.so.1
│   ├── ockl.amdgcn.bc
│   ├── oclc_correctly_rounded_sqrt_off.amdgcn.bc
│   ├── oclc_correctly_rounded_sqrt_on.amdgcn.bc
│   ├── oclc_daz_opt_off.amdgcn.bc
│   ├── oclc_daz_opt_on.amdgcn.bc
│   ├── oclc_finite_only_off.amdgcn.bc
│   ├── oclc_finite_only_on.amdgcn.bc
│   ├── oclc_isa_version_700.amdgcn.bc
│   ├── oclc_isa_version_701.amdgcn.bc
│   ├── oclc_isa_version_702.amdgcn.bc
│   ├── oclc_isa_version_801.amdgcn.bc
│   ├── oclc_isa_version_802.amdgcn.bc
│   ├── oclc_isa_version_803.amdgcn.bc
│   ├── oclc_isa_version_810.amdgcn.bc
│   ├── oclc_isa_version_900.amdgcn.bc
│   ├── oclc_isa_version_902.amdgcn.bc
│   ├── oclc_isa_version_904.amdgcn.bc
│   ├── oclc_isa_version_906.amdgcn.bc
│   ├── oclc_unsafe_math_off.amdgcn.bc
│   ├── oclc_unsafe_math_on.amdgcn.bc
│   ├── ocml.amdgcn.bc
│   └── opencl.amdgcn.bc
├── libhsakmt
│   ├── libhsakmt.pc
│   └── LICENSE.md
├── opencl
│   ├── bin
│   │   └── x86_64
│   │       ├── clang
│   │       ├── clinfo
│   │       ├── ld.lld
│   │       ├── llc
│   │       ├── llvm-link
│   │       ├── llvm-objdump
│   │       └── opt
│   ├── include
│   │   ├── CL
│   │   │   ├── cl_ext.h
│   │   │   ├── cl_gl_ext.h
│   │   │   ├── cl_gl.h
│   │   │   ├── cl.h
│   │   │   ├── cl.hpp
│   │   │   ├── cl_platform.h
│   │   │   └── opencl.h
│   │   └── opencl-c.h
│   └── lib
│       └── x86_64
│           ├── bitcode
│           │   ├── hip.amdgcn.bc
│           │   ├── irif.amdgcn.bc
│           │   ├── ockl.amdgcn.bc
│           │   ├── oclc_correctly_rounded_sqrt_off.amdgcn.bc
│           │   ├── oclc_correctly_rounded_sqrt_on.amdgcn.bc
│           │   ├── oclc_daz_opt_off.amdgcn.bc
│           │   ├── oclc_daz_opt_on.amdgcn.bc
│           │   ├── oclc_finite_only_off.amdgcn.bc
│           │   ├── oclc_finite_only_on.amdgcn.bc
│           │   ├── oclc_isa_version_700.amdgcn.bc
│           │   ├── oclc_isa_version_701.amdgcn.bc
│           │   ├── oclc_isa_version_702.amdgcn.bc
│           │   ├── oclc_isa_version_801.amdgcn.bc
│           │   ├── oclc_isa_version_802.amdgcn.bc
│           │   ├── oclc_isa_version_803.amdgcn.bc
│           │   ├── oclc_isa_version_810.amdgcn.bc
│           │   ├── oclc_isa_version_900.amdgcn.bc
│           │   ├── oclc_isa_version_902.amdgcn.bc
│           │   ├── oclc_isa_version_904.amdgcn.bc
│           │   ├── oclc_isa_version_906.amdgcn.bc
│           │   ├── oclc_unsafe_math_off.amdgcn.bc
│           │   ├── oclc_unsafe_math_on.amdgcn.bc
│           │   ├── ocml.amdgcn.bc
│           │   └── opencl.amdgcn.bc
│           ├── libamdocl64.so
│           ├── libcltrace.so
│           ├── libOpenCL.so -> libOpenCL.so.1
│           └── libOpenCL.so.1
└── share
    ├── amd_comgr
    │   ├── LICENSE.txt
    │   ├── NOTICES.txt
    │   └── README.md
    └── rocm
        └── cmake
            ├── ROCMAnalyzers.cmake
            ├── ROCMClangTidy.cmake
            ├── ROCMConfig.cmake
            ├── ROCMCppCheck.cmake
            ├── ROCMCreatePackage.cmake
            ├── ROCMInstallSymlinks.cmake
            ├── ROCMInstallTargets.cmake
            ├── ROCMPackageConfigHelpers.cmake
            └── ROCMSetupVersion.cmake

what i must to change for building?
Thanks.

My fault, just need -DOpenCL_INCLUDE_DIR=/opt/rocm/opencl/include/