public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Yoann Congal" <yoann.congal@smile.fr>
To: <martin.jansa@gmail.com>, <openembedded-core@lists.openembedded.org>
Cc: "Khem Raj" <raj.khem@gmail.com>,
	"Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>
Subject: Re: [OE-core] [whinlatter][PATCH] virglrenderer: Fix build with glibc 2.43+
Date: Sat, 11 Apr 2026 14:52:43 +0200	[thread overview]
Message-ID: <DHQC912RAJRW.1MLR6Y2ATF68X@smile.fr> (raw)
In-Reply-To: <20260410061205.1473776-1-martin.jansa@gmail.com>

On Fri Apr 10, 2026 at 8:12 AM CEST, Martin Jansa via lists.openembedded.org wrote:
> From: Khem Raj <raj.khem@gmail.com>
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
> ---

Thanks Martin,

With this patch, the build progress further but, now, ovmf-native fails to build:
https://autobuilder.yoctoproject.org/valkyrie/?#/builders/96/builds/25/steps/25/logs/stdio (line 16662).
(I could reproduce that locally with my ubuntu26.04 container)

There is a patch for master[0] but the patches inside it do not apply cleanly on the whinlatter version.

[0]: https://lore.kernel.org/openembedded-core/20260409122225.1069828-1-zboszor@gmail.com/

Can you send the backport?

Regards,

>  ...once_flag-ONCE_FLAG_INIT-when-presen.patch | 55 +++++++++++++++++++
>  .../virglrenderer/virglrenderer_1.1.1.bb      |  1 +
>  2 files changed, 56 insertions(+)
>  create mode 100644 meta/recipes-graphics/virglrenderer/virglrenderer/0001-c11-use-glibc-s-once_flag-ONCE_FLAG_INIT-when-presen.patch
>
> diff --git a/meta/recipes-graphics/virglrenderer/virglrenderer/0001-c11-use-glibc-s-once_flag-ONCE_FLAG_INIT-when-presen.patch b/meta/recipes-graphics/virglrenderer/virglrenderer/0001-c11-use-glibc-s-once_flag-ONCE_FLAG_INIT-when-presen.patch
> new file mode 100644
> index 0000000000..1740d7605f
> --- /dev/null
> +++ b/meta/recipes-graphics/virglrenderer/virglrenderer/0001-c11-use-glibc-s-once_flag-ONCE_FLAG_INIT-when-presen.patch
> @@ -0,0 +1,55 @@
> +From 179e744f7577d98df7c79d7324c22acfb32a0154 Mon Sep 17 00:00:00 2001
> +From: Dave Airlie <airlied@redhat.com>
> +Date: Fri, 7 Nov 2025 13:14:56 +1000
> +Subject: [PATCH] c11/threads: fix build on c23
> +
> +C23/glibc is now including once_init in stdlib.h
> +
> +https://patchwork.sourceware.org/project/glibc/patch/78061085-f04a-0c45-107b-5a8a15521083@redhat.com/#213088
> +
> +Just fix up our use of it.
> +
> +Upstream-Status: Submitted [https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1567]
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> + src/mesa/compat/c11/impl/threads_posix.c | 3 ++-
> + 2 files changed, 4 insertions(+), 1 deletion(-)
> +
> +--- a/src/mesa/compat/c11/threads_posix.h
> ++++ b/src/mesa/compat/c11/threads_posix.h
> +@@ -51,7 +51,9 @@ Configuration macro:
> + #include <pthread.h>
> +
> + /*---------------------------- macros ----------------------------*/
> ++#ifndef __once_flag_defined
> + #define ONCE_FLAG_INIT PTHREAD_ONCE_INIT
> ++#endif
> + #ifdef INIT_ONCE_STATIC_INIT
> + #define TSS_DTOR_ITERATIONS PTHREAD_DESTRUCTOR_ITERATIONS
> + #else
> +@@ -66,8 +68,9 @@ typedef pthread_cond_t  cnd_t;
> + typedef pthread_t       thrd_t;
> + typedef pthread_key_t   tss_t;
> + typedef pthread_mutex_t mtx_t;
> ++#ifndef __once_flag_defined
> + typedef pthread_once_t  once_flag;
> +-
> ++#endif
> +
> + /*
> + Implementation limits:
> +@@ -90,12 +93,13 @@ impl_thrd_routine(void *p)
> +
> + /*--------------- 7.25.2 Initialization functions ---------------*/
> + // 7.25.2.1
> ++#ifndef __once_flag_defined
> + static inline void
> + call_once(once_flag *flag, void (*func)(void))
> + {
> +     pthread_once(flag, func);
> + }
> +-
> ++#endif
> +
> + /*------------- 7.25.3 Condition variable functions -------------*/
> + // 7.25.3.1
> diff --git a/meta/recipes-graphics/virglrenderer/virglrenderer_1.1.1.bb b/meta/recipes-graphics/virglrenderer/virglrenderer_1.1.1.bb
> index 89dd25de70..be4385ada6 100644
> --- a/meta/recipes-graphics/virglrenderer/virglrenderer_1.1.1.bb
> +++ b/meta/recipes-graphics/virglrenderer/virglrenderer_1.1.1.bb
> @@ -12,6 +12,7 @@ DEPENDS = "libdrm libepoxy python3-pyyaml-native virtual/egl virtual/libgbm"
>  SRCREV = "0f1f43929724a6a414c01a29bc51feccb445c2f0"
>  SRC_URI = "git://gitlab.freedesktop.org/virgl/virglrenderer.git;branch=main;protocol=https;tag=${PV} \
>             file://0001-meson.build-use-python3-directly-for-python.patch \
> +           file://0001-c11-use-glibc-s-once_flag-ONCE_FLAG_INIT-when-presen.patch \
>             "
>  
>  inherit meson pkgconfig features_check


-- 
Yoann Congal
Smile ECS



      reply	other threads:[~2026-04-11 12:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10  6:12 [whinlatter][PATCH] virglrenderer: Fix build with glibc 2.43+ martin.jansa
2026-04-11 12:52 ` Yoann Congal [this message]

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=DHQC912RAJRW.1MLR6Y2ATF68X@smile.fr \
    --to=yoann.congal@smile.fr \
    --cc=martin.jansa@gmail.com \
    --cc=mathieu.dubois-briand@bootlin.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@gmail.com \
    /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