Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] meson for host package with executables doesn't work.
@ 2018-10-11  9:25 Daniel Palmer
  2018-10-11 10:01 ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Palmer @ 2018-10-11  9:25 UTC (permalink / raw)
  To: buildroot

Hi all,

There don't seem to be any in-tree packages that use meson for host
packages so maybe this hasn't come up before but as far as I can tell
it doesn't work.
In my case I have an out of tree package that requires json-glib to be
installed for the host as well as the target so I've changed the
makefile to do that as follows:

diff --git a/package/json-glib/json-glib.mk b/package/json-glib/json-glib.mk
index 77c0c4532374..4cd754a3a6c5 100644
--- a/package/json-glib/json-glib.mk
+++ b/package/json-glib/json-glib.mk
@@ -17,4 +17,9 @@ JSON_GLIB_DEPENDENCIES = \
       host-pkgconf \
       libglib2

+HOST_JSON_GLIB_DEPENDENCIES = \
+        host-pkgconf \
+        host-libglib2
+
$(eval $(meson-package))
+$(eval $(host-meson-package))

That was working fine a few months ago but now I get this:

***
*** ERROR: package host-json-glib installs executables without proper RPATH:
***   <snip>/buildroot-firmware/output/host/bin/json-glib-validate
***   <snip>/buildroot-firmware/output/host/bin/json-glib-format

As far as I know meson strips RPATH on install and there is no way to
stop it doing that outside of adjusting the build file.

Does anyone have any ideas about how this should be fixed?

Cheers,

Daniel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] meson for host package with executables doesn't work.
  2018-10-11  9:25 [Buildroot] meson for host package with executables doesn't work Daniel Palmer
@ 2018-10-11 10:01 ` Thomas Petazzoni
  2018-10-11 11:42   ` Daniel Palmer
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2018-10-11 10:01 UTC (permalink / raw)
  To: buildroot

Hello Daniel,

On Thu, 11 Oct 2018 18:25:39 +0900, Daniel Palmer wrote:

> That was working fine a few months ago but now I get this:
> 
> ***
> *** ERROR: package host-json-glib installs executables without proper RPATH:
> ***   <snip>/buildroot-firmware/output/host/bin/json-glib-validate
> ***   <snip>/buildroot-firmware/output/host/bin/json-glib-format
> 
> As far as I know meson strips RPATH on install and there is no way to
> stop it doing that outside of adjusting the build file.
> 
> Does anyone have any ideas about how this should be fixed?

We really need the host tools to have an rpath pointing to
$(HOST_DIR)/lib, otherwise they won't pick up the libraries that we
have installed in $(HOST_DIR)/lib.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] meson for host package with executables doesn't work.
  2018-10-11 10:01 ` Thomas Petazzoni
@ 2018-10-11 11:42   ` Daniel Palmer
  2018-10-11 14:31     ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Palmer @ 2018-10-11 11:42 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

Looking through the history in git it looks like this was broken by
commit a03f46ca6e9f43028003aedc92f1a1204ae7480f that bumped the
version of meson and removed a patch that stops meson from stripping
the RPATH on host executables. I guess because there are no packages
in-tree that used it (I couldn't find host-meson-package in any
packages) no one noticed.

Cheers,

Daniel
On Thu, 11 Oct 2018 at 19:01, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello Daniel,
>
> On Thu, 11 Oct 2018 18:25:39 +0900, Daniel Palmer wrote:
>
> > That was working fine a few months ago but now I get this:
> >
> > ***
> > *** ERROR: package host-json-glib installs executables without proper RPATH:
> > ***   <snip>/buildroot-firmware/output/host/bin/json-glib-validate
> > ***   <snip>/buildroot-firmware/output/host/bin/json-glib-format
> >
> > As far as I know meson strips RPATH on install and there is no way to
> > stop it doing that outside of adjusting the build file.
> >
> > Does anyone have any ideas about how this should be fixed?
>
> We really need the host tools to have an rpath pointing to
> $(HOST_DIR)/lib, otherwise they won't pick up the libraries that we
> have installed in $(HOST_DIR)/lib.
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] meson for host package with executables doesn't work.
  2018-10-11 11:42   ` Daniel Palmer
@ 2018-10-11 14:31     ` Thomas Petazzoni
  2018-10-11 15:18       ` Daniel Palmer
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2018-10-11 14:31 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 11 Oct 2018 20:42:30 +0900, Daniel Palmer wrote:

> Looking through the history in git it looks like this was broken by
> commit a03f46ca6e9f43028003aedc92f1a1204ae7480f that bumped the
> version of meson and removed a patch that stops meson from stripping
> the RPATH on host executables. I guess because there are no packages
> in-tree that used it (I couldn't find host-meson-package in any
> packages) no one noticed.

Indeed, it could very well be due to this. Could you check if re-adding
this patch makes things work again ? If it does, please submit a patch
re-adding the patch :-)

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] meson for host package with executables doesn't work.
  2018-10-11 14:31     ` Thomas Petazzoni
