Message ID | 20221110204232.12768-4-jorcrous@amazon.com |
---|---|
State | New |
Headers | show |
Series | Add vulkan validation and improvements for headless devices | expand |
On Thu, 10 Nov 2022 at 21:42, Jordan Crouse via lists.openembedded.org <jorcrous=amazon.com@lists.openembedded.org> wrote: > +DEPENDS += "vulkan-headers" > +DEPENDS += "spirv-headers spirv-tools" > +DEPENDS += "vulkan-loader" > +DEPENDS += "glslang" This should be squashed into a single line. > + > +EXTRA_OECMAKE = "\ > + -DBUILD_TESTS=OFF \ > + -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3 \ > + -DASSEMBLER_WORKS=FALSE \ > + -DVULKAN_HEADERS_INSTALL_DIR=${STAGING_EXECPREFIXDIR} \ > + -DGLSLANG_INSTALL_DIR=${STAGING_DATADIR} \ > + -DSPIRV_HEADERS_INSTALL_DIR=${STAGING_EXECPREFIXDIR} \ > + -DUSE_ROBIN_HOOD_HASHING=OFF \ > + " Some of the choices here would be good to explain in the commit message. What is this 'robin hood hashing' and why do we not want it? :) > + > +PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF, libxcb libx11 libxrandr" > +PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland" These should be enabled by default subject to DISTRO_FEATURES. > +FILES:${PN} += "/usr/share/vulkan/ /usr/lib/" > + > +INSANE_SKIP:${PN} += " ldflags" > +INHIBIT_PACKAGE_STRIP = "1" > +INHIBIT_SYSROOT_STRIP = "1" > +SOLIBS = ".so" > +FILES_SOLIBSDEV = "" All of the above should be removed. If there are error messages due to that, please show them, and we'll figure out how to address them properly. New recipes also need a meta/conf/distro/inclue/maintainers.inc entry. Alex
On Thu, Nov 10, 2022 at 09:57:55PM +0100, Alexander Kanavin wrote: > On Thu, 10 Nov 2022 at 21:42, Jordan Crouse via lists.openembedded.org <snip> > > +FILES:${PN} += "/usr/share/vulkan/ /usr/lib/" > > + > > +INSANE_SKIP:${PN} += " ldflags" > > +INHIBIT_PACKAGE_STRIP = "1" > > +INHIBIT_SYSROOT_STRIP = "1" > > +SOLIBS = ".so" > > +FILES_SOLIBSDEV = "" > > All of the above should be removed. If there are error messages due to > that, please show them, and we'll figure out how to address them > properly. ERROR: vulkan-validation-1.3.231.1-r0 do_package_qa: QA Issue: -dev package vulkan-validation-dev contains non-symlink .so '/usr/lib/libVkLayer_khronos_validation.so' [dev-elf] I borrowed the QA inhibit from vulkan-loader (since they are built mostly the same) but if there is a different path forward, that would be great. Jordan
On Thu, 10 Nov 2022 at 22:30, Jordan Crouse <jorcrous@amazon.com> wrote: > ERROR: vulkan-validation-1.3.231.1-r0 do_package_qa: QA Issue: -dev package vulkan-validation-dev contains non-symlink .so '/usr/lib/libVkLayer_khronos_validation.so' [dev-elf] > > I borrowed the QA inhibit from vulkan-loader (since they are built > mostly the same) but if there is a different path forward, that would be > great. Thanks. I am not seeing QA inhibits or any special handling in the current vulkan-loader: https://git.yoctoproject.org/poky/tree/meta/recipes-graphics/vulkan/vulkan-loader_1.3.231.1.bb?h=master-next Can you find out why the /usr/lib/libVkLayer_khronos_validation.so is built unversioned and where in the source tree that decision is made? We generally require that everything in $libdir is versioned, and .so is a development symlink to versioned originals. Alex
On Fri, Nov 11, 2022 at 09:03:02AM +0100, Alexander Kanavin wrote: > On Thu, 10 Nov 2022 at 22:30, Jordan Crouse <jorcrous@amazon.com> wrote: > > ERROR: vulkan-validation-1.3.231.1-r0 do_package_qa: QA Issue: -dev package vulkan-validation-dev contains non-symlink .so '/usr/lib/libVkLayer_khronos_validation.so' [dev-elf] > > > > I borrowed the QA inhibit from vulkan-loader (since they are built > > mostly the same) but if there is a different path forward, that would be > > great. > > Thanks. I am not seeing QA inhibits or any special handling in the > current vulkan-loader: > https://git.yoctoproject.org/poky/tree/meta/recipes-graphics/vulkan/vulkan-loader_1.3.231.1.bb?h=master-next That was my mistake, I guess I don't clearly remember why these were added in our downstream tree - clearly a poorly executed effort at getting rid of the error. > Can you find out why the /usr/lib/libVkLayer_khronos_validation.so is > built unversioned and where in the source tree that decision is made? These libraries (plugins, really) are dynamically loaded by the vulkan-loader at runtime. I couldn't immediately find an standard online but a cursory glance of the vulkan drivers/layers from other distros use a .so format, for example: https://packages.debian.org/buster/amd64/mesa-vulkan-drivers/filelist And from mesa in OE: https://git.openembedded.org/openembedded-core/tree/meta/recipes-graphics/mesa/mesa.inc#n304 I agree that the existing INSANE_SKIP was the wrong way to go about it - perhaps the better option would be to do this: FILES:${PN} = "${libdir}/*.so ${datadir}/vulkan" I think ${PN}-dev would nominally be empty anyway - the two outputs of this package are .so layers and a .manifest file for the loader. Jordan
On Fri, 11 Nov 2022 at 16:28, Jordan Crouse <jorcrous@amazon.com> wrote: > I agree that the existing INSANE_SKIP was the wrong way to go about it - > perhaps the better option would be to do this: > > FILES:${PN} = "${libdir}/*.so ${datadir}/vulkan" > > I think ${PN}-dev would nominally be empty anyway - the two > outputs of this package are .so layers and a .manifest file for the > loader. I suppose we can do it that way. You need to send a v2. :) Alex
Hello, On 10/11/2022 20:42:32+0000, Jordan Crouse via lists.openembedded.org wrote: > Add a recipe to build the Khronos official Vulkan validation layers that can > assist developers in verifying that their applications correctly use the > Vulkan APIs. > This failed on the autobuilders: NOTE: recipe vulkan-validation-1.3.231.1-r0: task do_compile: Started ERROR: vulkan-validation-1.3.231.1-r0 do_compile: ExecutionError('/home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/vulkan-validation/1.3.231.1-r0/temp/run.do_compile.3939056', 1, None, None) ERROR: Logfile of failure stored in: /home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/vulkan-validation/1.3.231.1-r0/temp/log.do_compile.3939056 Log data follows: | DEBUG: Executing shell function do_compile | NOTE: VERBOSE=1 cmake --build /home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/vulkan-validation/1.3.231.1-r0/build --target all -- | ninja: error: '/home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/vulkan-validation/1.3.231.1-r0/recipe-sysroot/usr/lib', needed by 'layers/libVkLayer_khronos_validation.so', missing and no known rule to make it | WARNING: /home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/vulkan-validation/1.3.231.1-r0/temp/run.do_compile.3939056:153 exit 1 from 'eval ${DESTDIR:+DESTDIR=${DESTDIR} }VERBOSE=1 cmake --build '/home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/vulkan-validation/1.3.231.1-r0/build' "$@" -- ${EXTRA_OECMAKE_BUILD}' | WARNING: Backtrace (BB generated script): | #1: cmake_runcmake_build, /home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/vulkan-validation/1.3.231.1-r0/temp/run.do_compile.3939056, line 153 | #2: cmake_do_compile, /home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/vulkan-validation/1.3.231.1-r0/temp/run.do_compile.3939056, line 147 | #3: do_compile, /home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/vulkan-validation/1.3.231.1-r0/temp/run.do_compile.3939056, line 142 | #4: main, /home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/vulkan-validation/1.3.231.1-r0/temp/run.do_compile.3939056, line 166 NOTE: recipe vulkan-validation-1.3.231.1-r0: task do_compile: Failed ERROR: Task (/home/pokybuild/yocto-worker/qemux86-world/build/meta/recipes-graphics/vulkan/vulkan-validation_1.3.231.1.bb:do_compile) failed with exit code '1' https://autobuilder.yoctoproject.org/typhoon/#/builders/52/builds/6064/steps/11/logs/stdio https://autobuilder.yoctoproject.org/typhoon/#/builders/108/builds/3735/steps/12/logs/stdio > Signed-off-by: Jordan Crouse <jorcrous@amazon.com> > --- > > .../vulkan/vulkan-validation_1.3.231.1.bb | 46 +++++++++++++++++++ > 1 file changed, 46 insertions(+) > create mode 100644 meta/recipes-graphics/vulkan/vulkan-validation_1.3.231.1.bb > > diff --git a/meta/recipes-graphics/vulkan/vulkan-validation_1.3.231.1.bb b/meta/recipes-graphics/vulkan/vulkan-validation_1.3.231.1.bb > new file mode 100644 > index 0000000000..3d592fe24a > --- /dev/null > +++ b/meta/recipes-graphics/vulkan/vulkan-validation_1.3.231.1.bb > @@ -0,0 +1,46 @@ > +SUMMARY = "Vulkan Validation layers" > +DESCRIPTION = "Khronos official Vulkan validation layers to assist developers \ > +in verifying that their applications correctly use the Vulkan API" > +HOMEPAGE = "https://www.khronos.org/vulkan/" > +BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-ValidationLayers" > +SECTION = "libs" > + > +LICENSE = "Apache-2.0" > +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=8df9e8826734226d08cb412babfa599c" > +SRC_URI = "git://github.com/KhronosGroup/Vulkan-ValidationLayers.git;branch=sdk-1.3.231;protocol=https" > + > +SRCREV="f489610de566df6a5c20de1a3e54776e0ad852e1" > + > +S = "${WORKDIR}/git" > + > +REQUIRED_DISTRO_FEATURES = "vulkan" > + > +inherit cmake features_check pkgconfig > + > +DEPENDS += "vulkan-headers" > +DEPENDS += "spirv-headers spirv-tools" > +DEPENDS += "vulkan-loader" > +DEPENDS += "glslang" > + > +EXTRA_OECMAKE = "\ > + -DBUILD_TESTS=OFF \ > + -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3 \ > + -DASSEMBLER_WORKS=FALSE \ > + -DVULKAN_HEADERS_INSTALL_DIR=${STAGING_EXECPREFIXDIR} \ > + -DGLSLANG_INSTALL_DIR=${STAGING_DATADIR} \ > + -DSPIRV_HEADERS_INSTALL_DIR=${STAGING_EXECPREFIXDIR} \ > + -DUSE_ROBIN_HOOD_HASHING=OFF \ > + " > + > +PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF, libxcb libx11 libxrandr" > +PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland" > + > +FILES:${PN} += "/usr/share/vulkan/ /usr/lib/" > + > +INSANE_SKIP:${PN} += " ldflags" > +INHIBIT_PACKAGE_STRIP = "1" > +INHIBIT_SYSROOT_STRIP = "1" > +SOLIBS = ".so" > +FILES_SOLIBSDEV = "" > + > +UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)" > -- > 2.37.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#173105): https://lists.openembedded.org/g/openembedded-core/message/173105 > Mute This Topic: https://lists.openembedded.org/mt/94945225/3617179 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On Sun, Nov 13, 2022 at 11:11:50PM +0100, Alexandre Belloni wrote: > Hello, > > On 10/11/2022 20:42:32+0000, Jordan Crouse via lists.openembedded.org wrote: > > Add a recipe to build the Khronos official Vulkan validation layers that can > > assist developers in verifying that their applications correctly use the > > Vulkan APIs. > > > > > This failed on the autobuilders: > > NOTE: recipe vulkan-validation-1.3.231.1-r0: task do_compile: Started > ERROR: vulkan-validation-1.3.231.1-r0 do_compile: ExecutionError('/home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/vulkan-validation/1.3.231.1-r0/temp/run.do_compile.3939056', 1, None, None) > ERROR: Logfile of failure stored in: /home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/vulkan-validation/1.3.231.1-r0/temp/log.do_compile.3939056 > Log data follows: > | DEBUG: Executing shell function do_compile > | NOTE: VERBOSE=1 cmake --build /home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/vulkan-validation/1.3.231.1-r0/build --target all -- > | ninja: error: '/home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/vulkan-validation/1.3.231.1-r0/recipe-sysroot/usr/lib', needed by 'layers/libVkLayer_khronos_validation.so', missing and no known rule to make it > | WARNING: /home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/vulkan-validation/1.3.231.1-r0/temp/run.do_compile.3939056:153 exit 1 from 'eval ${DESTDIR:+DESTDIR=${DESTDIR} }VERBOSE=1 cmake --build '/home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/vulkan-validation/1.3.231.1-r0/build' "$@" -- ${EXTRA_OECMAKE_BUILD}' > | WARNING: Backtrace (BB generated script): > | #1: cmake_runcmake_build, /home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/vulkan-validation/1.3.231.1-r0/temp/run.do_compile.3939056, line 153 > | #2: cmake_do_compile, /home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/vulkan-validation/1.3.231.1-r0/temp/run.do_compile.3939056, line 147 > | #3: do_compile, /home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/vulkan-validation/1.3.231.1-r0/temp/run.do_compile.3939056, line 142 > | #4: main, /home/pokybuild/yocto-worker/qemux86-world/build/build/tmp/work/core2-64-poky-linux/vulkan-validation/1.3.231.1-r0/temp/run.do_compile.3939056, line 166 > NOTE: recipe vulkan-validation-1.3.231.1-r0: task do_compile: Failed > ERROR: Task (/home/pokybuild/yocto-worker/qemux86-world/build/meta/recipes-graphics/vulkan/vulkan-validation_1.3.231.1.bb:do_compile) failed with exit code '1' > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/52/builds/6064/steps/11/logs/stdio > https://autobuilder.yoctoproject.org/typhoon/#/builders/108/builds/3735/steps/12/logs/stdio Thanks, I'll see if I can figure out what happened here. Jordan
Hello, Is there any status on this? I'd definitely benefit from this.
Given that this was in November last year, I think the best course of action is for you to take the proposed patch and fix it into a state that can be merged. Alex On Thu, 1 Jun 2023 at 23:55, Vincent Davis Jr <vince@underview.tech> wrote: > > Hello, > > Is there any status on this? I'd definitely benefit from this. > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#182122): https://lists.openembedded.org/g/openembedded-core/message/182122 > Mute This Topic: https://lists.openembedded.org/mt/94945225/1686489 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On Fri, Jun 02, 2023 at 07:21:13AM +0200, Alexander Kanavin wrote: > CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. > > > > Given that this was in November last year, I think the best course of > action is for you to take the proposed patch and fix it into a state > that can be merged. I couldn't figure out why it kept failing the verification. I need to pick it back up but I got distracted by other things. If you manage to figure it out, please merge on with my blessing. Jordan
I didn't actually use the recipe in any way, nor have plans to do so :) My involvement is limited to bring it in sync with the rest of vulkan items and do code reviews, but primary maintenance is on you. Alex On Tue, 27 Jun 2023 at 19:10, Jordan Crouse <jorcrous@amazon.com> wrote: > > On Fri, Jun 02, 2023 at 07:21:13AM +0200, Alexander Kanavin wrote: > > CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. > > > > > > > > Given that this was in November last year, I think the best course of > > action is for you to take the proposed patch and fix it into a state > > that can be merged. > > I couldn't figure out why it kept failing the verification. I need to > pick it back up but I got distracted by other things. If you manage to > figure it out, please merge on with my blessing. > > Jordan
Hey Jordan, Yeah, the issue turned out to be a property set in SPIRV-ToolsTarget.cmake. Commit bellow should explain Although ${base_libdir} should of been ${baselib}. https://lists.openembedded.org/g/openembedded-core/message/182445 Also, renamed recipe to vulkan-validation-layers. Let me know if you have issues everything looks good in my setup. https://lists.openembedded.org/g/openembedded-core/message/182446
diff --git a/meta/recipes-graphics/vulkan/vulkan-validation_1.3.231.1.bb b/meta/recipes-graphics/vulkan/vulkan-validation_1.3.231.1.bb new file mode 100644 index 0000000000..3d592fe24a --- /dev/null +++ b/meta/recipes-graphics/vulkan/vulkan-validation_1.3.231.1.bb @@ -0,0 +1,46 @@ +SUMMARY = "Vulkan Validation layers" +DESCRIPTION = "Khronos official Vulkan validation layers to assist developers \ +in verifying that their applications correctly use the Vulkan API" +HOMEPAGE = "https://www.khronos.org/vulkan/" +BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-ValidationLayers" +SECTION = "libs" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=8df9e8826734226d08cb412babfa599c" +SRC_URI = "git://github.com/KhronosGroup/Vulkan-ValidationLayers.git;branch=sdk-1.3.231;protocol=https" + +SRCREV="f489610de566df6a5c20de1a3e54776e0ad852e1" + +S = "${WORKDIR}/git" + +REQUIRED_DISTRO_FEATURES = "vulkan" + +inherit cmake features_check pkgconfig + +DEPENDS += "vulkan-headers" +DEPENDS += "spirv-headers spirv-tools" +DEPENDS += "vulkan-loader" +DEPENDS += "glslang" + +EXTRA_OECMAKE = "\ + -DBUILD_TESTS=OFF \ + -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3 \ + -DASSEMBLER_WORKS=FALSE \ + -DVULKAN_HEADERS_INSTALL_DIR=${STAGING_EXECPREFIXDIR} \ + -DGLSLANG_INSTALL_DIR=${STAGING_DATADIR} \ + -DSPIRV_HEADERS_INSTALL_DIR=${STAGING_EXECPREFIXDIR} \ + -DUSE_ROBIN_HOOD_HASHING=OFF \ + " + +PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF, libxcb libx11 libxrandr" +PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland" + +FILES:${PN} += "/usr/share/vulkan/ /usr/lib/" + +INSANE_SKIP:${PN} += " ldflags" +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_SYSROOT_STRIP = "1" +SOLIBS = ".so" +FILES_SOLIBSDEV = "" + +UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
Add a recipe to build the Khronos official Vulkan validation layers that can assist developers in verifying that their applications correctly use the Vulkan APIs. Signed-off-by: Jordan Crouse <jorcrous@amazon.com> --- .../vulkan/vulkan-validation_1.3.231.1.bb | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 meta/recipes-graphics/vulkan/vulkan-validation_1.3.231.1.bb