Missing OpenCL ICD header files (like OpenCL/opencl.h) installing from propreitary driver package

Hi,
I installed NVIDIA drivers using propreitary driver package ‘NVIDIA-Linux-x86_64-440.64.run’. For my Linux-Dist there is no more recent driver package in the repositories providing support for Linux Kernel 5.x.

I noticed I’m missing OpenCL ICD header files (like OpenCL/opencl.h) usually provided by deb-package name like nvidia-liboencl1. I did not find any file extracting the ‘NVIDIA-Linux-x86_64-440.64.run’ to a directory which look suiteable nor any advanced installer option to install them.

Is there any option to install opencl header files from official nvidia.com driver packages?

You mentioned deb packages. Are you using Ubuntu? I think these headers are provided by the opencl-c-headers package: https://packages.ubuntu.com/eoan/all/opencl-c-headers/filelist

Yes I’m using Ubuntu, but still running Ubuntu 16 (Xenial) with more recent Ubuntu 5 Kernel. I can’t install nvidia-icd or driver package as these don’t support this kernel version in the released versions provided for Ubuntu 16.

For my understanding I would have to install nvidia-opencl-dev which itself wants to install nvidia-opencl-icd-xxx and the rest of the drivers.

In Ubuntu 16 there is no package named ‘opencl-c-headers’. There’s only these one:

  • opencl-headers (already installed)
  • opencl-icd (already installed)
  • virtual package: opencl-dev (either installing requirement ocl-icd-opencl-dev or nvidia-opencl-dev)

Shouldn’t there come some nvidia-gpu specific opencl-header-libs? I’m wondering these are not provided by the binary installer package (aka ‘NVIDIA-xxxxx.run’ files).

No, I don’t think so. libOpenCL is a vendor-independent loader library shipped by Khronos.

The library itself comes from here: https://github.com/KhronosGroup/OpenCL-ICD-Loader
and the headers come from https://github.com/KhronosGroup/OpenCL-Headers