@ 2018-10-11 15:18       ` Daniel Palmer
  2018-10-11 21:11         ` Arnout Vandecappelle
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Palmer @ 2018-10-11 15:18 UTC (permalink / raw)
  To: buildroot

Hi,

I forward ported the patch to the version of meson that is in buildroot now
and the problem is resolved. I'll submit a patch when I have some time
over the weekend.

Thanks,

Daniel
On Thu, 11 Oct 2018 at 23:31, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello,
>
> On Thu, 11 Oct 2018 20:42:30 +0900, Daniel Palmer wrote:
>
> > Looking through the history in git it looks like this was broken by
> > commit a03f46ca6e9f43028003aedc92f1a1204ae7480f that bumped the
> > version of meson and removed a patch that stops meson from stripping
> > the RPATH on host executables. I guess because there are no packages
> > in-tree that used it (I couldn't find host-meson-package in any
> > packages) no one noticed.
>
> Indeed, it could very well be due to this. Could you check if re-adding
> this patch makes things work again ? If it does, please submit a patch
> re-adding the patch :-)
>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] meson for host package with executables doesn't work.
  2018-10-11 15:18       ` Daniel Palmer
@ 2018-10-11 21:11         ` Arnout Vandecappelle
  0 siblings, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2018-10-11 21:11 UTC (permalink / raw)
  To: buildroot



On 11/10/18 17:18, Daniel Palmer wrote:
> Hi,
> 
> I forward ported the patch to the version of meson that is in buildroot now
> and the problem is resolved. I'll submit a patch when I have some time
> over the weekend.

 Upstream claims that the issue is fixed [1][2], so I would prefer to work with
upstream to actually fix the issue upstream. I've commented on the issue (github
doesn't allow reopening).


 Regards,
 Arnout

[1] https://github.com/mesonbuild/meson/issues/314
[2]
https://github.com/mesonbuild/meson/commit/e3757e3d3cf24327c89dd3fc40f6cc933510f676



> 
> Thanks,
> 
> Daniel
> On Thu, 11 Oct 2018 at 23:31, Thomas Petazzoni
> <thomas.petazzoni@bootlin.com> wrote:
>>
>> Hello,
>>
>> On Thu, 11 Oct 2018 20:42:30 +0900, Daniel Palmer wrote:
>>
>>> Looking through the history in git it looks like this was broken by
>>> commit a03f46ca6e9f43028003aedc92f1a1204ae7480f that bumped the
>>> version of meson and removed a patch that stops meson from stripping
>>> the RPATH on host executables. I guess because there are no packages
>>> in-tree that used it (I couldn't find host-meson-package in any
>>> packages) no one noticed.
>>
>> Indeed, it could very well be due to this. Could you check if re-adding
>> this patch makes things work again ? If it does, please submit a patch
>> re-adding the patch :-)
>>
>> Thanks,
>>
>> Thomas
>> --
>> Thomas Petazzoni, CTO, Bootlin
>> Embedded Linux and Kernel engineering
>> https://bootlin.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-10-11 21:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-11  9:25 [Buildroot] meson for host package with executables doesn't work Daniel Palmer
2018-10-11 10:01 ` Thomas Petazzoni
2018-10-11 11:42   ` Daniel Palmer
2018-10-11 14:31     ` Thomas Petazzoni
2018-10-11 15:18       ` Daniel Palmer
2018-10-11 21:11         ` Arnout Vandecappelle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox