All of lore.kernel.org
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: Alexander Kanavin <alex.kanavin@gmail.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>,
	Alexander Kanavin <alex@linutronix.de>
Subject: Re: [OE-core] [PATCH 17/17] gobject-introspection: replace prelink-rtld with objdump -p
Date: Thu, 27 Jan 2022 10:09:02 -0800	[thread overview]
Message-ID: <CAMKF1soS8r7zEf7MVMwJ_QBd8jEYDg_kBvAVy61CTNwGuWHiUQ@mail.gmail.com> (raw)
In-Reply-To: <20220127102005.3050843-17-alex@linutronix.de>

On Thu, Jan 27, 2022 at 2:21 AM Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
>
> 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.
>

thanks for doing this, it further unbolts prelink from core metaddata.
Objdump -p is good, does it use it from binutils-cross ?

> Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> ---
>  meta/classes/gobject-introspection.bbclass    |  2 +-
>  ...-error-return-codes-from-ldd-wrapper.patch | 28 -------------------
>  .../gobject-introspection_1.70.0.bb           | 14 ++--------
>  3 files changed, 3 insertions(+), 41 deletions(-)
>  delete mode 100644 meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch
>
> diff --git a/meta/classes/gobject-introspection.bbclass b/meta/classes/gobject-introspection.bbclass
> index 4db1b362d9..7bf9feb0d6 100644
> --- a/meta/classes/gobject-introspection.bbclass
> +++ b/meta/classes/gobject-introspection.bbclass
> @@ -29,7 +29,7 @@ EXTRA_OEMESON:prepend:class-nativesdk = "${@['', '${GIRMESONBUILD}'][d.getVar('G
>
>  # Generating introspection data depends on a combination of native and target
>  # introspection tools, and qemu to run the target tools.
> -DEPENDS:append:class-target = " gobject-introspection gobject-introspection-native qemu-native prelink-native"
> +DEPENDS:append:class-target = " gobject-introspection gobject-introspection-native qemu-native"
>
>  # Even though introspection is disabled on -native, gobject-introspection package is still
>  # needed for m4 macros.
> diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch
> deleted file mode 100644
> index b484b5e9e6..0000000000
> --- a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch
> +++ /dev/null
> @@ -1,28 +0,0 @@
> -From f742da8b3913f4818d3f419117076afe62f4dbf4 Mon Sep 17 00:00:00 2001
> -From: Alexander Kanavin <alex.kanavin@gmail.com>
> -Date: Wed, 5 Sep 2018 16:46:52 +0200
> -Subject: [PATCH] giscanner: ignore error return codes from ldd-wrapper
> -
> -prelink-rtld, which we use instead of ldd returns 127 when it can't find a library.
> -It is not an error per se, but it breaks subprocess.check_output().
> -
> -Upstream-Status: Inappropriate [oe-core specific]
> -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> -
> ----
> - giscanner/shlibs.py | 2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> -
> -diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
> -index d67df95..80352a6 100644
> ---- a/giscanner/shlibs.py
> -+++ b/giscanner/shlibs.py
> -@@ -102,7 +102,7 @@ def _resolve_non_libtool(options, binary, libraries):
> -             args.extend(['otool', '-L', binary.args[0]])
> -         else:
> -             args.extend(['ldd', binary.args[0]])
> --        output = subprocess.check_output(args)
> -+        output = subprocess.run(args, check=False, stdout=subprocess.PIPE).stdout
> -         if isinstance(output, bytes):
> -             output = output.decode("utf-8", "replace")
> -
> diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.70.0.bb b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.70.0.bb
> index d4ee03d33c..4f72a33bfa 100644
> --- a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.70.0.bb
> +++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.70.0.bb
> @@ -14,7 +14,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c434e8128a68bedd59b80b2ac1eb1c4a \
>                      "
>
>  SRC_URI = "${GNOME_MIRROR}/${BPN}/${@oe.utils.trim_version("${PV}", 2)}/${BPN}-${PV}.tar.xz \
> -           file://0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch \
>             file://0001-build-Avoid-the-doctemplates-hack.patch \
>             "
>
> @@ -33,9 +32,7 @@ DEPENDS += " libffi zlib glib-2.0 python3 flex-native bison-native autoconf-arch
>  # target build needs qemu to run temporary introspection binaries created
>  # on the fly by g-ir-scanner and a native version of itself to run
>  # native versions of its own tools during build.
> -# Also prelink-rtld is used to find out library dependencies of introspection binaries
> -# (standard ldd doesn't work when cross-compiling).
> -DEPENDS:append:class-target = " gobject-introspection-native qemu-native prelink-native"
> +DEPENDS:append:class-target = " gobject-introspection-native qemu-native"
>
>  # needed for writing out the qemu wrapper script
>  export STAGING_DIR_HOST
> @@ -55,13 +52,6 @@ EXTRA_OEMESON:class-target = " \
>      ${@'-Dgir_dir_prefix=${libdir}' if d.getVar('MULTILIBS') else ''} \
>  "
>
> -# Need to ensure ld.so.conf exists so prelink-native works
> -# both before we build and if we install from sstate
> -do_configure[prefuncs] += "gobject_introspection_preconfigure"
> -python gobject_introspection_preconfigure () {
> -    oe.utils.write_ld_so_conf(d)
> -}
> -
>  do_configure:prepend:class-native() {
>          # Tweak the native python scripts so that they don't refer to the
>          # full path of native python binary (the solution is taken from glib-2.0 recipe)
> @@ -113,7 +103,7 @@ EOF
>          # for a different architecture
>          cat > ${B}/g-ir-scanner-lddwrapper << EOF
>  #!/bin/sh
> -prelink-rtld --root=$STAGING_DIR_HOST "\$@"
> +$OBJDUMP -p "\$@"
>  EOF
>          chmod +x ${B}/g-ir-scanner-lddwrapper
>
> --
> 2.20.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#161039): https://lists.openembedded.org/g/openembedded-core/message/161039
> Mute This Topic: https://lists.openembedded.org/mt/88718372/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


  reply	other threads:[~2022-01-27 18:09 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27 10:19 [PATCH 01/17] mesa: fold mesa-gl variant into the main recipe using mcextend class Alexander Kanavin
2022-01-27 10:19 ` [PATCH 02/17] bind: upgrade 9.16.24 -> 9.16.25 Alexander Kanavin
2022-01-27 10:19 ` [PATCH 03/17] ifupdown: upgrade 0.8.36 -> 0.8.37 Alexander Kanavin
2022-01-27 10:19 ` [PATCH 04/17] ethtool: upgrade 5.15 -> 5.16 Alexander Kanavin
2022-01-27 10:19 ` [PATCH 05/17] webkitgtk: upgrade 2.34.3 -> 2.34.4 Alexander Kanavin
2022-01-27 10:19 ` [PATCH 06/17] debianutils: upgrade 5.5 -> 5.7 Alexander Kanavin
2022-01-27 10:19 ` [PATCH 07/17] diffoscope: upgrade 200 -> 201 Alexander Kanavin
2022-01-27 10:19 ` [PATCH 08/17] libbsd: upgrade 0.11.3 -> 0.11.5 Alexander Kanavin
2022-01-27 10:19 ` [PATCH 09/17] libical: upgrade 3.0.12 -> 3.0.13 Alexander Kanavin
2022-01-27 10:19 ` [PATCH 10/17] wpa-supplicant: update 2.9 -> 2.10 Alexander Kanavin
2022-01-27 10:19 ` [PATCH 11/17] zstd: update 1.5.0 -> 1.5.2 Alexander Kanavin
2022-01-27 18:56   ` [OE-core] " Khem Raj
2022-01-27 19:51     ` Alexander Kanavin
     [not found]     ` <16CE388D38E12D03.16917@lists.openembedded.org>
2022-01-27 20:09       ` Alexander Kanavin
2022-01-27 21:01         ` Khem Raj
2022-01-27 10:20 ` [PATCH 12/17] rust: update 1.58.0 -> 1.58.1 Alexander Kanavin
2022-01-27 10:20 ` [PATCH 13/17] gdb: update 11.1 -> 11.2 Alexander Kanavin
2022-01-27 18:12   ` [OE-core] " Khem Raj
2022-01-27 10:20 ` [PATCH 14/17] ltp: update 20210927 -> 20220121 Alexander Kanavin
2022-01-27 17:21   ` Petr Vorel
2022-01-27 19:25     ` Alexander Kanavin
2022-01-27 20:53       ` Petr Vorel
2022-01-27 10:20 ` [PATCH 15/17] gnutls: update 3.7.2 -> 3.7.3 Alexander Kanavin
2022-01-27 10:20 ` [PATCH 16/17] libusb1: correct SRC_URI Alexander Kanavin
2022-01-27 10:20 ` [PATCH 17/17] gobject-introspection: replace prelink-rtld with objdump -p Alexander Kanavin
2022-01-27 18:09   ` Khem Raj [this message]
2022-01-27 19:26     ` [OE-core] " Alexander Kanavin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMKF1soS8r7zEf7MVMwJ_QBd8jEYDg_kBvAVy61CTNwGuWHiUQ@mail.gmail.com \
    --to=raj.khem@gmail.com \
    --cc=alex.kanavin@gmail.com \
    --cc=alex@linutronix.de \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.