Qt6 snapped app on core24: SVG icons not displayed though opened

Hello, I have almost successfully switched my Qt6 app to core24 but there is a little missing detail: SVG icons are not displayed though they are opened (with --strace, i see open() returning a positive integer file descriptor).

Here is the relevant part of my snapcraft.yaml:

base: core24
...
stage-packages:
     - gnome-icon-theme
     - librsvg2-common
...
apps:
    redrose:
        extensions: [gnome]
        environment:
            QT_PLUGIN_PATH: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qt6/plugins
layout:
    /usr/local/share:
        bind: $SNAP/usr/local/share

and the filtered strace:

$ snap run --strace redrose 2>&1 | grep redrose.svg
[pid 17374] openat(AT_FDCWD, "/usr/local/share/icons/hicolor/scalable/apps/redrose.svg", O_RDONLY|O_CLOEXEC) = 29

I suspect librsvg2-common presence is not enough. Maybe something missing in the Qt6 side ?

Ok \o/ found the solution: I missed libqt6svg6 at stage phase. This is now fixed !

2 Likes