[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#737731: libhwloc-contrib-plugins: depends on ocl-icd-libopencl1 instead of libopencl1



Control: reassign -1 src:dpkg

On 05/02/2014 16:05, Samuel Thibault wrote:
> Control: reassign -1 src:ocl-icd
> 
> Hello,
> 
> On Mi, 05 feb 14, 14:50:39, Giuseppe Bilotta wrote:
>> This prevents installation on systems that are using some other package
>> providing libopencl1. I believe libhwloc-plugins should depend on the generic
>> virtual libopencl1 rather than on a specific implementation.
> 
> Well, it's shlibs:Depends which computes the shared dependency. I
> would say that it should rather be the ocl-icd package which should
> make use of an shlibs file to make applications linking against
> ocl-icd-opencl-dev actually depend on libopencl1.

ocl-icd uses alternative dependency models in its symbol file. All
dependencies against ocl-icd-libopencl1 should have libopencl1 as
alternative.

I compiled locally hwloc, then I executed the following command:

vdanjean@eyak:/tmp/hwloc-1.8.1$ LC_ALL=C dpkg-shlibdeps -v -v -Tout debian/libhwloc-plugins/usr/lib/x86_64-linux-gnu/hwloc/hwloc_opencl.so
>> Scanning debian/libhwloc-plugins/usr/lib/x86_64-linux-gnu/hwloc/hwloc_opencl.so (for Depends field)
Library libltdl.so.7 found in /usr/lib/x86_64-linux-gnu/libltdl.so.7
Library libdl.so.2 found in /lib/x86_64-linux-gnu/libdl.so.2
Library libOpenCL.so.1 found in /usr/lib/x86_64-linux-gnu/libOpenCL.so.1
Library libc.so.6 found in /lib/x86_64-linux-gnu/libc.so.6
Using shlibs+objdump for libltdl.so.7 (file /usr/lib/x86_64-linux-gnu/libltdl.so.7)
 Looking up shlibs dependency of libltdl.so.7 provided by 'libltdl7:amd64'
 Found libltdl7 (>= 2.4.2) in /var/lib/dpkg/info/libltdl7:amd64.shlibs
Using symbols file /var/lib/dpkg/info/libc6:amd64.symbols for libdl.so.2
 Initialize dependency (libc6 #MINVER#) with minimal version (2.2.5)
Using symbols file /var/lib/dpkg/info/ocl-icd-libopencl1:amd64.symbols for libOpenCL.so.1
 Initialize dependency (ocl-icd-libopencl1 #MINVER#) with minimal version ()
Using symbols file /var/lib/dpkg/info/libc6:amd64.symbols for libc.so.6
Analyzing all undefined symbols
 Looking up symbol clGetDeviceInfo@OPENCL_1.0
 Found in symbols file of libOpenCL.so.1 (minver: 1.0, dep: ocl-icd-libopencl1 | libopencl1, libopencl-1.1-1)
 Looking up symbol snprintf@GLIBC_2.2.5
 Found in symbols file of libc.so.6 (minver: 2.2.5, dep: libc6 #MINVER#)
 Looking up symbol hwloc_backend_alloc@Base
 Not found
dpkg-shlibdeps: warning: debian/libhwloc-plugins/usr/lib/x86_64-linux-gnu/hwloc/hwloc_opencl.so contains an unresolvable reference to symbol hwloc_backend_alloc: it's probably a plugin
 Looking up symbol clGetPlatformInfo@OPENCL_1.0
 Found in symbols file of libOpenCL.so.1 (minver: 1.0, dep: ocl-icd-libopencl1 | libopencl1, libopencl-1.1-1)
 Looking up symbol clGetDeviceIDs@OPENCL_1.0
 Found in symbols file of libOpenCL.so.1 (minver: 1.0, dep: ocl-icd-libopencl1 | libopencl1, libopencl-1.1-1)
 Looking up symbol getenv@GLIBC_2.2.5
 Found in symbols file of libc.so.6 (minver: 2.2.5, dep: libc6 #MINVER#)
 Looking up symbol hwloc_obj_add_info@Base
 Not found
dpkg-shlibdeps: warning: debian/libhwloc-plugins/usr/lib/x86_64-linux-gnu/hwloc/hwloc_opencl.so contains an unresolvable reference to symbol hwloc_obj_add_info: it's probably a plugin
 Looking up symbol atoi@GLIBC_2.2.5
 Found in symbols file of libc.so.6 (minver: 2.2.5, dep: libc6 #MINVER#)
 Looking up symbol free@GLIBC_2.2.5
 Found in symbols file of libc.so.6 (minver: 2.2.5, dep: libc6 #MINVER#)
 Looking up symbol hwloc_topology_get_flags@Base
 Not found
dpkg-shlibdeps: warning: debian/libhwloc-plugins/usr/lib/x86_64-linux-gnu/hwloc/hwloc_opencl.so contains an unresolvable reference to symbol hwloc_topology_get_flags: it's probably a plugin
 Looking up symbol _ITM_deregisterTMCloneTable@Base
 Not found
 Looking up symbol lt_dlclose@Base
 Found in libltdl.so.7 (libltdl.so.7)
 Looking up symbol __assert_fail@GLIBC_2.2.5
 Found in symbols file of libc.so.6 (minver: 2.2.5, dep: libc6 #MINVER#)
 Looking up symbol lt_dlsym@Base
 Found in libltdl.so.7 (libltdl.so.7)
 Looking up symbol _Jv_RegisterClasses@Base
 Not found
 Looking up symbol __gmon_start__@Base
 Not found
 Looking up symbol clGetPlatformIDs@OPENCL_1.0
 Found in symbols file of libOpenCL.so.1 (minver: 1.0, dep: ocl-icd-libopencl1 | libopencl1, libopencl-1.1-1)
 Looking up symbol fprintf@GLIBC_2.2.5
 Found in symbols file of libc.so.6 (minver: 2.2.5, dep: libc6 #MINVER#)
 Looking up symbol malloc@GLIBC_2.2.5
 Found in symbols file of libc.so.6 (minver: 2.2.5, dep: libc6 #MINVER#)
 Looking up symbol hwloc_topology_is_thissystem@Base
 Not found
dpkg-shlibdeps: warning: debian/libhwloc-plugins/usr/lib/x86_64-linux-gnu/hwloc/hwloc_opencl.so contains an unresolvable reference to symbol hwloc_topology_is_thissystem: it's probably a plugin
 Looking up symbol __cxa_finalize@GLIBC_2.2.5
 Found in symbols file of libc.so.6 (minver: 2.2.5, dep: libc6 #MINVER#)
 Looking up symbol hwloc_insert_object_by_parent@Base
 Not found
dpkg-shlibdeps: warning: debian/libhwloc-plugins/usr/lib/x86_64-linux-gnu/hwloc/hwloc_opencl.so contains an unresolvable reference to symbol hwloc_insert_object_by_parent: it's probably a plugin
 Looking up symbol lt_dlopen@Base
 Found in libltdl.so.7 (libltdl.so.7)
 Looking up symbol _ITM_registerTMCloneTable@Base
 Not found
 Looking up symbol stderr@GLIBC_2.2.5
 Found in symbols file of libc.so.6 (minver: 2.2.5, dep: libc6 #MINVER#)
 Looking up symbol memset@GLIBC_2.2.5
 Found in symbols file of libc.so.6 (minver: 2.2.5, dep: libc6 #MINVER#)
 Looking up symbol __stack_chk_fail@GLIBC_2.4
 Found in symbols file of libc.so.6 (minver: 2.4, dep: libc6 #MINVER#)
 Looking up symbol strdup@GLIBC_2.2.5
 Found in symbols file of libc.so.6 (minver: 2.2.5, dep: libc6 #MINVER#)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/libhwloc-plugins/usr/lib/x86_64-linux-gnu/hwloc/hwloc_opencl.so was not linked against libdl.so.2 (it uses none of the library's symbols)
Use of uninitialized value in string comparison (cmp) at /usr/share/perl5/Dpkg/Deps.pm line 346.
Use of uninitialized value in string comparison (cmp) at /usr/share/perl5/Dpkg/Deps.pm line 346.
vdanjean@eyak:/tmp/hwloc-1.8.1$ cat out
shlibs:Depends=libc6 (>= 2.4), libltdl7 (>= 2.4.2), libopencl-1.1-1, ocl-icd-libopencl1 | libopencl1, ocl-icd-libopencl1
vdanjean@eyak:/tmp/hwloc-1.8.1$

You can see that all symbols give dependencies of the type
ocl-icd-libopencl1 | libopencl1, libopencl-1.1-1
However, dependencies seems to be initialized with the main model
(from the symbol file), ie "ocl-icd-libopencl1 #MINVER#" (whereas
no symbol uses this dependency model)

Dpkg maintainers, can you say if:
- this is a bug in dpkg-shlibdeps (always the main model even if no symbol use it)
- this is a wishbug in the documentation (to explain this feature)

Samuel : in any case, I will upload immediately a new version with
a neutral main model. I will then ask for a binary rebuild (but I will
probably be without of internet next week, so you might wish to check
if the rebuild really occurs)

  Regards,
    Vincent

> Samuel


Reply to: