[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: retitle -1 dpkg-shlibdeps: Document that the main-dependency-template always gets added


On Wed, 2014-02-05 at 23:50:59 +0100, Vincent Danjean wrote:
> 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 ()

As you can see here, the main-dependency-template is being used just
because the binary links against the library.

> Using symbols file /var/lib/dpkg/info/libc6:amd64.symbols for libc.so.6
> 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.

Oh, I'm fixing this too.

> 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)

Well, the binary does, just by linking against it. :)

> 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)

The latter, as mentioned above, I'm documenting it for 1.17.7.


Reply to: