While seting up a new VM on my workstation I ran in a couple of errors while trying to run hashcat. Mostly the error appears with Ryzen cpu’s, since I run a Ryzen 5900X I have to figure out what fixes the error. In short, here is the clear step by step way.
While running hashcat you get the following error, even with –force:
clBuildProgram(): CL_BUILD_PROGRAM_FAILURE error: unknown target CPU 'generic'
Device #1: Kernel /usr/share/hashcat/OpenCL/shared.cl build failed.
It seems that there is a lack of LLVM 4.0 on your system.
Install the needed CPU Runtimes for OpenCL applications. You can download the tar-archive on the Intel-page.
Navigate to your Download directory and untar the archive
tar -xvf l_opencl_p_18.1.0.015.tgz
Navigate into the folder and run the installation script
The installer will navigate you threw the process and show you what is missing in your environment.
After the installation is finished you’ll should be able to run hashcat without any problems.
🖤 Did this article help you?
Buy me a coffee and support my work to keep this space 🚀 and ad-free. If you can’t, share my work to reach this 📖 out to more people.
1 thought on “Fix CL_BUILD_PROGRAM_FAILURE Hashcat error”
Exactly what I needed thanks.
However, it’s a little surprising that we need an Intel software to have OpenCL to work on an AMD CPU but it works.