When Thaddy talks its sometimes rude, sometimes unpleasant. Never rubbish !
I have wasted most of a day trying to get a gtk2 version of my app as an AppImage. Because, Robert, that is what you want. An AppImage is built by examining your ready to run binary and gathering together "all" the
required libraries, compressing them up and adding code to extract, as required, at run time. It (obviously) gets the libraries from the system its built on, it does not use the libraries from the machine it runs on. It does have to use local infrastructure sooner or later of course.
My version, here, bundles some 257 libraries including the xcb set and, as I understand it, the gtk2 set. Sadly, it does not work ! Seems the linuxdeploy people do not put a high priority on gtk2 ! But useful to see what it is trying to build. The AppDir is where all the libraries are assembled before compression so, while we know it is incomplete, its an indication of the size of a statically linked binary.
dbannon@dell:~/AppImageGtk2/tomboy-ng/tomboy-ng_0.42b-1$ ls -l tomboy-ng-x86_64.AppImage
-rwxr-xr-x 1 dbannon dbannon 27429368 Mar 9 12:53 tomboy-ng-x86_64.AppImage
dbannon@dell:~/AppImageGtk2/tomboy-ng/tomboy-ng_0.42b-1$ du -hs ../AppDir/
94M ../AppDir/
Remember, this is for my app, it obviously uses only a subset of GTK2, a general purpose library, to cater for all Lazarus apps would be a lot bigger. The AppImage itself is smaller due to compression, proving, to me, beyond all doubt its a better solution than static linking ! Still a dopey solution, but I make Qt5/6 AppImages available and they do get some downloads.
Davo