Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/3] package/gobject-introspection: fix host-linking
Date: Sun, 23 Feb 2020 21:41:55 +0100	[thread overview]
Message-ID: <20200223204155.GT8743@scaer> (raw)
In-Reply-To: <20200221224313.854089-2-aduskett@gmail.com>

Adam, All,

On 2020-02-21 14:43 -0800, aduskett at gmail.com spake thusly:
> From: Adam Duskett <Aduskett@gmail.com>
> 
> The host-variant of gobject-introspection currently links against the host
> libraries. To resolve this, specify the LD_LIBRARY_PATH in
> HOST_GOBJECT_INTROSPECTION_NINJA_ENV.
> 
> This fix has the added benefit of allowing the host gobject-introspection to
> build the host .gir, .rnc, and .typelib files, which some packages may require.
> 
> Signed-off-by: Adam Duskett <Aduskett@gmail.com>
> ---
>  package/gobject-introspection/gobject-introspection.mk | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/package/gobject-introspection/gobject-introspection.mk b/package/gobject-introspection/gobject-introspection.mk
> index 67e5e37dee..e719588437 100644
> --- a/package/gobject-introspection/gobject-introspection.mk
> +++ b/package/gobject-introspection/gobject-introspection.mk
> @@ -33,11 +33,11 @@ HOST_GOBJECT_INTROSPECTION_DEPENDENCIES = \
>  GOBJECT_INTROSPECTION_NINJA_ENV += \
>  	CC="$(TARGET_CC)"
>  
> -# Disable introspection data on the host, as it is not needed and
> -# the package will attempt to use the systems libglib2 which will fail
> -# if the systems libglib2 version is older than 2.60.
> -HOST_GOBJECT_INTROSPECTION_CONF_OPTS = \
> -	-Denable-introspection-data=false
> +# g-ir-scanner will default to /usr/bin/ld for linking if this is not set,
> +# which will cause gobject-introspection to attempt to link against the hosts
> +# libglib2
> +HOST_GOBJECT_INTROSPECTION_NINJA_ENV += \
> +	LD_LIBRARY_PATH="$(HOST_DIR)/lib"

As discussed on IRC: I am not too fond of using LD_LIBRARY_PATH.

In the past, we had problems because of LD_LIBRARY_PATH, so we ditched
it and switched to using DT_RPATH embedded in the ELF files.

The real problem here, is to understand why our HOST_LDFLAGS are not
passed down through the g-ir toolset. But as someone famously said: "We
can always expect GOI to do the wrong thing".

Still LD_LIBRARY_PATH slightly irks me... Instead, I suggest we use
LD_RUN_PATH (which existed at least as far back as binutils-2.10,
relased in 2000), and you said on IRC that it seemed to work.

Care to dig deeper and respin, please?

Thanks! :-)

Regards,
Yann E. MORIN.

>  # Use the host gi-scanner to prevent the scanner from generating incorrect
>  # elf classes.
> -- 
> 2.24.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2020-02-23 20:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-21 22:43 [Buildroot] [PATCH 0/3] package/gobject-introspection: fix meson support aduskett at gmail.com
2020-02-21 22:43 ` [Buildroot] [PATCH 1/3] package/gobject-introspection: fix host-linking aduskett at gmail.com
2020-02-23 20:41   ` Yann E. MORIN [this message]
2020-02-21 22:43 ` [Buildroot] [PATCH 2/3] package/gobject-introspection: export cc in g-ir-scanner aduskett at gmail.com
2020-02-23 20:45   ` Yann E. MORIN
2020-02-21 22:43 ` [Buildroot] [PATCH 3/3] package/meson: add gobject-introspection tools to cross-compilation.conf.in aduskett at gmail.com
2020-02-23 20:58   ` Yann E. MORIN

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=20200223204155.GT8743@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /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