Inspired by [0] I tried to build gobject-introspection with the following patch:
Index: gobject-introspection-1.48.0/gir/gobject-2.0.c =================================================================== --- gobject-introspection-1.48.0.orig/gir/gobject-2.0.c +++ gobject-introspection-1.48.0/gir/gobject-2.0.c @@ -1947,7 +1947,7 @@ /** * g_closure_invoke: * @closure: a #GClosure - * @return_value: (optional) (out): a #GValue to store the return + * @return_value: (optional) (in): a #GValue to store the return * value. May be %NULL if the callback of @closure * doesn't return a value. * @n_param_values: the length of the @param_values array ... but this doesn't fix the problem with lua-lgi. So there must be something else here. [0]: https://github.com/pavouk/lgi/issues/132#issuecomment-202408015 - Roland