Running a jpackage app-image inside Flatpak

Alexey Semenyuk alexey.semenyuk at oracle.com
Mon Oct 14 16:12:14 UTC 2024


Hi Mark,

Try running app launcher with JPACKAGE_DEBUG env variable set to "true":

$ env JPACKAGE_DEBUG=true /app/bin/example


It will produce debug output in the console that might give a clue what 
went wrong.

- Alexey


On 10/5/2024 10:15 AM, Mark Raynsford wrote:
> 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/
>



More information about the core-libs-dev mailing list