after installing Snap gnome-commander (GTK2-App) the application is unable to start:
/snap/gnome-commander/x17/usr/bin/gnome-commander: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26’ not found (required by /snap/gnome-commander/x17/usr/bin/gnome-commander)
How can I fix this?
The error means that the binary was built against a newer libstdc++ than is included in the base snap you’re targeting. Is the Snapcraft project for your snap public? If so, that might help in diagnosing the problem.
no problem I could make it public. By now it is in devmode. It is meant to run in classic mode as it is a file manager (and as such needs proprer rights on the system).
Couldn’t upload to snap store (external symlinnk errors?!?) - you can find my try here:
i’m pretty sure james wanted to see your source tree, not a binary build …
Okay, I’ve changed this to my snapcraft.yaml in use. Sources are retrieved automatically from https://gitlab.gnome.org/GNOME/gnome-commander/
They’re built with autotools.
well … i meant the source tree containing your snapcraft.yaml file
push it somewhere to github or if you do not have a github account, use a paste.ubuntu.com to paste the snapcraft.yaml file and give us the link here …
start with changing this to:
command: snap/command-chain/desktop-launch usr/local/bin/gnome-commander
so the execution environment gets actually set up properly …
Not needed. The
gnome-3-28 extension does this already.
that is not my experience …
looking closer at this snapcraft.yaml you are forcefully copying libc and libstdc++ files around from the build host, dont do hat (remove both, “override-prime” and “override-stage”) the libc must come from your base snap …
Okay, I can install and run it afterwards. However, I get a core dump with many errors. I’ve pasted the output here:
i’D start with dropping all the stage-packages (just comment out the whole block) …
then do a re-build, snapcraft will actually assemble the list of the actually required stage packages for you and print it at the end of the build process in a copy/paste-able format, only include that list, i think there is a lot of duplication in your snap (against what the gnome extension already provides at runtime)
EDIT: oh, and also drop the
configflags: ["--prefix=/usr/local"] line thats just moving stuff in a place thats possibly not searched by default … snapcraft already sets a proper prefix for you at build time …
I’m copying just because of the libstdc++ error (GLIBCXX version). The source won’t compile with gcc8.4. I’m using gcc9.3, which works. The base snap installs an older version, which breaks starting the snap from the beginning.
well, that wont work … if you need something newer, you also need to use a newer base snap … mixing libc versions can not work …
using gcc9.x shouldnt block you from using the correct libc, your binary will be linked against whatever libc6-dev was at build time and that lib must come from the same version the base snap is from (for core18 this is 18.04 … for core20 it is 20.04)
So I’m fully stuck here. core18 doesn’t include a working version and core20 won’t let me include the “old” gtk2 dependancies.
This is somewhat strange. The GLIBCXX error doesn’t come up no more - version of libstdc++ is 6.0.25?!?
Okay, so I can agrre with you.
Okay, I’v done as you suggested, but the core dump shows up again (see above):