Manual packaging of AppImage

hi,
I want learn how to manual packaging linux binaries as AppImages.

I’m following guide at:
https://docs.appimage.org/packaging-guide/manual.html
and for a my GTK3 app I created a package with all deps and deps of deps in ./lib
and hand written the AppRun script. All is available at:

On my own distro (Debian 11) this always work.

I tested on Debian 10 and do not work.
Running the CLI app work with a simple PATH and LD_LIBRARY_PATH that point to ./lib
(The CLI app depend on libm and libc only)

While running the GUI always generate the error:
*** stack smashing detected ***: terminated

I tried to use also the AppRun available at:

same result.

Running using strace I got this:
strace: relocation error: strace: symbol clock_gettime version GLIBC_2.2.5 not defined in file librt.so.1 with link time reference

Note: On Debian 11 libm depend on glibc 2.29, and should be the one packaged. I do not know why look for 2.2.5

Any hint?
thank you

NOTE: I have not used linuxdeploy, I manually collected the deps with ldd and cp

This is hard, very hard to do by hand.

Hence tools like

were made.

Here are more:

These tools make it much easier. If you really want to do it by hand, then you basically need to do manually what these tools are doing.

Regarding your error, this is a version mismatch typically happening when you are trying to use binaries that were built on a system newer than the target system you want to run them on.

hi, thank you for your reaply.

As now I solved the error compiling on a Debian 10 and so work also on Debian 11, you are right.

About packaging, as now I tryed to use ‘linuxdeploy’ and it generate an appimage of 33 MB that seems work. It package lot of stuff, I’m not sure all are needed. Manual packaging let me keep control of single files to put in the package and reduce the size to about 16 MB (test made on ReSolve below). I’m trying to understand what are the other files and if are really necessary. For example my apps:
GitHub - efa/ReSolve: find a formula result using list of discrete values only (GTK3)
GitHub - efa/Wilderland: A Hobbit Environment (SDL2)
GitHub - efa/AirspaceConverter: Tool to convert airspace files between different formats: OpenAir, OpenAIP, KML,/KMZ, Polish and Garmin (QT, only contributor/packager)
are now are english only, and the GUI are very simple. The core is a calculation (simulation in case of Wilderland) engine, that are available also via CLI, so I want to keep size as low as possible.
But my future target can be to generate an appImage for GIMP thar for sure can be very hard, and need lot of help.

About the links you supplied, are you suggesting to use which packaging tools?
The one in GO or ‘linuxdeploy’ ?

About 32 bit, I want still build for x86, and I regularly build 32 bit binary. I cannot manage to generate an AppImage that work across distro (at least Debian, Fedora and Arch). How do you do that?

I don’t recommend a particular tool, they all have their use cases.
go-appimage is the one I use and develop, but the others cover specific use cases, too. So it’s best to try a few and pick the one you like best.

Well, that’s the point of making an AppImage. If that doesn’t work, then your AppImage is broken. Try another tool then.