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 <[email protected]>
wrote:
> On Tue, 30 Nov 2021 at 21:00, Joel Winarske <[email protected]>
> 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
>
>
-=-=-=-=-=-=-=-=-=-=-=-
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/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-