Snapcraft doesn't seem to stage packages

Hi there,

I’m still trying to build a snap for gnome-commander. Now I’m using core22 with this snapcraft.yaml:

name: gnome-commander
version: 1.16.0
summary: Testversion of SNAP for GNOME Commander
description: |
  GNOME Commander is a fast, flexible and well known file manager.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode
base: core22

  # for GtkApplication registration
    interface: dbus
    bus: session
    name: org.gnome.gnome-commander

#    desktop: usr/share/applications/gnome-commander.desktop
    command: usr/local/bin/gnome-commander
#    command: bin/desktop-launch usr/bin/gnome-commander
        LD_LIBRARY_PATH: $SNAP/usr/local/lib/gnome-commander
    plugin: meson
#    meson-parameters:
#      - --setup builddir
#      - --compile -C builddir
#      - --install -C builddir
     - flex
     - cmake
     - meson
     - ninja-build
     - libglib2.0-dev
     - build-essential
     - itstool
     - libxml2-utils
     - desktop-file-utils
     - gettext
     - gawk
     - gnome-common
     - gnome-pkg-tools
     - intltool
     - libgtk2.0-dev
     - libxml2-dev
     - libsoup2.4-dev
     - libunique-dev
     - file-roller
     - libavahi-glib1
     - libgconf-2-4
     - libffi7
     - libexif-dev
     - pkg-config
      snap/gnome-commander/current/usr: usr

     - libgtk2.0-0
     - libavahi-glib1
     - libgconf-2-4
     - libunique-1.0-0
     - libglib2.0-0
     - libgtk2.0-0
     - libxml2-utils
     - libffi7
     - libxml2
     - libexif12
     - libpango-1.0-0
     - libcairo2
     - libpangocairo-1.0-0
    override-prime: |
      glib-compile-schemas usr/share/glib-2.0/schemas
      snapcraftctl prime

Building the snap works, however after installing and running the app, the following error occurs:

$ gnome-commander 
/snap/gnome-commander/x7/usr/local/bin/gnome-commander: error while loading shared libraries: cannot open shared object file: No such file or directory

Package search reveals, that the shared library is part of Ubuntu 22.04, so it should be included:

 - libgtk2.0-0

What’s going wrong here?

Best regards Stefan

Any special reason not to use the gnome extension in this snap?

Okay I’ve added the [gnome] extension. However, I get the same error message, but now it says libunique is missing… :frowning:

Oh, now I noticed that it requires old gtk versions. I’m not sure what’s the proper way to build older gnome applications with core22 – @kenvandine, what’s the best solution here?