Qbittorrent-arnatious: Autotools not finding qt sdk from kde frameworks sdk snap

Trying to update the qbittorrent-arnatious snap after a recent update seemingly broke the CMake build. Moved back to autotools (the recommended method upstream) and have since been met with a puzzling error from possibly the kde-frameworks-5-qt-5-15-3-core20-sdk snap.

I cannot use the kde-neon extension, which may fix this, due to it not working on arm64. Since I’m using core20, I opted to copy the resulting snapcraft expand-extensions with the extension and remove the core18 related lines that cause incompatibility with arm64.

Resulting snapcraft.yaml file

Despite installing the kde-frameworks snaps, qmake was not found when building the qbittorrent part. Dropping into debug, I found it was not on path, but there was in fact a qmake executable within the kde-frameworks-…-sdk snap at /snap/kde-frameworks-5-qt-5-15-3-core20-sdk/6/usr/lib/qt5/bin/qmake.

I checked the configure script and it was using pkg-config to detect qmake via Qt5Core, so I found the location of Qt5Core.pc in the content snap (/snap/kde-frameworks-5-qt-5-15-3-core20-sdk/6/usr/lib/x86_64-linux-gnu/pkgconfig/Qt5Core.pc) and added it to PKG_CONFIG_PATH, which successfully found the module. On further inspection, however, the .pc file is referring to the staging area, which does not have the files it expects in it.


qt_config=shared shared release c++11 c++14 c++17 c++1z concurrent dbus reduce_exports reduce_relocations release_tools stl properties animation textcodec big_codecs clock-monotonic codecs itemmodel proxymodel concatenatetablesproxymodel textdate datestring doubleconversion eventfd filesystemiterator filesystemwatcher gestures glib identityproxymodel inotify library mimetype process statemachine regularexpression settings sharedmemory sortfilterproxymodel stringlistmodel systemsemaphore temporaryfile threadsafe-cloexec translation transposeproxymodel xmlstream xmlstreamreader xmlstreamwriter

Name: Qt5 Core
Description: Qt Core module
Version: 5.15.3
Libs: -lQt5Core 
Cflags: -DQT_CORE_LIB -I${includedir}/QtCore -I${includedir}

What’s going on here? Shouldn’t the kde framework snaps provide access in some way to the libraries without manually pointing at the /snap/ directory and filling out all the pkg-config elements?

I imagine the cmake root dir variable set by the extension sidesteps this, and I experience a different failure in using cmake that may be upstream, relating to finding OpenSSL libraries (issue here https://github.com/qbittorrent/qBittorrent/issues/16416).