[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-core
Subject: Re: [OE-core] [RFC] meson needs a pkg-config wrapper script
From: "Joel Winarske" <joel.winarske () gmail ! com>
Date: 2021-11-30 22:37:49
Message-ID: CABKMkP+GsTCFyCqB8RihY+u17Y0bts20OpgaoP0d-hZ=Qwi8tQ () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Based on my testing, if PKG_CONFIG_SYSROOT_DIR is set or not makes zero
difference on the outcome. I suspect this is related to how pkg-config is
launched by meson.
Looking at the meson source tree, in all ci/test cross compile scenarios
they reference a pkg-config wrapper. No cross compile scenario I see
referencing the 'pkgconfig' key uses a bare pkg-config.
cross/armclang-linux.txt:#pkgconfig =
'/usr/bin/arm-linux-gnueabihf-pkg-config'
cross/linux-mingw-w64-32bit.txt:pkgconfig =
'/usr/bin/i686-w64-mingw32-pkg-config'
cross/linux-mingw-w64-64bit.txt:pkgconfig =
'/usr/bin/x86_64-w64-mingw32-pkg-config'
cross/ubuntu-armhf.txt:pkgconfig =
'/usr/bin/arm-linux-gnueabihf-pkg-config'
test cases/unit/33 cross file overrides always
args/ubuntu-armhf-overrides.txt:pkgconfig =
'/usr/bin/arm-linux-gnueabihf-pkg-config'
test cases/unit/36 exe_wrapper behaviour/broken-cross.txt:pkgconfig =
'/usr/bin/x86_64-w64-mingw32-pkg-config'
I think adding a wrapper makes sense.
5.2 Tool Calling Conventions -
https://autotools.io/pkgconfig/cross-compiling.html
On Tue, Nov 30, 2021 at 12:13 PM Alexander Kanavin <alex.kanavin@gmail.com>
wrote:
> On Tue, 30 Nov 2021 at 21:00, Joel Winarske <joel.winarske@gmail.com>
> wrote:
>
> > Yes, if the sys_root key value in meson.cross is present
> > PKG_CONFIG_SYSROOT_DIR gets set. Honister patch I confirmed with:
> >
> > https://github.com/jwinarske/manifests/blob/honister/rpi64/0001-Add-sys_root-to-properties-section.patch
> >
> > The issue is that meson doesn't pass PKG_CONFIG_SYSROOT_DIR to the shell
> > environment that runs pkg-config, as with the pkg-config sandbox test it
> > does work.
> >
>
> Both meson source code and its documentation indicate otherwise - if you
> set sys_root property, it will get passed to pkg-config via environment as
> PKG_CONFIG_SYSROOT_DIR:
>
> https://github.com/mesonbuild/meson/blob/master/mesonbuild/dependencies/pkgconfig.py#L121
>
> Alex
>
>
[Attachment #5 (text/html)]
<div dir="ltr"><div>Based on my testing, if PKG_CONFIG_SYSROOT_DIR is set or not \
makes zero difference on the outcome. I suspect this is related to how pkg-config \
is launched by meson.<br></div><div><br></div><div>Looking at the meson source tree, \
in all ci/test cross compile scenarios they reference a pkg-config wrapper. No \
cross compile scenario I see referencing the 'pkgconfig' key uses a bare \
pkg-config.<br></div><div><br></div><div> cross/armclang-linux.txt:#pkgconfig = \
'/usr/bin/arm-linux-gnueabihf-pkg-config'<br> \
cross/linux-mingw-w64-32bit.txt:pkgconfig = \
'/usr/bin/i686-w64-mingw32-pkg-config'<br> \
cross/linux-mingw-w64-64bit.txt:pkgconfig = \
'/usr/bin/x86_64-w64-mingw32-pkg-config'<br> \
cross/ubuntu-armhf.txt:pkgconfig = \
'/usr/bin/arm-linux-gnueabihf-pkg-config'<br> test cases/unit/33 cross \
file overrides always args/ubuntu-armhf-overrides.txt:pkgconfig =
'/usr/bin/arm-linux-gnueabihf-pkg-config'<br> test cases/unit/36 \
exe_wrapper behaviour/broken-cross.txt:pkgconfig = \
'/usr/bin/x86_64-w64-mingw32-pkg-config'</div><div><br></div><div><div></div><div>I \
think adding a wrapper makes sense.</div><div><br></div><div>5.2 Tool Calling \
Conventions - <a href="https://autotools.io/pkgconfig/cross-compiling.html">https://autotools.io/pkgconfig/cross-compiling.html</a></div></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 30, 2021 at 12:13 \
PM Alexander Kanavin <<a \
href="mailto:alex.kanavin@gmail.com">alex.kanavin@gmail.com</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 30 Nov 2021 at 21:00, \
Joel Winarske <<a href="mailto:joel.winarske@gmail.com" \
target="_blank">joel.winarske@gmail.com</a>> wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Yes, if the sys_root key value \
in meson.cross is present PKG_CONFIG_SYSROOT_DIR gets set. Honister patch I \
confirmed with:<br><a \
href="https://github.com/jwinarske/manifests/blob/honister/rpi64/0001-Add-sys_root-to-properties-section.patch" \
target="_blank">https://github.com/jwinarske/manifests/blob/honister/rpi64/0001-Add-sys_root-to-properties-section.patch</a></div><div><br></div><div>The \
issue is that meson doesn't pass PKG_CONFIG_SYSROOT_DIR to the shell environment \
that runs pkg-config, as with the pkg-config sandbox test it does \
work.<br></div></div></blockquote><div><br></div><div>Both meson source code and its \
documentation indicate otherwise - if you set sys_root property, it will get passed \
to pkg-config via environment as PKG_CONFIG_SYSROOT_DIR:</div><div><a \
href="https://github.com/mesonbuild/meson/blob/master/mesonbuild/dependencies/pkgconfig.py#L121" \
target="_blank">https://github.com/mesonbuild/meson/blob/master/mesonbuild/dependencie \
s/pkgconfig.py#L121</a></div><div><br></div><div></div><div>Alex<br></div><br></div></div>
</blockquote></div>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#159001): https://lists.openembedded.org/g/openembedded-core/message/159001
Mute This Topic: https://lists.openembedded.org/mt/87407703/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic