Recipe added with a fix to error: '../recipe-sysroot/usr/lib', needed by 'layers/libVkLayer_khronos_validation.so', missing and no known rule to make it
Taking a look into ${B}/build.ninja LINK_LIBRARIES = \ layers/libVkLayer_utils.a <absolute path>/recipe-sysroot/usr/lib64/libSPIRV-Tools-opt.so <absolute path>/recipe-sysroot/usr/lib64/libSPIRV-Tools.so <absolute path>/recipe-sysroot/usr/lib "../recipe-sysroot/usr/lib" doesn't exists when base_libdir = lib64. After research there appears to be no solution to fix "../recipe-sysroot/usr/lib" from being included in cmake LINK_LIBARIES. Solution is to temporarily create it "../recipes-sysroot/usr/lib" to bypass build issues. Signed-off-by: Vincent Davis Jr <vi...@underview.tech> --- meta/conf/distro/include/maintainers.inc | 1 + .../vulkan-validation-layers_1.3.243.0.bb | 73 +++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 meta/recipes-graphics/vulkan/vulkan-validation-layers_1.3.243.0.bb diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 0f7b7287bb..b06ae43dac 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -827,6 +827,7 @@ RECIPE_MAINTAINER:pn-vulkan-headers = "Anuj Mittal <anuj.mit...@intel.com>" RECIPE_MAINTAINER:pn-vulkan-loader = "Anuj Mittal <anuj.mit...@intel.com>" RECIPE_MAINTAINER:pn-vulkan-samples = "Ross Burton <ross.bur...@arm.com>" RECIPE_MAINTAINER:pn-vulkan-tools = "Anuj Mittal <anuj.mit...@intel.com>" +RECIPE_MAINTAINER:pn-vulkan-validation-layers = "Vincent Davis Jr <vi...@underview.tech>" RECIPE_MAINTAINER:pn-waffle = "Ross Burton <ross.bur...@arm.com>" RECIPE_MAINTAINER:pn-watchdog = "Alexander Kanavin <alex.kana...@gmail.com>" RECIPE_MAINTAINER:pn-watchdog-config = "Alexander Kanavin <alex.kana...@gmail.com>" diff --git a/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.3.243.0.bb b/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.3.243.0.bb new file mode 100644 index 0000000000..2d71b66f55 --- /dev/null +++ b/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.3.243.0.bb @@ -0,0 +1,73 @@ +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://g...@github.com/KhronosGroup/Vulkan-ValidationLayers.git;branch=sdk-1.3.243;protocol=https" +SRCREV = "4ac0fd8e6cb3d49105d707d9ec07f0f3aa0943d6" + +S = "${WORKDIR}/git" + +REQUIRED_DISTRO_FEATURES = "vulkan" + +DEPENDS = "vulkan-headers vulkan-loader spirv-headers spirv-tools glslang" + +# BUILD_TESTS - Not required for OE builds +# USE_ROBIN_HOOD_HASHING - Provides substantial performance improvements on all platforms. +# Yocto project doesn't contain a recipe for package so disabled it. +EXTRA_OECMAKE = "\ + -DBUILD_TESTS=OFF \ + -DUSE_ROBIN_HOOD_HASHING=OFF \ + -DGLSLANG_INSTALL_DIR=${STAGING_DATADIR} \ + -DVULKAN_HEADERS_INSTALL_DIR=${STAGING_EXECPREFIXDIR} \ + -DSPIRV_HEADERS_INSTALL_DIR=${STAGING_EXECPREFIXDIR} \ + " + +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" + +PACKAGECONFIG ?= "\ + ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)} \ + " + +inherit cmake features_check pkgconfig + +# error: '../recipe-sysroot/usr/lib', needed by 'layers/libVkLayer_khronos_validation.so', missing and no known rule to make it +# Taking a look into ${B}/build.ninja +# LINK_LIBRARIES = \ +# layers/libVkLayer_utils.a +# <absolute path>/vulkan-validation-layers/1.3.243.0-r0/recipe-sysroot/usr/lib64/libSPIRV-Tools-opt.so +# <absolute path>/vulkan-validation-layers/1.3.243.0-r0/recipe-sysroot/usr/lib64/libSPIRV-Tools.so +# <absolute path>/vulkan-validation-layers/1.3.243.0-r0/recipe-sysroot/usr/lib +# "../recipe-sysroot/usr/lib" doesn't exists when base_libdir = lib64. After research there appears +# to be no solution to fix "../recipe-sysroot/usr/lib" from being included in cmake LINK_LIBARIES. +# Temporarily create it "../recipes-sysroot/usr/lib" to bypass build issues. +do_configure:prepend:class-target () { + if [ "${libdir}" = "/usr/lib64" ]; then + ln -sfv "${STAGING_LIBDIR}" "${STAGING_DIR_TARGET}/usr/lib" + fi +} + +do_compile:append:class-target () { + if [ "${libdir}" = "/usr/lib64" ]; then + rm -rf "${STAGING_DIR_TARGET}/usr/lib" + fi +} + +FILES:${PN} += "${datadir}/vulkan ${libdir}" + +SOLIBS = ".so" +FILES_SOLIBSDEV = "" + +# These recipes need to be updated in lockstep with each other: +# glslang, vulkan-headers, vulkan-loader, vulkan-tools, +# vulkan-validation-layers, spirv-headers, spirv-tools +# The tags versions should always be sdk-x.y.z, as this is what +# upstream considers a release. +UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)" -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#182345): https://lists.openembedded.org/g/openembedded-core/message/182345 Mute This Topic: https://lists.openembedded.org/mt/99300453/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-