On 26/04/2020 15.07, Rebecca N. Palmer wrote:
> Control: retitle -1 pocl: nested(?) dlopen fails
> Control: reassign -1 libpocl2 1.5-2
> Control: affects -1 src:libgpuarray python3-pyopencl
> 
> ocl-icd-libopencl1 dlopen()s ICDs (at
> https://sources.debian.org/src/ocl-icd/2.2.12-4/ocl_icd_loader.c/#L184).
>  With pocl 1.5, this dlopen() fails in some conditions (returns a NULL
> pointer).  dlerror says the problem is "undefined symbol: clRetainEvent".

libpocl.so.2 1.5 uses two symbols from libOpenCL.so.1:
# nm -D /usr/lib/x86_64-linux-gnu/libpocl.so.2.5.0 | grep Retain
                 U clRetainEvent
                 U clRetainKernel

So I think the failure can be reduced to

dlopen("libOpenCL.so.1", RTLD_LOCAL)
dlopen("libpocl.so.2", RTLD_LOCAL)

while it succeeds with

dlopen("libOpenCL.so.1", RTLD_GLOBAL)  // aka -lOpenCL
dlopen("libpocl.so.2", RTLD_LOCAL)

Build logs say

dpkg-shlibdeps: warning: symbol clRetainKernel used by 
debian/libpocl2/usr/lib/x86_64-linux-gnu/libpocl.so.2.5.0 found in none of the 
libraries
dpkg-shlibdeps: warning: symbol clRetainEvent used by 
debian/libpocl2/usr/lib/x86_64-linux-gnu/libpocl.so.2.5.0 found in none of the 
libraries

OK, there is an upstream commit supposed to fix this.

Andreas

Reply via email to