From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC v1 2/6] package/vulkan-loader: new package
Date: Wed, 30 Dec 2020 09:54:54 +0100 [thread overview]
Message-ID: <20201230085454.GG1680670@scaer> (raw)
In-Reply-To: <20201223224553.8570-3-ps.report@gmx.net>
Peter, All,
On 2020-12-23 23:45 +0100, Peter Seiderer spake thusly:
> ---
[--SNIP--]
> diff --git a/package/vulkan-loader/0001-loader-fix-asm_offset-call.patch b/package/vulkan-loader/0001-loader-fix-asm_offset-call.patch
> new file mode 100644
> index 0000000000..d62b9390d8
> --- /dev/null
> +++ b/package/vulkan-loader/0001-loader-fix-asm_offset-call.patch
> @@ -0,0 +1,32 @@
> +From 45098898f7fa25dfd12d2c4f1aed889f678aa870 Mon Sep 17 00:00:00 2001
> +From: Peter Seiderer <ps.report@gmx.net>
> +Date: Wed, 23 Dec 2020 14:46:02 +0100
> +Subject: [PATCH] loader: fix asm_offset call
> +
> +Disable assembler usage (not cross compile capable):
In fact, for cross-compilation to another arch, this is already properly
detected, and asm_offset is not even built or run, and a fallback code
is used.
> + [ 21%] Generating gen_defines.asm
> + /bin/sh: asm_offset: command not found
> + make[3]: *** [loader/CMakeFiles/loader_asm_gen_files.dir/build.make:80: loader/gen_defines.asm] Error 127
In fact, the issue arises when the target arch is similar to that of the
build machine (i.e. x86_64), but CMake fails to be able to call an
executable it just built, even as asm_offset does not link to much
except the C library.
I think the real reason is that CMake detects cross-compilation, so does
not add the directory with the generated executable in the PATH, and
thus running asm_offset fails, whereas for a pure native build, I would
expect CMake to add that directory in the PATH...
And anyway, upstream is very undecided and confused to some degree:
https://github.com/KhronosGroup/Vulkan-Loader/issues/249
If we wanted to push an upstreamable patch, then maybe we could add an
option to drive the use of asm_offset, e.g.: -DUSE_ASM_OFFSET=ON/OFF
Regards,
Yann E. MORIN.
> +Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> +---
> + loader/CMakeLists.txt | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt
> +index ba9f460f1..dbebfb058 100644
> +--- a/loader/CMakeLists.txt
> ++++ b/loader/CMakeLists.txt
> +@@ -187,7 +187,7 @@ else(UNIX AND NOT APPLE) # i.e.: Linux
> + endif()
> + set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
> + try_compile(ASSEMBLER_WORKS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/asm_test.S)
> +- if(ASSEMBLER_WORKS)
> ++ if(FALSE)
> + set(OPT_LOADER_SRCS ${OPT_LOADER_SRCS} unknown_ext_chain_gas.S)
> + add_executable(asm_offset asm_offset.c)
> + target_link_libraries(asm_offset Vulkan::Headers)
> +--
> +2.29.2
> +
> diff --git a/package/vulkan-loader/Config.in b/package/vulkan-loader/Config.in
> new file mode 100644
> index 0000000000..9c215dc9ce
> --- /dev/null
> +++ b/package/vulkan-loader/Config.in
> @@ -0,0 +1,14 @@
> +config BR2_PACKAGE_VULKAN_LOADER
> + bool "vulkan-loader"
> + depends on BR2_INSTALL_LIBSTDCPP
> + depends on !BR2_STATIC_LIBS # dlfcn.h
> + depends on BR2_TOOLCHAIN_HAS_THREADS
> + select BR2_PACKAGE_VULKAN_HEADERS
> + help
> + The Khronos official Vulkan ICD desktop loader.
> +
> + https://github.com/KhronosGroup/Vulkan-Loader
> +
> +comment "vulkan-loader needs a toolchain w/ C++, dynamic library, threads"
> + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \
> + !BR2_TOOLCHAIN_HAS_THREADS
> diff --git a/package/vulkan-loader/vulkan-loader.hash b/package/vulkan-loader/vulkan-loader.hash
> new file mode 100644
> index 0000000000..c70ed90be6
> --- /dev/null
> +++ b/package/vulkan-loader/vulkan-loader.hash
> @@ -0,0 +1,3 @@
> +# Locally calculated
> +sha256 e582dce35051a34af82db2a8fcd38fbc5837b4506e76e6cda685dca02dee01c7 vulkan-loader-1.2.162.tar.gz
> +sha256 43c0a37e6a0fa7ff3c843b3ec5a4fac84b712558ddac103fbd4c1649662a9ece LICENSE.txt
> diff --git a/package/vulkan-loader/vulkan-loader.mk b/package/vulkan-loader/vulkan-loader.mk
> new file mode 100644
> index 0000000000..ff6c0f869b
> --- /dev/null
> +++ b/package/vulkan-loader/vulkan-loader.mk
> @@ -0,0 +1,22 @@
> +################################################################################
> +#
> +# vulkan-loader
> +#
> +################################################################################
> +
> +VULKAN_LOADER_VERSION = 1.2.162
> +VULKAN_LOADER_SITE = $(call github,KhronosGroup,Vulkan-Loader,v$(VULKAN_LOADER_VERSION))
> +VULKAN_LOADER_LICENSE = Apache-2.0 License
> +VULKAN_LOADER_LICENSE_FILES = LICENSE.txt
> +VULKAN_LOADER_INSTALL_STAGING = YES
> +
> +VULKAN_LOADER_DEPENDENCIES = vulkan-headers
> +
> +VULKAN_LOADER_CONF_OPTS += \
> + -DBUILD_WSI_XCB_SUPPORT=OFF \
> + -DBUILD_WSI_XLIB_SUPPORT=OFF \
> + -DBUILD_WSI_WAYLAND_SUPPORT=OFF \
> + -DBUILD_WSI_DIRECTFB_SUPPORT=OFF \
> + -DUSE_CCACHE=OFF
> +
> +$(eval $(cmake-package))
> --
> 2.29.2
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2020-12-30 8:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-23 22:45 [Buildroot] [RFC v1 0/6] Vulkan support Peter Seiderer
2020-12-23 22:45 ` [Buildroot] [RFC v1 1/6] package/vulkan-headers: new package Peter Seiderer
2020-12-30 8:42 ` Yann E. MORIN
2020-12-30 14:23 ` Peter Seiderer
2020-12-23 22:45 ` [Buildroot] [RFC v1 2/6] package/vulkan-loader: " Peter Seiderer
2020-12-30 8:54 ` Yann E. MORIN [this message]
2020-12-23 22:45 ` [Buildroot] [RFC v1 3/6] package/vulkan-tools: " Peter Seiderer
2020-12-30 9:00 ` Yann E. MORIN
2020-12-30 14:32 ` Peter Seiderer
2020-12-23 22:45 ` [Buildroot] [RFC v1 4/6] package/mesa3d: add vulkan broadcom driver support Peter Seiderer
2020-12-30 9:07 ` Yann E. MORIN
2020-12-23 22:45 ` [Buildroot] [RFC v1 5/6] package/mesa3d: add vulkan swrast " Peter Seiderer
2020-12-30 9:15 ` Yann E. MORIN
2020-12-23 22:45 ` [Buildroot] [RFC v1 6/6] package/qt5base: add vulkan option Peter Seiderer
2020-12-30 8:39 ` [Buildroot] [RFC v1 0/6] Vulkan support Yann E. MORIN
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=20201230085454.GG1680670@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/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