# Manual packaging of AppImage

**URL:** https://discourse.appimage.org/t/manual-packaging-of-appimage/2994
**Category:** Creating AppImages
**Created:** [May 28, 2023, 9:04pm UTC](https://discourse.appimage.org/t/manual-packaging-of-appimage/2994 "2023-05-28T21:04:51Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![efa](https://avatars.discourse-cdn.com/v4/letter/e/c5a1d2/32.png) [@efa](https://discourse.appimage.org/u/efa)
#### Post date: [May 28, 2023, 9:04pm UTC](https://discourse.appimage.org/t/manual-packaging-of-appimage/2994/1 "2023-05-28T21:04:51Z")

</div>

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](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:

> **[Release v0.10.09h 2023/05/23 · efa/ReSolve](https://github.com/efa/ReSolve/releases/tag/v0.10.09h)**
>
> Added:
> 
> new memory save strategy searching results, thanks @mvimercati for hints
> keep only the first N best results. Selectable with 'algo=1'
> timing code in CLI to evaluate performance of new strat...

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:

> <https://github.com/AppImage/AppImageKit/blob/master/resources/AppRun>

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

---

<div class="post-metadata">

### Author: ![efa](https://avatars.discourse-cdn.com/v4/letter/e/c5a1d2/32.png) [@efa](https://discourse.appimage.org/u/efa)
#### Post date: [May 29, 2023, 1:23pm UTC](https://discourse.appimage.org/t/manual-packaging-of-appimage/2994/2 "2023-05-29T13:23:23Z")

</div>

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

---

<div class="post-metadata">

### Author: ![probono](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/probono/32/81_2.png) [@probono](https://discourse.appimage.org/u/probono)
#### Post date: [June 18, 2023, 6:31pm UTC](https://discourse.appimage.org/t/manual-packaging-of-appimage/2994/4 "2023-06-18T18:31:29Z")

</div>

This is hard, very hard to do by hand.

Hence tools like

> **[go-appimage/src/appimagetool at master · probonopd/go-appimage](https://github.com/probonopd/go-appimage/tree/master/src/appimagetool)**
>
> master/src/appimagetool

were made.

Here are more:

> **[GitHub - AppImageCommunity/awesome-appimage: Lovingly crafted AppImage tools...](https://github.com/AppImageCommunity/awesome-appimage#deployment-tools-for-compiled-applications)**
>
> Lovingly crafted AppImage tools and resources . Contribute to AppImageCommunity/awesome-appimage development by creating an account on GitHub.

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.

---

<div class="post-metadata">

### Author: ![probono](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/probono/32/81_2.png) [@probono](https://discourse.appimage.org/u/probono)
#### Post date: [June 18, 2023, 6:32pm UTC](https://discourse.appimage.org/t/manual-packaging-of-appimage/2994/5 "2023-06-18T18:32:20Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![efa](https://avatars.discourse-cdn.com/v4/letter/e/c5a1d2/32.png) [@efa](https://discourse.appimage.org/u/efa)
#### Post date: [June 21, 2023, 12:38pm UTC](https://discourse.appimage.org/t/manual-packaging-of-appimage/2994/6 "2023-06-21T12:38:24Z")

</div>

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](https://github.com/efa/ReSolve) (GTK3)  
[GitHub - efa/Wilderland: A Hobbit Environment](https://github.com/efa/Wilderland) (SDL2)  
[GitHub - efa/AirspaceConverter: Tool to convert airspace files between different formats: OpenAir, OpenAIP, KML,/KMZ, Polish and Garmin](https://github.com/efa/AirspaceConverter) (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?

---

<div class="post-metadata">

### Author: ![probono](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/probono/32/81_2.png) [@probono](https://discourse.appimage.org/u/probono)
#### Post date: [July 8, 2023, 5:12pm UTC](https://discourse.appimage.org/t/manual-packaging-of-appimage/2994/7 "2023-07-08T17:12:11Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![probono](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/probono/32/81_2.png) [@probono](https://discourse.appimage.org/u/probono)
#### Post date: [July 8, 2023, 5:12pm UTC](https://discourse.appimage.org/t/manual-packaging-of-appimage/2994/8 "2023-07-08T17:12:55Z")

</div>

> [@efa](#):
>
> I cannot manage to generate an AppImage that work across distro (at least Debian, Fedora and Arch).

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