Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Romain Naour <romain.naour@smile.fr>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>,
	Adam Duskett <aduskett@gmail.com>,
	"buildroot@buildroot.org" <buildroot@buildroot.org>
Subject: Re: [Buildroot] outdated libiberty and prelink-cross support
Date: Wed, 8 Feb 2023 16:53:30 +0100	[thread overview]
Message-ID: <20230208165330.43c145f3@windsurf> (raw)
In-Reply-To: <3f3d266c-2f21-197c-29b7-fff3e230e97a@smile.fr>

Hello,

+Yann and Adam, with questions/help needed below :)

On Wed, 2 Nov 2022 14:05:26 +0100
Romain Naour <romain.naour@smile.fr> wrote:

> I was looking at host-binutils-2.38 issue in the autobuilder [1].
> The issue appear only when host-libiberty is built before host-binutils
> (Binutils 2.38 only).
> 
> It seems that libiberty package is still based on binutils 2.32 release and
> seems to be updated.
> 
> host-libiberty is currently used by host-gdb and host-prelink-cross packages.
> 
> About the prelink-cross package, it come from the Yocto project [2] but the
> support seems halted. Also the Glibc project will remove prelink support for the
> upcoming 2.37 release [3].
> 
> The annoying part is "Prelink-cross emulates a runtime linker for a given
> sysroot. This is necessary to allow gobject-introspection to build its typelib
> files during cross-compiling." [4]
> 
> host-prelink-cross is currently used by dracut and gobject-introspection packages.

I had a look, and there are things at two different levels that can be
done.

First, we need to remove the package/libiberty/ package. libiberty is
currently used by host-gdb and host-prelink-cross:

* For host-gdb, the commit log says that the host libiberty might be
  picked up so we need to build our own. This is weird because
  libiberty is shipped in the gdb tarball. Yann, when you applied
  f0a583ddc4c2cab121330284e316f54229dee492, do you remember if you
  looked at why GDB wasn't picking up its own libiberty? Also, there is
  no autobuilder failure, so we don't really know under what conditions
  the problem can be reproduced.

* For host-prelink-cross, it in fact doesn't need host-libiberty. It
  links against it, but apparently, the only functions it uses from
  libiberty are htab_find_slot() and htab_try_create(), and both are
  provided by src/hashtab.c in prelink-cross, which was copy/pasted
  from libiberty, most likely to avoid the dependency. So with a bit of
  effort in host-prelink-cross, the dependency on host-libiberty could
  be removed.

Then, the second level is about host-prelink-cross itself. It is used
by only two packages, so let's have a look:

* For gobject-instrospection, it is no longer needed: openembedded-core
  stopped using it in
  https://github.com/openembedded/openembedded-core/commit/767e0880d4d729e659e859dd99c1cdb084b8ba51.
  It simply uses "objdump -p" instead. It also allows to remove a patch
  from gobject-introspection, so overall it seems like a good thing.

* For dracut, the usage is pretty much the same, and a small wrapper
  around objdump -p would most likely be able to emulate the behavior
  lf prelink-rtld to list the libraries that a binary depends on.

So there's a bit of work for sure, but this work would allow to remove
both host-libiberty and host-prelink-cross, which are both weird
packages that will inevitably cause problems.

My main concerns are:

(1) How to reproduce the host-gdb issue that caused the addition of the
    host-liberty dependency

(2) How to test gobject-introspection in a simple way. There is no
    runtime test for it, I have no idea what is the simplest test that one
    can do to verify the proper functionality of gobject-introspection
    after we do the above changes.

Best regards,

Thomas Petazzoni
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-02-08 15:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02 13:05 [Buildroot] outdated libiberty and prelink-cross support Romain Naour
2023-02-08 15:53 ` Thomas Petazzoni via buildroot [this message]
2023-02-08 16:10   ` Romain Naour

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=20230208165330.43c145f3@windsurf \
    --to=buildroot@buildroot.org \
    --cc=aduskett@gmail.com \
    --cc=romain.naour@smile.fr \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yann.morin.1998@free.fr \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox