• dpkg-shlibdeps cannot find the shared objects provided by a downloader

    From M. Zhou@21:1/5 to All on Mon Mar 20 05:40:01 2023
    Hi mentors,

    I'm trying to build the cuda version of pytorch. It depends on a non-free library libcudnn.so.8 which
    is downloaded during postinst by bin:nvidia-cudnn. It is provided by a downloader script due to
    some problems in the upstream EULA.

    During sbuild, all things compiles and can be normally linked against the downloaded libcudnn.so.8,
    but dh_shlibdeps (dpkg-shlibdeps) fails to find the package that provides libcudnn.so.8:

    ```
    dpkg-shlibdeps: error: no dependency information found for /lib/powerpc64le-linux-gnu/libcudnn.so.8 (used by
    debian/libtorch1.13/usr/lib/powerpc64le-linux-gnu/libtorch_global_deps.so.1.13.0)
    Hint: check if the library actually comes from a package.
    ```

    I tried to add a `shlibs` file for the bin:nvidia-cudnn package:

    libcudnn 8 nvidia-cudnn (>= 8.0.0.0)

    https://salsa.debian.org/nvidia-team/nvidia-cudnn/-/commit/92fc55e605f4f0f3b4b6352d5aa1af1610d113b7
    And the file can be found in /var/lib/dpkg/info/nvidia-cudnn.shlibs after installation.

    Nothing changed.
    I have also tried to override the dh_shlibdeps target for src:pytorch as

    dh_shlibdeps -Xcudnn

    Nothing changed.

    What should I do to make dpkg-shlibdeps believe that the shared object libcudnn.so.8
    is provided by bin:nvidia-cudnn (a downloader package)?

    The .shlibs file is one of the standard ways for a regular library package, but it does not
    work for an empty (downloader-only) package. I think there should be some better way
    than building a stub libcudnn.so.8 in bin:nvidia-cudnn and replace it during postinst.

    Thanks in advance!

    [1] the lib install path is in fact /usr/lib/..., the printed path is /lib/... due to usrmerge.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sven Joachim@21:1/5 to M. Zhou on Mon Mar 20 18:50:01 2023
    On 2023-03-20 00:37 -0400, M. Zhou wrote:

    I'm trying to build the cuda version of pytorch. It depends on a non-free library libcudnn.so.8 which
    is downloaded during postinst by bin:nvidia-cudnn. It is provided by a downloader script due to
    some problems in the upstream EULA.

    During sbuild, all things compiles and can be normally linked against the downloaded libcudnn.so.8,
    but dh_shlibdeps (dpkg-shlibdeps) fails to find the package that provides libcudnn.so.8:

    ```
    dpkg-shlibdeps: error: no dependency information found for /lib/powerpc64le-linux-gnu/libcudnn.so.8 (used by
    debian/libtorch1.13/usr/lib/powerpc64le-linux-gnu/libtorch_global_deps.so.1.13.0)
    Hint: check if the library actually comes from a package.
    ```

    I tried to add a `shlibs` file for the bin:nvidia-cudnn package:

    libcudnn 8 nvidia-cudnn (>= 8.0.0.0)

    https://salsa.debian.org/nvidia-team/nvidia-cudnn/-/commit/92fc55e605f4f0f3b4b6352d5aa1af1610d113b7
    And the file can be found in /var/lib/dpkg/info/nvidia-cudnn.shlibs after installation.

    Nothing changed.
    I have also tried to override the dh_shlibdeps target for src:pytorch as

    dh_shlibdeps -Xcudnn

    Nothing changed.

    Yes, because dpkg-shlibs does not know that libcudnn.so.8 belongs to the nvidia-cunn package.

    What should I do to make dpkg-shlibdeps believe that the shared object libcudnn.so.8
    is provided by bin:nvidia-cudnn (a downloader package)?

    The .shlibs file is one of the standard ways for a regular library package, but it does not
    work for an empty (downloader-only) package. I think there should be some better way
    than building a stub libcudnn.so.8 in bin:nvidia-cudnn and replace it during postinst.

    There should be a better way, but AFAIK currently there is none. This
    is an old feature request for dpkg[1].

    Cheers,
    Sven


    1. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=213907

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)