Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
Cc: Heiko Thiery <heiko.thiery@gmail.com>,
	 buildroot@buildroot.org,  Julien Olivain <ju.o@free.fr>,
	 Eric Le Bihan <eric.le.bihan.dev@free.fr>
Subject: Re: [Buildroot] [PATCH v6 4/5] package/vkmark: add vkmark benchmarking tool
Date: Wed, 11 Jun 2025 17:39:41 +0100	[thread overview]
Message-ID: <87tt4mi65u.fsf@draig.linaro.org> (raw)
In-Reply-To: <274904fe-4703-4571-88db-d2f3e1539d4e@green-communications.fr> (Nicolas Cavallari's message of "Wed, 11 Jun 2025 17:39:06 +0200")

Nicolas Cavallari <nicolas.cavallari@green-communications.fr> writes:

> On 11/06/2025 15:55, Alex Bennée wrote:
>> Heiko Thiery <heiko.thiery@gmail.com> writes:
>> 
>>> Hi Alex,
>>>
>>> Am Mi., 11. Juni 2025 um 13:16 Uhr schrieb Alex Bennée <alex.bennee@linaro.org>:
>>>
>>>   We build from a recent HEAD to ensure we have the fixes to better
>>>   handle the missing KHR_display extension.
>>>
>>>   Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>>
>>> I tried to build vkmark against, now with wayland enabled and I see this:
>>>
>>> Program /usr/bin/wayland-scanner found: NO
>>>
>>> ../out-weston/build/vkmark-36e7d9b2ecf723e876add65534e95f55ec1bc79d/src/meson.build:116:22: ERROR: Program
>>> '/usr/bin/wayland-scanner' not found or not executable
>> Hmm this seems odd. At least wayland-scanner has a pkgconf variable:
>>    🕙14:51:21 alex@draig:buildroot.git/builds/x86_64  on 
>> add-virtio-vulkan-vkmark:master [$!?⇡]
>>    ➜  pkg-config --variable=wayland_scanner  wayland-scanner
>>    /usr/bin/wayland-scanner
>>    🕙14:52:16 alex@draig:buildroot.git/builds/x86_64  on  add-virtio-vulkan-vkmark:master [$!?⇡]
>>    ➜  ./host/bin/pkgconf --variable=wayland_scanner  wayland-scanner
>>    /home/alex/lsrc/tests/buildroot.git/builds/x86_64/host/bin/wayland-scanner
>>    🕙14:52:29 alex@draig:buildroot.git/builds/x86_64  on  add-virtio-vulkan-vkmark:master [$!?⇡]
>>    ➜
>> And the meson should find it with the normal dependency logic:
>>      wayland_scanner =
>> find_program(wayland_scanner_dep.get_variable('wayland_scanner'))
>
> wayland_scanner_dep is defined as:
>
> wayland_scanner_dep = dependency('wayland-scanner', required :
> get_option('wayland') == 'true')
>
> So it is searching for a wayland-scanner compiled for the target, not
> for one on the host. It should probably changed to
>
> wayland_scanner_dep = dependency('wayland-scanner', required :
> get_option('wayland') == 'true', native: true)

That works:

Build-time dependency wayland-scanner found: YES 1.23.1                                                                                                                       
Run-time dependency libdrm found: YES 2.4.124                                                                                                                                 
Run-time dependency gbm found: YES 25.1.3                                                                                                                                     
Program python3 found: YES (/home/alex/lsrc/tests/buildroot.git/builds/arm64/host/bin/python3)                                                                                
Program /home/alex/lsrc/tests/buildroot.git/builds/arm64/host/bin/wayland-scanner found: YES (/home/alex/lsrc/tests/buildroot.git/builds/arm64/host/bin/wayland-scanner)    


--8<---------------cut here---------------start------------->8---
modified   package/vkmark/0002-meson-fix-cross-compilation-50-75.patch
@@ -1,4 +1,4 @@
-From dc9a0c2d8687501ddf97c97599fa7a69d07d3d3d Mon Sep 17 00:00:00 2001
+From 0cb1a627ccb2da3c0cfd287e407c3e85fb750c94 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= <alex.bennee@linaro.org>
 Date: Fri, 6 Jun 2025 17:48:40 +0100
 Subject: [PATCH 2/2] meson: fix cross-compilation (#50, #75)
@@ -6,15 +6,33 @@ MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
-Now we have updated the minimum meson version we can apply sys_root to
-the prefix variable to ensure we can find the right vk.xml when
-cross-compiling.
+Currently there are a few problems getting in the way of cross
+compilation:
+
+  - we need to apply sys_root to the prefix variable to find the right vk.xml
+  - we need to force the native wayland-scanner to generate headers
 
 Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
 ---
+ meson.build     | 4 +++-
  src/meson.build | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
+ 2 files changed, 6 insertions(+), 2 deletions(-)
 
+diff --git a/meson.build b/meson.build
+index 2d08d53..6cb56f5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -29,7 +29,9 @@ xcb_icccm_dep = dependency('xcb-icccm', required : get_option('xcb') == 'true')
+ wayland_client_dep = dependency('wayland-client', required : get_option('wayland') == 'true')
+ wayland_protocols_dep = dependency('wayland-protocols', version : '>= 1.12',
+                                    required : get_option('wayland') == 'true')
+-wayland_scanner_dep = dependency('wayland-scanner', required : get_option('wayland') == 'true')
++wayland_scanner_dep = dependency('wayland-scanner',
++                                 required : get_option('wayland') == 'true',
++                                 native: true)
+ libdrm_dep = dependency('libdrm', required : get_option('kms') == 'true')
+ gbm_dep = dependency('gbm', required : get_option('kms') == 'true')
+ 
 diff --git a/src/meson.build b/src/meson.build
 index a664ddc..b0e8c4a 100644
 --- a/src/meson.build
--8<---------------cut here---------------end--------------->8---



-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2025-06-11 16:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-11 11:16 [Buildroot] [PATCH v6 0/5] Add vkmark graphics benchmarking tool Alex Bennée
2025-06-11 11:16 ` [Buildroot] [PATCH v6 1/5] package/{mesa3d, mesa3d-headers}: bump version to 25.1.3 Alex Bennée
2025-06-11 11:16 ` [Buildroot] [PATCH v6 2/5] package/vulkan-sdk: new package Alex Bennée
2025-06-14 10:51   ` Julien Olivain
2025-06-11 11:16 ` [Buildroot] [PATCH v6 3/5] package/vulkan-[headers|loader|tools]: bump to 1.4.317 release Alex Bennée
2025-06-14 11:11   ` Julien Olivain
2025-06-11 11:16 ` [Buildroot] [PATCH v6 4/5] package/vkmark: add vkmark benchmarking tool Alex Bennée
2025-06-11 13:11   ` Heiko Thiery
2025-06-11 13:55     ` Alex Bennée
2025-06-11 13:57       ` Heiko Thiery
2025-06-11 15:39       ` Nicolas Cavallari
2025-06-11 16:39         ` Alex Bennée [this message]
2025-06-14 10:59   ` Julien Olivain
2025-06-11 11:16 ` [Buildroot] [PATCH v6 5/5] support/testing: add test for vkmark package Alex Bennée
2025-06-14 11:05   ` Julien Olivain
     [not found] ` <20250611111640.702572-2-alex.bennee__11620.3121536941$1749640635$gmane$org@linaro.org>
2025-06-11 21:38   ` [Buildroot] [PATCH v6 1/5] package/{mesa3d, mesa3d-headers}: bump version to 25.1.3 Bernd Kuhls
2025-06-12  9:42     ` Alex Bennée

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tt4mi65u.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=buildroot@buildroot.org \
    --cc=eric.le.bihan.dev@free.fr \
    --cc=heiko.thiery@gmail.com \
    --cc=ju.o@free.fr \
    --cc=nicolas.cavallari@green-communications.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox