Search code examples
qtdebuggingcuda

Incompatible Qt libraries and the CUDA toolkit


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?


Solution

  • 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+deb11u1_amd64.deb'
    
    1. Extract package
    $ dpkg -x libqt5network5_5.15.2+dfsg-9+deb11u1_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.