Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/2] xorg mesa3d dependency fixes
@ 2026-09-27 20:48 John Ernberg
  2026-09-27 20:48 ` [Buildroot] [PATCH 1/2] package/x11r7/xserver_xorg-server: glx depend on mesa3d{, -headers} John Ernberg
  2026-09-27 20:48 ` [Buildroot] [PATCH 2/2] package/x11r7/xwayland: " John Ernberg
  0 siblings, 2 replies; 6+ messages in thread
From: John Ernberg @ 2026-09-27 20:48 UTC (permalink / raw)
  To: buildroot; +Cc: John Ernberg, Raphael Pavlidis, Adam Ford

Adam Ford reported at [1] that xwayland randomly fails to build with a
missing dri dependency.

I had run into the same error on xorg-server earlier and didn't have a
solid solution for it at the time.

Fix the issue in both packages.

[1] https://lore.kernel.org/buildroot/20260803140815.617446-1-aford173@gmail.com/

Cc: Raphael Pavlidis <raphael.pavlidis@gmail.com>
Cc: Adam Ford <aford173@gmail.com>

John Ernberg (2):
  package/x11r7/xserver_xorg-server: glx depend on mesa3d{,-headers}
  package/x11r7/xwayland: glx depend on mesa3d{,-headers}

 package/x11r7/xserver_xorg-server/xserver_xorg-server.mk | 5 ++++-
 package/x11r7/xwayland/xwayland.mk                       | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

-- 
2.54.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/2] package/x11r7/xserver_xorg-server: glx depend on mesa3d{, -headers}
  2026-09-27 20:48 [Buildroot] [PATCH 0/2] xorg mesa3d dependency fixes John Ernberg
@ 2026-09-27 20:48 ` John Ernberg
  2026-09-28  8:50   ` Thomas Petazzoni via buildroot
  2026-09-27 20:48 ` [Buildroot] [PATCH 2/2] package/x11r7/xwayland: " John Ernberg
  1 sibling, 1 reply; 6+ messages in thread
From: John Ernberg @ 2026-09-27 20:48 UTC (permalink / raw)
  To: buildroot; +Cc: John Ernberg

The glx feature of xorg-server checks for dri.pc, which is only provided
by mesa3d{,-headers}.

Establish the dependency chain properly, otherwise xorg-server cannot be
built when using per-package directories, and will fail to build randomly
in the default build when a provider of LIBGL has been enabled.

Graphics stacks will use either mesa3d or mesa3d-headers (nvidia), since
those packages are in conflict with eachother adding them both as
conditional deps is fine, we can't accidentally depend on both.

Signed-off-by: John Ernberg <j@j-ernberg.se>
---
 package/x11r7/xserver_xorg-server/xserver_xorg-server.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
index d1596a8a3f..7bf9b65f58 100644
--- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
+++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
@@ -99,7 +99,10 @@ endif
 
 ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
 XSERVER_XORG_SERVER_CONF_OPTS += --enable-dri --enable-glx
-XSERVER_XORG_SERVER_DEPENDENCIES += libgl
+XSERVER_XORG_SERVER_DEPENDENCIES += \
+	libgl \
+	$(if $(BR2_PACKAGE_MESA3D),mesa3d) \
+	$(if $(BR2_PACKAGE_MESA3D_HEADERS),mesa3d-headers)
 else
 XSERVER_XORG_SERVER_CONF_OPTS += --disable-dri --disable-glx
 endif
-- 
2.54.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/2] package/x11r7/xwayland: glx depend on mesa3d{, -headers}
  2026-09-27 20:48 [Buildroot] [PATCH 0/2] xorg mesa3d dependency fixes John Ernberg
  2026-09-27 20:48 ` [Buildroot] [PATCH 1/2] package/x11r7/xserver_xorg-server: glx depend on mesa3d{, -headers} John Ernberg
@ 2026-09-27 20:48 ` John Ernberg
  2026-09-28  8:51   ` Thomas Petazzoni via buildroot
  1 sibling, 1 reply; 6+ messages in thread
From: John Ernberg @ 2026-09-27 20:48 UTC (permalink / raw)
  To: buildroot; +Cc: John Ernberg, Raphael Pavlidis, Adam Ford

The glx feature of xwayland checks for dri.pc, which is only provided
by mesa3d{,-headers}.

Establish the dependency chain properly, otherwise xorg-server cannot be
built when using per-package directories, and will fail to build randomly
in the default build when a provider of LIBGL has been enabled.

Graphics stacks will use either mesa3d or mesa3d-headers (nvidia), since
those packages are in conflict with eachother adding them both as
conditional deps is fine, we can't accidentally depend on both.

