Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/vulkan-loader: fix x11 handling
@ 2023-09-19 19:37 Fabrice Fontaine
  2023-09-20 21:50 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2023-09-19 19:37 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine, Adam Duskett

Fix the following build failure raised since the addition of the package
in commit 6aa1bc31678ff9f8013084fda34b9f941cc63fc3:

In file included from /home/buildroot/autobuild/run/instance-3/output-1/build/vulkan-loader-1.3.262/loader/extension_manual.h:24,
                 from /home/buildroot/autobuild/run/instance-3/output-1/build/vulkan-loader-1.3.262/loader/extension_manual.c:23:
/home/buildroot/autobuild/run/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/vulkan/vulkan.h:71:10: fatal error: X11/extensions/Xrandr.h: No such file or directory
   71 | #include <X11/extensions/Xrandr.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/55ddfd44393e3bcc2f25bad2f9ecb7e1b142a985

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/vulkan-loader/Config.in        |  1 +
 package/vulkan-loader/vulkan-loader.mk | 15 +++++++++------
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/package/vulkan-loader/Config.in b/package/vulkan-loader/Config.in
index 9c215dc9ce..1ea6c94505 100644
--- a/package/vulkan-loader/Config.in
+++ b/package/vulkan-loader/Config.in
@@ -4,6 +4,7 @@ config BR2_PACKAGE_VULKAN_LOADER
 	depends on !BR2_STATIC_LIBS # dlfcn.h
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_PACKAGE_VULKAN_HEADERS
+	select BR2_PACKAGE_XLIB_LIBXRANDR if BR2_PACKAGE_XORG7
 	help
 	  The Khronos official Vulkan ICD desktop loader.
 
diff --git a/package/vulkan-loader/vulkan-loader.mk b/package/vulkan-loader/vulkan-loader.mk
index f6dd9d0ac3..b1545a4972 100644
--- a/package/vulkan-loader/vulkan-loader.mk
+++ b/package/vulkan-loader/vulkan-loader.mk
@@ -26,13 +26,16 @@ endif
 
 ifeq ($(BR2_PACKAGE_LIBXCB),y)
 VULKAN_LOADER_DEPENDENCIES += libxcb
-VULKAN_LOADER_CONF_OPTS += \
-	-DBUILD_WSI_XCB_SUPPORT=ON \
-	-DBUILD_WSI_XLIB_SUPPORT=ON
+VULKAN_LOADER_CONF_OPTS += -DBUILD_WSI_XCB_SUPPORT=ON
 else
-VULKAN_LOADER_CONF_OPTS += \
-	-DBUILD_WSI_XCB_SUPPORT=OFF \
-	-DBUILD_WSI_XLIB_SUPPORT=OFF
+VULKAN_LOADER_CONF_OPTS += -DBUILD_WSI_XCB_SUPPORT=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_XLIB_LIBX11)$(BR2_PACKAGE_XLIB_LIBXRANDR),yy)
+VULKAN_LOADER_DEPENDENCIES += xlib_libX11 xlib_libXrandr
+VULKAN_LOADER_CONF_OPTS += -DBUILD_WSI_XLIB_SUPPORT=ON
+else
+VULKAN_LOADER_CONF_OPTS += -DBUILD_WSI_XLIB_SUPPORT=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_WAYLAND),y)
-- 
2.40.1

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

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

* Re: [Buildroot] [PATCH 1/1] package/vulkan-loader: fix x11 handling
  2023-09-19 19:37 [Buildroot] [PATCH 1/1] package/vulkan-loader: fix x11 handling Fabrice Fontaine
@ 2023-09-20 21:50 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-09-20 21:50 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Adam Duskett, buildroot

On Tue, 19 Sep 2023 21:37:54 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> diff --git a/package/vulkan-loader/Config.in b/package/vulkan-loader/Config.in
> index 9c215dc9ce..1ea6c94505 100644
> --- a/package/vulkan-loader/Config.in
> +++ b/package/vulkan-loader/Config.in
> @@ -4,6 +4,7 @@ config BR2_PACKAGE_VULKAN_LOADER
>  	depends on !BR2_STATIC_LIBS # dlfcn.h
>  	depends on BR2_TOOLCHAIN_HAS_THREADS
>  	select BR2_PACKAGE_VULKAN_HEADERS
> +	select BR2_PACKAGE_XLIB_LIBXRANDR if BR2_PACKAGE_XORG7

This will imply that when XORG7 is enabled, all of libX11, libxcb and
libXrandr are automatically enabled (because xrandr -> libx11 ->
libxcb).

>  	help
>  	  The Khronos official Vulkan ICD desktop loader.
>  
> diff --git a/package/vulkan-loader/vulkan-loader.mk b/package/vulkan-loader/vulkan-loader.mk
> index f6dd9d0ac3..b1545a4972 100644
> --- a/package/vulkan-loader/vulkan-loader.mk
> +++ b/package/vulkan-loader/vulkan-loader.mk
> @@ -26,13 +26,16 @@ endif
>  
>  ifeq ($(BR2_PACKAGE_LIBXCB),y)
>  VULKAN_LOADER_DEPENDENCIES += libxcb
> -VULKAN_LOADER_CONF_OPTS += \
> -	-DBUILD_WSI_XCB_SUPPORT=ON \
> -	-DBUILD_WSI_XLIB_SUPPORT=ON
> +VULKAN_LOADER_CONF_OPTS += -DBUILD_WSI_XCB_SUPPORT=ON
>  else
> -VULKAN_LOADER_CONF_OPTS += \
> -	-DBUILD_WSI_XCB_SUPPORT=OFF \
> -	-DBUILD_WSI_XLIB_SUPPORT=OFF
> +VULKAN_LOADER_CONF_OPTS += -DBUILD_WSI_XCB_SUPPORT=OFF
> +endif
> +
> +ifeq ($(BR2_PACKAGE_XLIB_LIBX11)$(BR2_PACKAGE_XLIB_LIBXRANDR),yy)
> +VULKAN_LOADER_DEPENDENCIES += xlib_libX11 xlib_libXrandr
> +VULKAN_LOADER_CONF_OPTS += -DBUILD_WSI_XLIB_SUPPORT=ON
> +else
> +VULKAN_LOADER_CONF_OPTS += -DBUILD_WSI_XLIB_SUPPORT=OFF
>  endif

So here it wouldn't make sense to separate Xlib case from the Xcb case,
because both of them would always be enabled due to your select. In
addition, you're already testing in the condition here that
BR2_PACKAGE_XLIB_LIBXRANDR=y making the select somewhat useless.

Could you have a closer look into this?

Thanks!

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] 2+ messages in thread

end of thread, other threads:[~2023-09-20 21:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-19 19:37 [Buildroot] [PATCH 1/1] package/vulkan-loader: fix x11 handling Fabrice Fontaine
2023-09-20 21:50 ` 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