Running a jpackage app-image inside Flatpak

Mark Raynsford core-libs-dev at io7m.com
Sat Oct 5 14:15:58 UTC 2024


Hello!

I've been working on some tools to produce Flatpaks[1].

My thinking was that I could use jpackage to produce an app-image and
then simply copy that app-image into a Flatpak and run it that way.

This almost works, except that it seems that the actual executable
produced by jpackage doesn't work, although running (ostensibly) the
same thing the executable _would_ run via the "java" executable does
work. So for example, inside the Flatpak:

$ /app/bin/example

... Fails silently, returning a 1 exit code. But:

$ /app/lib/runtime/bin/java -p /app/lib/app/mods -m
com.io7m.example/com.io7m.example.Main

... Runs the application without issue.

Running the application with strace doesn't show anything that looks
obviously wrong to me.

I feel like the only difference between those two invocations is that
the executable goes through libapplauncher.so to load the application
.cfg file produced by jpackage.

I did notice something slightly suspicious on the libapplauncher.so
binary itself:

$ ldd /app/lib/libapplauncher.so
/app/lib/libapplauncher.so: /usr/lib/x86_64-linux-gnu/libstdc++.so.6:
version `CXXABI_1.3.15' not found (required by /app/lib/libapplauncher.so)
...

Would this be enough to cause an otherwise silent failure?

[1] https://www.flatpak.org/

-- 
Mark Raynsford | https://www.io7m.com



More information about the core-libs-dev mailing list