Cc: Raphael Pavlidis <raphael.pavlidis@gmail.com>
Reported-by: Adam Ford <aford173@gmail.com>
Link: https://lore.kernel.org/buildroot/20260803140815.617446-1-aford173@gmail.com/
Signed-off-by: John Ernberg <j@j-ernberg.se>
---

Adam, since this is basically your solution and I just cleaned it up,
let me know if you want a Co-developed-by tag or something to that extent.

 package/x11r7/xwayland/xwayland.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/package/x11r7/xwayland/xwayland.mk b/package/x11r7/xwayland/xwayland.mk
index 02a21b96c1..e6ac104e0a 100644
--- a/package/x11r7/xwayland/xwayland.mk
+++ b/package/x11r7/xwayland/xwayland.mk
@@ -39,7 +39,10 @@ endif
 
 ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
 XWAYLAND_CONF_OPTS += -Dglx=true
-XWAYLAND_DEPENDENCIES += libgl
+XWAYLAND_DEPENDENCIES += \
+	libgl \
+	$(if $(BR2_PACKAGE_MESA3D),mesa3d) \
+	$(if $(BR2_PACKAGE_MESA3D_HEADERS),mesa3d-headers)
 else
 XWAYLAND_CONF_OPTS += -Dglx=false
 endif
-- 
2.54.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH 1/2] package/x11r7/xserver_xorg-server: glx depend on mesa3d{, -headers}
  2026-09-27 20:48 ` [Buildroot] [PATCH 1/2] package/x11r7/xserver_xorg-server: glx depend on mesa3d{, -headers} John Ernberg
@ 2026-09-28  8:50   ` Thomas Petazzoni via buildroot
  2026-09-28 21:01     ` John Ernberg
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-09-28  8:50 UTC (permalink / raw)
  To: John Ernberg; +Cc: buildroot

Hello John,

On Sun, Sep 27, 2026 at 10:48:41PM +0200, John Ernberg wrote:

> diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
> index d1596a8a3f..7bf9b65f58 100644
> --- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
> +++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
> @@ -99,7 +99,10 @@ endif
>  
>  ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
>  XSERVER_XORG_SERVER_CONF_OPTS += --enable-dri --enable-glx
> -XSERVER_XORG_SERVER_DEPENDENCIES += libgl
> +XSERVER_XORG_SERVER_DEPENDENCIES += \
> +	libgl \
> +	$(if $(BR2_PACKAGE_MESA3D),mesa3d) \
> +	$(if $(BR2_PACKAGE_MESA3D_HEADERS),mesa3d-headers)

Thanks a lot for the patch. However, this cannot be correct as mesa3d
is not the only OpenGL provider. BR2_PACKAGE_HAS_LIBGL only tells you
"some OpenGL provider is available" and that "libgl" depends on this
OpenGL provider. But there are plenty of OpenGL providers which are
not mesa3d.

What is the failure that you are seeing, with which configuration?

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH 2/2] package/x11r7/xwayland: glx depend on mesa3d{, -headers}
  2026-09-27 20:48 ` [Buildroot] [PATCH 2/2] package/x11r7/xwayland: " John Ernberg
@ 2026-09-28  8:51   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-09-28  8:51 UTC (permalink / raw)
  To: John Ernberg; +Cc: buildroot, Raphael Pavlidis, Adam Ford

Hello,

On Sun, Sep 27, 2026 at 10:48:42PM +0200, John Ernberg wrote:
> The glx feature of xwayland checks for dri.pc, which is only provided
> by mesa3d{,-headers}.
> 
> Establish the dependency chain properly, otherwise xorg-server cannot be
> built when using per-package directories, and will fail to build randomly
> in the default build when a provider of LIBGL has been enabled.
> 
> Graphics stacks will use either mesa3d or mesa3d-headers (nvidia), since
> those packages are in conflict with eachother adding them both as
> conditional deps is fine, we can't accidentally depend on both.
> 
> Cc: Raphael Pavlidis <raphael.pavlidis@gmail.com>
> Reported-by: Adam Ford <aford173@gmail.com>
> Link: https://lore.kernel.org/buildroot/20260803140815.617446-1-aford173@gmail.com/
> Signed-off-by: John Ernberg <j@j-ernberg.se>
> ---
> 
> Adam, since this is basically your solution and I just cleaned it up,
> let me know if you want a Co-developed-by tag or something to that extent.
> 
>  package/x11r7/xwayland/xwayland.mk | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/package/x11r7/xwayland/xwayland.mk b/package/x11r7/xwayland/xwayland.mk
> index 02a21b96c1..e6ac104e0a 100644
> --- a/package/x11r7/xwayland/xwayland.mk
> +++ b/package/x11r7/xwayland/xwayland.mk
> @@ -39,7 +39,10 @@ endif
>  
>  ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
>  XWAYLAND_CONF_OPTS += -Dglx=true
> -XWAYLAND_DEPENDENCIES += libgl
> +XWAYLAND_DEPENDENCIES += \
> +	libgl \
> +	$(if $(BR2_PACKAGE_MESA3D),mesa3d) \
> +	$(if $(BR2_PACKAGE_MESA3D_HEADERS),mesa3d-headers)

