Snap fails to run with GLIBC error

well … i meant the source tree containing your snapcraft.yaml file :slight_smile:

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 …

Okay, here it comes:

TIA

schollsky

apps:
  gnome-commander:
    command: usr/local/bin/gnome-commander

start with changing this to:

apps:
  gnome-commander:
    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.

of what exactly ?

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):

can you show your new snapcraft.yaml ?
(the code is still looking in the hosts /usr/local for things instead of $SNAP/usr or the /usr of the base snap)

1 Like

You may find it here:

Forgot staging required libraries, new try:

I tried targeting as follows:

[–prefix=$SNAP]

When compiilng, this leads to an error:

libtool: error: only absolute run-paths are allowed

[–prefix=usr/]

fails with configure: error: expected an absolute directory name for --prefix: usr

What can I do?

just drop the configflags line completely, snapcraft will DTRT …

Tried that, got the following core dump: