https://github.com/KhronosGroup/Vulkan-Loader/commit/3c1ad4b0d54875ff0899b77a92aeda53ca236f27
Before:
$ pkg-config --print-errors --define-variable=prefix=/opt
--variable=includedir vulkan
/usr/include
After:
$ pkg-config --print-errors --define-variable=prefix=/opt
--variable=includedir vulkan
/opt/usr/include
This is important as meson does not expose
PKG_CONFIG_SYSROOT_DIR to pkg-config.
With change this meson snippet now finds absolute path correctly:
vulkan_dep = dependency('vulkan')
vulkan_hpp = join_paths([
vulkan_dep.get_pkgconfig_variable('includedir', define_variable:
['prefix', get_option('prefix')]),
'vulkan',
'vulkan.hpp'
])
Another work around for meson's current limitation would be to implement a
pkg-config wrapper that exposes PKG_CONFIG variables, and point to it in
meson.bbclass/meson.cross.
Regardless the bad vulkan.pc is now fixed.
Joel
On Mon, Nov 29, 2021, 10:58 PM Alexander Kanavin <[email protected]>
wrote:
> Can you show what vulkan.pc contains please, and why is that a problem?
>
> Alex
>
> On Tue, 30 Nov 2021 at 00:51, Joel Winarske <[email protected]>
> wrote:
>
>> I discovered an upstream problem with vulkan-loader today.
>>
>> Effectively since 1.2.162 vulkan.pc is broken for cross compilation
>> scenarios.
>>
>> This example illustrates current problem with vulkan.pc installed by
>> vulkan-loader:
>>
>> $ pkg-config --print-errors --define-variable=prefix=/opt
>> --variable=includedir vulkan
>> /usr/include
>>
>> It should return /opt/usr/include
>> So doing this in a meson project does not produce the expected result:
>>
>> vulkan_hpp = join_paths([
>> vulkan_dep.get_pkgconfig_variable('includedir', define_variable:
>> ['prefix', get_option('prefix')])
>> 'vulkan',
>> 'vulkan.hpp'
>> ])
>>
>>
>> What is the suggested approach to address this? A patch for each branch
>> up to master?
>>
>> Joel
>>
>>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158974):
https://lists.openembedded.org/g/openembedded-core/message/158974
Mute This Topic: https://lists.openembedded.org/mt/87391647/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-