<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Package: nvidia-opencl-dev</div><div class="">Version: 7.5.18-4~bpo8+1</div><div class=""><br class=""></div><div class="">On a Debian8 machine:</div><div class="">- fresh installed from the ec2 debian8 image</div><div class="">- with jessie-backports repository</div><div class=""><br class=""></div><div class="">installing ‘ nvidia-opencl-dev’ from jessie-backports triggers the install of (among other packages) of:</div><div class="">- nvidia-libopencl1 amd64 375.82-1~deb9u1~bpo8+1</div><div class="">- opencl-headers 2.0~svn31815-2~bpo8+1  </div><div class=""><br class=""></div><span class="Apple-tab-span" style="white-space:pre">  </span>The issue is that nvidia-libopencl1 provides an ICD loader in libOpenCL.so which only supports OpenCL 1.2, whereas opencl-headers 2.0 advertises OpenCL version 2, which is inconsistent and leads to compilation errors (see the exchange on <a href="https://lists.tiker.net/pipermail/pyopencl/2018-February/002340.html" class="">https://lists.tiker.net/pipermail/pyopencl/2018-February/002340.html</a>).<div class=""><br class=""></div><div class="">#####################</div><div class=""><span class="Apple-tab-span" style="white-space:pre">      </span>Exact script from a base debian8 image to reproduce:</div><div class=""><br class=""></div><div class="">echo "deb <a href="http://httpredir.debian.org/debian/" class="">http://httpredir.debian.org/debian/</a> jessie contrib non-free" >> jessie-contrib-nonfree-backports.list<br class="">echo "deb <a href="http://httpredir.debian.org/debian/" class="">http://httpredir.debian.org/debian/</a> jessie-backports main contrib non-free" >> jessie-contrib-nonfree-backports.list<br class="">sudo mv jessie-contrib-nonfree-backports.list  /etc/apt/sources.list.d/<br class="">sudo apt-get update<br class="">sudo apt-get -t jessie-backports install -y nvidia-opencl-dev</div><div class=""><br class=""></div><div class="">.. and then /usr/lib/x86_64-linux-gnu/libOpenCL.so does not have OpenCL 2.0 symbols (e.g. clSVMFree) </div><div class=""><br class=""></div><div class="">but /usr/include/CL/cl.h advertises OpenCL 2.0:</div><div class=""><br class=""></div><div class="">/usr/include/CL/cl.h:198:#define CL_VERSION_2_0                              1<br class=""><br class=""></div><div class="">#####################</div><div class=""><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">   </span>Possible solutions (I did not look at the detailed decency tree..) may be:</div><div class="">- nvidia-libopencl1 375.82 to request opencl-headers version <=1.2 (which is in jessie)</div><div class="">- do not install nvidia-libopencl1 but rather the generic ICD loader ocl-icd-opencl-dev</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">  </span>For those who meet this, an immediate workaround is to first install opencl-headers from jessie repository (without the ‘-t jessie-backports’), and only then install nvidia-opencl-dev / nvidia-cuda-toolkit) from jessie-backport.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">   </span>Thanks,</div><div class=""><div class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">-- </div><div class="">Vincent Favre-Nicolin</div></div>

</div>

<br class=""></div></div></div></body></html>