Bug#763655: boinc-amd-opencl: wrong dependencies regarding OpenCL

Vincent Danjean vdanjean.ml at free.fr
Thu Oct 2 20:32:43 UTC 2014

On 02/10/2014 14:09, Gianfranco Costamagna wrote:
>> One proposal (for Debian) :
> [snip]
> I presume you are talking about "boinc-amd-opencl" package:

I just looked at the various package in src:boinc (only the debian/control
file, I did not inspect the real packages). If I understand correctly
(correct me if I'm wrong), only the 'client' part of boinc is concerned
by gpu/OpenCL/...
You package it with
- boinc-client that contains all the client software (and that can use
  GPU, ... due to the use of dlopen if these additional software are
- boinc-nvidia-cuda that installs dependencies required for boinc-client
  to use NVidia cards with CUDA
- boinc-amd-opencl that installs dependencies required for boinc-client
  to use AMD cards with OpenCL or Catalyst directly ?

If this is the case, I would have put 'client' in the last two package names
and make them depends on boinc-client. But if GPU can also be used
by the boinc manager, then I would let these packages as they are.

My main "problem" is the target of boinc-amd-opencl.
boinc-nvidia-cuda seems clear: to allow the use of NVidia cards with CUDA.
I do not look a lot in the sources, so I can be wrong, but I think that
other targets of accelerated boinc-client can be :
[A] AMD cards with Catalyst (fglrx drivers directly)
[B] NVidia cards with OpenCL (through NVidia ICD packaged in
[C] AMD cards with OpenCL (through AMD ICD packaged in amd-opencl-icd)
[D] Intel cards with OpenCL (through Intel ICD not (yet) packaged)
[E] other OpenCL implementations

And I fail to see what of these is targeted by boinc-amd-opencl.
Probably A or B/C/D/E but without requiring to install any specific ICD in
the case of OpenCL
  Note that, contrary to NVidia, AMD really maintains its OpenCL drivers.
So, you probably should either split A and OpenCL support but you can
ensure that OpenCL default to the AMD ICD by default.

Let's try:

Package: boinc-client
Suggests: boinc-opencl, boinc-nvidia-cuda, boinc-amd-fglrx, ...
=> install software client

Package: boinc-nvidia-cuda (or boinc-client-nvidia-cuda)
Depends: boinc-client, libcuda1
Recommends: libcudart5.5 | libcudart6.0
=> install what is required to run client with NVidia cards
   used with Cuda

Package: boinc-amd-fglrx
Depends: boinc-client, libfglrx-virtual
Recommends: fglrx-driver, libgl1-fglrx-glx-virtual
=> install what is required to run client with AMD cards
   used with Catalyst/fglrx

Package: boinc-opencl
Depends: ocl-icd-libopencl1 | libopencl-1.1-1
Recommends: amd-opencl-icd | opencl-icd
=> install what is required to run client with OpenCL
   recommends an ICD (OpenCL implementation) and ask,
   by default, the AMD one

I know less plain cuda and fglrx than OpenCL. So I'm less
confident for proposed dependencies for these two.

> sudo apt-get install libopencl-1.1-1
> Reading package lists... Done
> Building dependency tree       
> Reading state information... Done
> Note, selecting 'ocl-icd-libopencl1' instead of 'libopencl-1.1-1'
> Suggested packages:
>   opencl-icd
> The following packages will be REMOVED:
>   nvidia-libopencl1-304
> The following NEW packages will be installed:
>   ocl-icd-libopencl1
> 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
> Need to get 28,1 kB of archives.
> After this operation, 48,1 kB of additional disk space will be used.
> Do you want to continue? [Y/n] 
> So I'm worried about removing the nvidia package...

You should not.
nvidia-libopencl1, amd-libopencl1 and ocl-icd-libopencl1 must be
fully interchangeable (for OpenCL 1.1). If you also want OpenCL 1.2
and/or OpenCL 2.0, then only amd-libopencl1 and ocl-icd-libopencl1
support them. ocl-icd-libopencl1 should be preferred because its free
(hence the proposed alternative above)

> and moreover many times boinc gets removed from testing because
> of nvidia/xserver ABI transitions (e.g. [1]).

All boinc ? Or only the boinc-nvidia-cuda ?

> And we moved everything to Suggest just to avoid this, but your package
> seems to be in unstable and testing without removals.

At least, OpenCL interface (provided by either nvidia-libopencl1,
amd-libopencl1 or ocl-icd-libopencl1) is very stable. It is normalized
by the Chronos consortium.

> E: Package 'opencl-icd' has no installation candidate

Put it in Recommends or Suggests. It is the OpenCL implementation
and the 'right' Depends depends on your hardware. So, there is no
way to have apt always selecting the good driver.

> E: Unable to locate package libfglrx-virtual

put the package you list in your previous mail as alternative.
I use the list of providers of listed libraries here.

> E: Package 'libcuda1' has no installation candidate

same here

> E: Unable to locate package libnvidia-ml1

same here

> only the first one is picked in ubuntu.
> I don't want to have any ubuntu delta (if possible)
> do you have any solution for this?

Use alternatives. It just that I do not consider them in my first
mail (nor in this one) because, as I do not have ubuntu, I cannot
easily look at package descriptions and dependencies with


> thanks for the help so far!
> Gianfranco
> [1] https://packages.qa.debian.org/n/nvidia-graphics-drivers/news/20140716T163916Z.html

Vincent Danjean       GPG key ID 0xD17897FA         vdanjean at debian.org
GPG key fingerprint: 621E 3509 654D D77C 43F5  CA4A F6AE F2AF D178 97FA
Unofficial pkgs: http://moais.imag.fr/membres/vincent.danjean/deb.html
APT repo:  deb http://people.debian.org/~vdanjean/debian unstable main

More information about the pkg-boinc-devel mailing list