Here is what I’ve found so far regarding including libsqlite3 in an -s deploy build.
It does work! But only under specific circumstances, and with one new issue (which is probably not applicable to your code).
In my AppDir I placed the libsqlite3 libraries (libsqlite3.so.0.8.6, libsqlite3.so.0) in /lib/x86_64-linux-gnu. Otherwise this folder was empty, just those two files, then did a -s deploy build.
Since I wasn’t sure how my application sees the “world”, I assume that a “/lib/…” path to commandoo looks relative to the /tmp/… mount folder. So I tried forcing my program to use:
/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6.
I got:
Run experimental self-contained bundle
/tmp/.mount_commanxAZCZY/usr/bin/commandoo: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
But libdl.so.2 is in the AppDir, placed there by -s deploy. Similar result if I used the libsqlite3.so.0 file. So a direct call to /lib/… fails.
So next I had my program use the APPDIR environment variable and then pathed to /lib/… from there and it worked in my dev Kubuntu 20.04. I also tried in in OpenSuse Leap VM (which will not work with a regular non-self contained AppImage) and it also worked. So that is all great.
I’m still confused as to exactly where commandoo looks when it is given paths and so while the above looks quite good and seems to be solved, I wanted a test that would be confirmation without a doubt, so I tried it in NixOS where the paths are completely different.
Earlier, with non-self contained AppImage, I could get the AppImage to work in NixOS but first one must download, from the nix Store, a program called appimage-run.
Then when invoked so: appimage-run /path/to/my.AppImage I would get:
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-juus’
But, with the -s version, I now get:
Run experimental self-contained bundle
/home/juus/.cache/appimage-run/99d70eea0f6127f63b550ccd181829302f31691c4465b096d16a6de3f34196ca/squashfs-root/AppRun: line 84: /home/juus/.cache/appimage-run/99d70eea0f6127f63b550ccd181829302f31691c4465b096d16a6de3f34196ca/squashfs-root/usr/lib64/ld-linux-x86-64.so.2: Permission denied
/home/juus/.cache/appimage-run/99d70eea0f6127f63b550ccd181829302f31691c4465b096d16a6de3f34196ca/squashfs-root/AppRun: line 84: exec: /home/juus/.cache/appimage-run/99d70eea0f6127f63b550ccd181829302f31691c4465b096d16a6de3f34196ca/squashfs-root/usr/lib64/ld-linux-x86-64.so.2: cannot execute: Permission denied
I tried everything I could think of to get it to run, but no go. So while this probably has something to do with the appimage-run program, I found it interesting that the specified file is …//usr/lib64/ld-linux-x86-64.so.2
So, I’m quite interested in all this. If I can be of further help in testing, please let me know. But it does “appear” that including libraries that are called at runtime works just fine in the general case.
As regards this issue. Yes I want to look into this. One other thing I noticed with that the code you called, it was trying to use Lazarus 1.6…, that is very, very old. The latest release is 2.0.10, with 2.1 in the works. My program build in a 1.6 Laz would in all likelyhood fail anyway.
Not only that but due to a horrific bug in 2.0.10 that affected how tooltips show (SIG fault!), I was forced to use the trunk (where the bug had been fixed) to build my app. So there is no current version of (a released) Lazarus that would build my app properly, and my program lies in a limbo between Laz versions.
But what you’ve shown me with the yaml and issues output encourages me to look into all of that and see if I can get something going. Also, an AppImage of Lazarus would be really huge I think. Better to, I think, do something like what you were trying to do.
And finally, a question: When does the -s option move out of experimental??