DaggerGpuMiner icon indicating copy to clipboard operation
DaggerGpuMiner copied to clipboard

help: can not compile on ubuntu ,when make all, show errors : CL/opencl.h: No such file or directory

Open davidzollo opened this issue 7 years ago • 5 comments

root@deeplearning:/opt/soft/bi/DaggerGpuMiner-0.2.3/GpuMiner# make all g++ -O -c -std=c++11 -I. -I/opt/AMDAPPSDK-3.0/include/ main.cpp -o main.o In file included from ./MinerEngine/CLMiner.h:17:0, from Core/MinerManager.h:23, from main.cpp:8: ./MinerEngine/CL/cl2.hpp:504:23: fatal error: CL/opencl.h: No such file or directory #include <CL/opencl.h> ^ compilation terminated. Makefile:16: recipe for target 'main.o' failed make: *** [main.o] Error 1

davidzollo avatar May 10 '18 02:05 davidzollo

Hi. Did you follow https://github.com/jonano614/DaggerGpuMiner/blob/master/README.md ?

jonano614 avatar May 10 '18 19:05 jonano614

me too

root@ip-172-31-26-42:~/DaggerGpuMiner/GpuMiner# make all g++ -O -c -std=c++11 -I. -I/opt/AMDAPPSDK-3.0/include/ main.cpp -o main.o In file included from ./MinerEngine/CLMiner.h:17:0, from Core/MinerManager.h:23, from main.cpp:6: ./MinerEngine/CL/cl2.hpp:504:23: fatal error: CL/opencl.h: No such file or directory #include <CL/opencl.h> ^ compilation terminated. Makefile:16: recipe for target 'main.o' failed make: *** [main.o] Error 1

wiki-qi avatar Jun 12 '18 10:06 wiki-qi

root@ip-172-31-26-42:~/DaggerGpuMiner/GpuMiner# make g++ -O -o xdag-gpu -L/opt/AMDAPPSDK-3.0/lib/x86_64/sdk main.o Core/CommonData.o Core/Farm.o Core/Log.o Core/Miner.o Core/MinerManager.o Core/Worker.o Hash/sha256.o Hash/sha256_mod.o MinerEngine/CLMiner.o MinerEngine/XCpuMiner.o Utils/CpuInfo.o Utils/PathUtils.o Utils/Random.o Utils/Utils.o XDagCore/XAddress.o XDagCore/XHash.o XDagCore/XNetwork.o XDagCore/XBlock.o XDagCore/XPool.o XDagCore/XTaskProcessor.o XDagCore/XTaskWrapper.o XDagCore/dar/crc_c.o XDagCore/dfstools/dfslib_crypt.o XDagCore/dfstools/dfslib_string.o -lOpenCL -lpthread -lboost_system /usr/bin/ld: cannot find -lOpenCL collect2: error: ld returned 1 exit status Makefile:19: recipe for target 'xdag-gpu' failed make: *** [xdag-gpu] Error 1

wiki-qi avatar Jun 12 '18 11:06 wiki-qi

@wiki-qi

Better check installation of OpenCL library firstly.

xrdavies avatar Jul 07 '18 19:07 xrdavies

For Ubuntu 20, I did the following and it fixed the opencl compile issue:

sudo apt-get install opencl-headers ocl-icd-opencl-dev

bdelgado1995 avatar Feb 28 '22 16:02 bdelgado1995