[Pkg-opencl-devel] OpenCL and multiarch

Andreas Beckmann anbe at debian.org
Tue Feb 24 22:30:53 UTC 2015


On 2015-02-24 14:13, Rebecca N. Palmer wrote:
>> I have symlinks (installed by nvidia-opencl-icd-331):
>> /usr/lib/x86_64-linux-gnu/libnvidia-opencl.so.1
>> /usr/lib//i386-linux-gnu/libnvidia-opencl.so.1
>> [...]
>> I am able to run a 32-bit OpenCL application, GPU Caps Viewer [1], in
>> WINE.
> That's because Ubuntu's "amd64" nvidia-opencl-icd-<version> is actually
> amd64 and i386 in one package, which isn't allowed in Debian (Policy
> 9.1.1.4), and isn't done by Debian's nvidia-opencl-icd.

But in Debian you can install nvidia-opencl-icd:amd64 and
nvidia-opencl-icd:i386 at the same time, so you end up with a similar
layout.
The nvidia.icd itself is provided by nvidia-opencl-common (which is M-A:
foreign). Even if that is a tiny package I prefer this over having a
conffile in a M-A: same package (which should work correctly, though, as
well).

>> It's only problematic for icds that don't live in /usr/lib/<triplet>,
> Meaning just beignet; mesa and pocl already use a relative path in their
> .icd file, so could probably be multiarch same (libpocl1, though not
> pocl-opencl-icd, already is).

I wouldn't call this relative path, it's just the library name (library
soname) without any path at all.
A "relative path" like "beignet/libcl.so" does not work at all, but the
"${ORIGIN}/beignet/libcl.so" approach seems to work, at least with
ocl-icd-libopencl1 (didn't check any others).

I'd rather not move /usr/lib/beignet/libcl.so to /usr/lib/<triplet>
(without /beignet suffix) - it has a much too generic and unversioned
SONAME of "libcl.so"

Andreas

PS: clinfo/experimental segfaults if beignet-opencl-icd/experimental is
installed - and probably not supported (i7-3770)

#0  intel_driver_get_bufmgr (drv=0x0) at
/build/beignet-5CjTya/beignet-1.0.1/src/intel/intel_driver.c:430
#1  0x00007ffff73f1031 in cl_get_gt_device () at
/build/beignet-5CjTya/beignet-1.0.1/src/cl_device_id.c:409
#2  0x00007ffff73f1ec1 in cl_get_device_ids (platform=<optimized out>,
device_type=<optimized out>, num_entries=<optimized out>, devices=0x0,
num_devices=0x635ac0)
    at /build/beignet-5CjTya/beignet-1.0.1/src/cl_device_id.c:448
#3  0x0000000000405351 in ?? ()
#4  0x00000000004013da in ?? ()
#5  0x00007ffff784ab45 in __libc_start_main (main=0x401170, argc=1,
argv=0x7fffffffe578, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffffffe568) at libc-start.c:287
#6  0x00000000004017cb in ?? ()

should we have clinfo-dbg ?
And how could we have clinfo itself M-A: same (or similar)? Since it
would be interesting to have more than one architecture of this binary
available at the same time.

Andreas



More information about the Pkg-opencl-devel mailing list