4

I have a fresh install of ubuntu 22.04 (actually pop os, same version)

I've got the CUDA toolkit installed from the ubuntu repositories, which installs version 11.5.

The OS and CUDA toolkits were the first things installed so I haven't played around with different versions, other Qt software, etc.

I can write CUDA code, compile it an run it just fine, the installation seems to work. However, if I try to run nsight-sys, or ncu-ui, I get the error message

Cannot mix incompatible Qt library (5.15.3) with this library (5.15.2)

What is this due to. A few days ago it actually complained comparing 5.13.3 to 5.13.2, so it seems any Qt update that happened in between updated two wrong versions?

How do I make the CUDA debugging tools run with whatever Qt library I have installed in my system?

2
  • Which Qt version do you have installed? Which version does the Cuda debian package depend on? What does ldd ncu-ui show for Qt? (Edit the question with this info).
    – hyde
    Commented Mar 20, 2023 at 19:22
  • Anyway, try apt-get source for the CUDA packages you installed, and try compiling it yourself. Searching for how to build debian packages from sources should be easy, and building should be then easy too.
    – hyde
    Commented Mar 20, 2023 at 19:24

1 Answer 1

8

This is a nsight-compute / nsight-systems package issue. As a workaround, you can follow these 4 steps to manually import the library causing the conflict (libQt5Network.so) from this Debian package:

  1. Download libqt5network5 (from Qt 5.15.2) package from Debian repository
$ wget -q 'http://ftp.de.debian.org/debian/pool/main/q/qtbase-opensource-src/libqt5network5_5.15.2+dfsg-9_amd64.deb'
  1. Extract package
$ dpkg -x libqt5network5_5.15.2+dfsg-9_amd64.deb .
  1. Copy missing library and its associated symlinks to Nsight Compute installation
$ sudo cp -P usr/lib/x86_64-linux-gnu/libQt5Network.so* /usr/lib/nsight-compute/host/linux-desktop-glibc_2_11_3-x64/
  1. Copy missing library and its associated symlinks to Nsight Systems installation
$ sudo cp -P usr/lib/x86_64-linux-gnu/libQt5Network.so* /usr/lib/nsight-systems/host-linux-x64/

After following these steps, tools will start normally.

8
  • Thank you! It works. Gonna have to learn to track specific versions myself. Commented Mar 20, 2023 at 22:11
  • Awesome, thanks for reporting this! I tracked this using strace and examined all the calls to open/openat. It is a very powerful tool to understand what a program is doing, because syscalls (+ memio in some cases) are the only way for a program to do more than computations. Commented Mar 21, 2023 at 0:51
  • This did not work for me. I am on Ubuntu 22.04, and I have the same error message, even after following these instructions. Commented Jan 29 at 11:33
  • @DimitriLesnoff can you please confirm libQtNetwork.so.5 is present in the Nsight Compute directory? Use command ls -alh /usr/lib/nsight-compute/host/linux-desktop-glibc_2_11_3-x64/libQtNetwork.so.5. If the binary is indeed present, can you please check which directories Nsight Compute is trying to look up libQtNetwork.so.5 from? Use command strace -f ncu-ui 2>&1 | grep libQt5Network.so. Thanks! Commented Jan 31 at 18:18
  • I do not have libQtNetwork.so.5 but I have: lrwxrwxrwx 1 root root 23 Jan 29 12:30 libQt5Network.so.5 -> libQt5Network.so.5.15.2 Commented Feb 1 at 16:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.