#763638 lintian: OpenCL ICD Loader used to built official Debian packages should be the free one

#763638#5
Date:
2014-10-01 14:37:54 UTC
From:
To:
  Hi,

  In Debian, we have several OpenCL ICD Loader implementation. An ICD
Loader is used to load the OpenCL implementation (provided as a plugin), it
does not implement OpenCL itself.
  In theory, all OpenCL ICD Loaders can be switched. They should be equivalent
(API defined by the Khonos OpenCL consorsium).

  However, in pratice, this is not the case. There are several reasons, such
as:
- OpenCL version support is not the same
- some ICD Loaders provide versionned symbols, other not
- ...

  About the version, ICD Loaders are backward compatible, ie a new loader is
able to run an old program with an old ICD (and even with a new ICD if the ICD
has been wrotten with backward compatibility in mind).
  About the versionned symbols, as only default symbols are used for now, ICD
Loaders can still be switched at runtime without any problem for the users.

  However, problems can occur when a library is linked with a ICD Loader
providing versionned symbols and, then, a program is linked to the library with an ICD Loader *not* providing versionned symbols, then a link-time error occurs during the compilation. See #743740.

  Currently, Debian provides one free ICD Loader in main (ocl-icd-libopencl1)
and two in non-free (amd-libopencl1 and nvidia-libopencl1). It possible that
the intel one will be packaged latter.

  I would like that lintian emits a warning when a official build is using an
ICD Loader not supporting versionned symbols. Unless very specific needs (that
can be adressed with a lintian override), there is no reason not to use the
free implementation that provides versionned symbols.  Even if a non-free
OpenCL implementation is required (the nvidia one for example), then this
OpenCL implementation can be used with the free ICD Loader (that is
nvidia-opencl-icd can be installed with ocl-icd-libopencl1).

  With this warning, packagers of OpenCL applications would be informed of the
issue and the group of people managing OpenCL in Debian can search for such
issues by looking at archive-wide lintian results.

  That said, I'm not sure how to detect that a package has been compiled with
versionned symbols for the libOpenCL.so.1 library.

  Regards,
    Vincent

#763638#10
Date:
2014-10-22 06:28:00 UTC
From:
To:
With my latest changes, packages built against the non-free loader will
have an ORed dependency on the non-free loader, making them unsuitable
for main :-)

libopencl1-ocl-icd | libopencl1-$vendor | libopencl-X.Y-1


Andreas