Compiling Gtk UI app with PackageCompiler

Hello all,
I wrote a little desktop application with a Gtk frontend, it works fine in general, just the start up time is long. After that it works nicely. Also I would like to run it on machines without an Julia environment.

Therefore I would like to create a relocateable app. Unfortunately, after creating an app with PackageCompiler (no errors during compilation), I get the following error:

$ ./compiled/bin/FormEvaluationTool 
Gtk-Message: 21:28:08.829: Failed to load module "xapp-gtk3-module"

(FormEvaluationTool:7974): Gtk-CRITICAL **: 21:28:09.178: gtk_builder_get_object: assertion 'GTK_IS_BUILDER (builder)' failed
UndefRefError: access to undefined reference

I think the first warning about “xapp-gtk3-module” is not relevant, but I’m not sure if and how I can fix the other?

Also the Gtk.jl documentation states:

On very old Julia versions, you can use PackageCompiler. Be aware that this has downsides and should not be necessary on modern versions of Julia.

But I’m not sure what that’s supposed to mean, because the link about the drawbacks just gives me an 404.

1 Like