[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-core
Subject: Re: [OE-core] vulkan-loader
From: "Joel Winarske" <joel.winarske () gmail ! com>
Date: 2021-11-30 16:31:28
Message-ID: CABKMkPJSUUDE9fDuzPbV9MLjGHDBZ_dXV0tMrn7+u5c4Z7Actg () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
[Readable version]
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 at 10:58 PM Alexander Kanavin <alex.kanavin@gmail.com>
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 <joel.winarske@gmail.com>
> 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
>>
>>
[Attachment #5 (text/html)]
<div dir="ltr"><div>[Readable version]</div><div><br></div><div><a \
href="https://github.com/KhronosGroup/Vulkan-Loader/commit/3c1ad4b0d54875ff0899b77a92a \
eda53ca236f27">https://github.com/KhronosGroup/Vulkan-Loader/commit/3c1ad4b0d54875ff0899b77a92aeda53ca236f27</a></div><br>Before:<br>$ \
pkg-config --print-errors --define-variable=prefix=/opt --variable=includedir \
vulkan<br>/usr/include<br><br>After:<br>$ pkg-config --print-errors \
--define-variable=prefix=/opt --variable=includedir \
vulkan<br>/opt/usr/include<br><br>This is important as meson does not \
expose<br>PKG_CONFIG_SYSROOT_DIR to pkg-config.<br><br>With change this meson snippet \
now finds absolute path correctly:<br><br>vulkan_dep = \
dependency('vulkan')<br>vulkan_hpp = join_paths([<br> \
vulkan_dep.get_pkgconfig_variable('includedir', define_variable: \
['prefix', get_option('prefix')]),<br> 'vulkan',<br> \
'vulkan.hpp'<br> ])<br><br>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.<br><br>Regardless, the bad \
vulkan.pc is now fixed.<br><br><br>Joel</div><br><div class="gmail_quote"><div \
dir="ltr" class="gmail_attr">On Mon, Nov 29, 2021 at 10:58 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>Can you show what vulkan.pc contains please, and why is that a \
problem?<br></div><div><br></div><div>Alex<br></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 30 Nov 2021 at 00:51, \
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>I discovered an upstream \
problem with vulkan-loader today.</div><div><br></div><div>Effectively since 1.2.162 \
vulkan.pc is broken for cross compilation scenarios.</div><div><br></div><div>This \
example illustrates current problem with vulkan.pc installed by \
vulkan-loader:<br></div><div><div><pre><code>$ pkg-config --print-errors \
--define-variable=prefix=/opt --variable=includedir vulkan
/usr/include
</code></pre></div>
<p>It should return /opt/usr/include</p></div><div>So doing this in a meson project \
does not produce the expected result:</div><div><pre><code>vulkan_hpp = join_paths([ \
vulkan_dep.get_pkgconfig_variable('includedir', define_variable: \
['prefix', get_option('prefix')]) 'vulkan',
'vulkan.hpp'
])<br></code></pre></div><div><br></div><div>What is the suggested approach to \
address this? A patch for each branch up to \
master?</div><div><br></div><div>Joel</div><br></div> </blockquote></div>
</blockquote></div>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158980): https://lists.openembedded.org/g/openembedded-core/message/158980
Mute This Topic: https://lists.openembedded.org/mt/87391647/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