For the same reason as for PATCH 1/2, this cannot be correct, as you
have no guarantee that mesa3d is your OpenGL provider.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH 1/2] package/x11r7/xserver_xorg-server: glx depend on mesa3d{, -headers}
  2026-09-28  8:50   ` Thomas Petazzoni via buildroot
@ 2026-09-28 21:01     ` John Ernberg
  0 siblings, 0 replies; 6+ messages in thread
From: John Ernberg @ 2026-09-28 21:01 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot

Hi Thomas,

On Mon, Sep 28, 2026 at 10:50 AM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello John,
>
> On Sun, Sep 27, 2026 at 10:48:41PM +0200, John Ernberg wrote:
>
> > diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
> > index d1596a8a3f..7bf9b65f58 100644
> > --- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
> > +++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
> > @@ -99,7 +99,10 @@ endif
> >
> >  ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
> >  XSERVER_XORG_SERVER_CONF_OPTS += --enable-dri --enable-glx
> > -XSERVER_XORG_SERVER_DEPENDENCIES += libgl
> > +XSERVER_XORG_SERVER_DEPENDENCIES += \
> > +     libgl \
> > +     $(if $(BR2_PACKAGE_MESA3D),mesa3d) \
> > +     $(if $(BR2_PACKAGE_MESA3D_HEADERS),mesa3d-headers)
>
> Thanks a lot for the patch. However, this cannot be correct as mesa3d
> is not the only OpenGL provider. BR2_PACKAGE_HAS_LIBGL only tells you
> "some OpenGL provider is available" and that "libgl" depends on this
> OpenGL provider. But there are plenty of OpenGL providers which are
> not mesa3d.

LIBGL specifically is only provided by 3 packages, mesa3d, libglvnd
and nvidia-driver.
LIBGLES on the other hand.

However, that doesn't matter anymore, due to below.

>
> What is the failure that you are seeing, with which configuration?

I realize I stupidly forgot to include the error in the commit message:

    configure: error: Package requirements (fixesproto >= 6.0
damageproto >= 1.1 xcmiscproto >= 1.2.0 xtrans >= 1.3.5 bigreqsproto
>= 1.1.0 xproto >= 7.0.31 randrproto >= 1.6.0 renderproto >= 0.11
xextproto >= 7.2.99.901 inputproto >= 2.3.99.1 kbproto >= 1.0.3
fontsproto >= 2.1.3 pixman-1 >= 0.27.2 videoproto recordproto >=
1.13.99.1 resourceproto >= 1.2.0 xf86driproto >= 2.1.0 glproto >=
1.4.17 dri >= 7.8.0 dri3proto presentproto >= 1.2 xineramaproto
xkbfile  pixman-1 >= 0.27.2 xfont2 >= 2.0.0 xau xshmfence >= 1.1
xdmcp) were not met:

    Package 'dri' not found

    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.

Adding these configurations to the x86_64_efi_defconfig:
+BR2_PER_PACKAGE_DIRECTORIES=y
+BR2_PACKAGE_LIBGLVND=y
+BR2_PACKAGE_MESA3D=y
+BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU=y
+BR2_PACKAGE_MESA3D_OPENGL_GLX=y
+BR2_PACKAGE_XORG7=y
+BR2_PACKAGE_XSERVER_XORG_SERVER=y

And it took me a while to realize it's this exact config, because I
overlooked how the libgl dependency actually worked since this was the
first configuration I tried. LIBGLVND selected is the key.

I had it de-selected testing something else in between, and couldn't
for the life of me reproduce the issue and thought I had ghosts in my
machine..

So this patch set is all wrong, and something is not quite right with
mesa3d (the only DISPATCH_GL provider) or libglvnd. Should there be a
virtual package for gl-provider perhaps to complete the dependency
chain?

Thanks! // John Ernberg
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-28 21:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-27 20:48 [Buildroot] [PATCH 0/2] xorg mesa3d dependency fixes John Ernberg
2026-09-27 20:48 ` [Buildroot] [PATCH 1/2] package/x11r7/xserver_xorg-server: glx depend on mesa3d{, -headers} John Ernberg
2026-09-28  8:50   ` Thomas Petazzoni via buildroot
2026-09-28 21:01     ` John Ernberg
2026-09-27 20:48 ` [Buildroot] [PATCH 2/2] package/x11r7/xwayland: " John Ernberg
2026-09-28  8:51   ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox