Commit Graph

4 Commits

Author SHA1 Message Date
Artturin
740ebffd5a gobject-introspection: use lddtree instead of objdump as ldd wrapper
the wrong path was used in gir files because the format of objdump is
different from ldd so the regex in gobject-introspection doesn't work

https://gitlab.gnome.org/GNOME/gobject-introspection/-/blob/main/giscanner/shlibs.py#L42-57

  <namespace name="GLib"
             shared-library="/nix/store/pak6rr8wdnbwa1iq2ldvg8pa8zahl3r1-gobject-introspection-aarch64-unknown-linux-gnu-1.72.0/lib/libgobject-2.0.so.0,/nix/store/pak6rr8wdnbwa1iq2ldvg8pa8zahl3r1-gobject-introspection-aarch64-unknown-linux-gnu-1.72.0/lib/libglib-2.0.so.0"

objdump
gobject-introspection>   NEEDED               libgmodule-2.0.so.0
gobject-introspection>   NEEDED               libglib-2.0.so.0

ldd
gobject-introspection>  libgmodule-2.0.so.0 => /nix/store/ngm1wbwms13c2crsvrah2ypfj0b2yii5-glib-2.73.2/lib/libgmodule-2.0.so.0 (0x00007ffff7d6e000)
gobject-introspection>  libglib-2.0.so.0 => /nix/store/ngm1wbwms13c2crsvrah2ypfj0b2yii5-glib-2.73.2/lib/libglib-2.0.so.0 (0x00007ffff7c32000)
2022-09-07 21:24:08 +03:00
Artturin
267ef1f2de gobject-introspection: wrapper: add .libs to LD_LIBRARY_PATH for emulator
fixes issues like
libdbusmenu-gtk3-aarch64-unknown-linux-gnu> /build/libdbusmenu-16.04.0/libdbusmenu-gtk/tmp-introspect2jhtiwwn/.libs/DbusmenuGtk3-0.4:
error while loading shared libraries: libdbusmenu-glib.so.4: cannot open shared object file: No such file or directory
in non-meson builds

i think the reason we need this in all non-meson builds is because of ./pkgs/development/libraries/gobject-introspection/absolute_shlib_path.patch

see: https://github.com/void-linux/void-packages/blob/master/srcpkgs/gobject-introspection/files/g-ir-scanner-qemuwrapper
c5a14f39a6/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.72.0.bb (L74)
2022-08-30 20:13:55 +03:00
Artturin
da1ea54ad8 gobject-introspection: use objdump -p instead of prelink-rtld
Commit msg of 767e0880d4
> gobject-introspection: replace prelink-rtld with objdump -p
>
> g-i internally processes the output with regexes, and seems
> happy with what objdump is printing. It only needs to resolve
> the library name as passed to the linker to the library file name.
> Also recursive resolution (that ldd is doing and objdump is not)
> is not necessary.

Additional context section of https://github.com/NixOS/nixpkgs/issues/183071
> prelink is dropped by openembedded, support for prelink is removed from glibc,
> and itself is effectively abandoned by the upstream (yocto project).
> I think we may as well drop it rather than fix it.
> However gobject-introspection now relies on it as a runtime linker for use in cross compilation, we have to find an alternative.
2022-07-28 00:09:35 +03:00
Artturin
79d349b087 gobject-introspection: support cross-compilation
used the following as references

https://github.com/void-linux/void-packages/blob/master/srcpkgs/gobject-introspection

and

https://git.busybox.net/buildroot/tree/package/gobject-introspection

thanks void and buildroot
2022-06-11 04:51:18 +03:00