FS#76196 - [nvidia-utils] doesn't install libnvidia-nvvm.so.4

Attached to Project: Arch Linux
Opened by Brennan Shacklett (bps) - Thursday, 13 October 2022, 23:26 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Wednesday, 19 October 2022, 16:40 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:

I noticed that libnvidia-nvvm.so.4 is missing on my machine when trying to follow nvidia's guide on using link time optimization with NVRTC: https://docs.nvidia.com/cuda/nvrtc/index.html#example-lto

While initially I thought this missing library should be provided by CUDA, it seems that it is actually provided by the nvidia driver itself. Unpacking the driver's run file (NVIDIA-Linux-x86_64-520.26.06.run) and checking html/installedcomponents.html contains:

The NVVM Compiler library (<code class="filename">/usr/lib/libnvidia-nvvm.so.4.0.0</code>) is loaded by the CUDA driver to do JIT link-time-optimization.</p>

Strangely, the run file itself only contains libnvidia-nvvm.so.520.56.06, so it isn't immediately clear to me how the .so.4 prefix is supposed to be derived, but perhaps there is something I'm missing given that installedcomponents.html corroborates the .so.4 naming convention. The NVRTC compiler specific tries to load libnvidia-nvvm.so.4 at runtime (shown with LD_DEBUG=libs), so just installing libnvidia-nvvm.so.520.56.06 would not work.

Steps to reproduce:

Install nvidia-utils, cuda, and then try to build and run the example program specified here: https://docs.nvidia.com/cuda/nvrtc/index.html#example-lto.
You will get an error that the PTX compiler cannot be loaded, which can be traced back to failing to load this library. Copying libnvidia-nvvm.so.20.56.06 from the run file to /usr/lib/libnvidia-nvvm.so.4 fixes the issue.
.
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Wednesday, 19 October 2022, 16:40 GMT
Reason for closing:  Fixed
Comment by Mark Wagie (yochananmarqos) - Friday, 14 October 2022, 00:48 GMT
Installing the versioned library is enough as the create_links() function in the PKGBUILD does the magic.

# The NVVM Compiler library is loaded by the CUDA driver to do JIT link-time-optimization
install -Dm644 "libnvidia-nvvm.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-nvvm.so.${pkgver}"


❯ pacman -Ql nvidia-utils | grep nvvm
nvidia-utils /usr/lib/libnvidia-nvvm.so
nvidia-utils /usr/lib/libnvidia-nvvm.so.4
nvidia-utils /usr/lib/libnvidia-nvvm.so.520.56.06
Comment by Brennan Shacklett (bps) - Friday, 14 October 2022, 02:35 GMT
Gotcha, that added line should indeed fix it then!
Comment by Bernd Amend (ptb) - Tuesday, 18 October 2022, 07:05 GMT
This also breaks OpenCL, the proposed fix also fixes OpenCL.
Comment by Sven-Hendrik Haase (Svenstaro) - Tuesday, 18 October 2022, 22:53 GMT
Alright, thanks for the info, I fixed the package. Please test.
Comment by Paolo DePetrillo (paolod) - Tuesday, 18 October 2022, 23:07 GMT
That fixed it, I can run darktable with OpenCL enabled again. Thanks!

Loading...