On Sun, Jun 11, 2023 at 3:55 PM Vincent Davis Jr <vi...@underview.tech> wrote: > > if usrmerge included in DISTRO_FEATURES base_libdir is set to > "/usr/lib{64}" instead of "lib{64}". Build issues occur when > building vulkan-validation-layers or any recipe that > requires the output of spirv-tools (SPIRV-ToolsTarget.cmake). > > As INTERFACE_LINK_LIBRARIES cmake property value is set incorrectly. > _IMPORT_PREFIX is already set to <recipes-sysroot>/usr > if usrmerge included INTERFACE_LINK_LIBRARIES value would be > <recipes-sysroot>/usr/usr/lib > > Leading to bellow error > > recipe-sysroot/usr/usr/lib', needed by > 'layers/libVkLayer_khronos_validation.so', > missing and no known rule to make it > > Solution: > > Remove "/usr/" from base_libdir string if present as base_libdir > should only contain name of directory. > > Signed-off-by: Vincent Davis Jr <vi...@underview.tech> > --- > meta/recipes-graphics/spir/spirv-tools_1.3.243.0.bb | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/meta/recipes-graphics/spir/spirv-tools_1.3.243.0.bb > b/meta/recipes-graphics/spir/spirv-tools_1.3.243.0.bb > index 21f9dd9650..dbfdbd4e0a 100644 > --- a/meta/recipes-graphics/spir/spirv-tools_1.3.243.0.bb > +++ b/meta/recipes-graphics/spir/spirv-tools_1.3.243.0.bb > @@ -28,11 +28,22 @@ EXTRA_OECMAKE += "\ > -DSPIRV_SKIP_TESTS=ON \ > " > > +# Removes "/usr/" from base_libdir if exist as > +# it's already define in _IMPORT_PREFIX string > +# leading to <recipes-sysroot>/usr/usr/lib not > +# found as it doesn't exist. > +def update_base_libdir(d): > + base_libdir=d.getVar("base_libdir") > + if '/usr/' in base_libdir: > + return base_libdir.strip("/usr/") > + return base_libdir > +
baselib variable exists already. Please try to use that instead. > do_install:append:class-target() { > + baselibdir="${@update_base_libdir(d)}" > # Properly set _IMPORT_PREFIX in INTERFACE_LINK_LIBRARIES so that > dependent > # tools can find the right library > sed -i ${D}${libdir}/cmake/SPIRV-Tools/SPIRV-ToolsTarget.cmake \ > - -e 's:INTERFACE_LINK_LIBRARIES.*$:INTERFACE_LINK_LIBRARIES > "\$\{_IMPORT_PREFIX\}\${base_libdir}":' > + -e 's:INTERFACE_LINK_LIBRARIES.*$:INTERFACE_LINK_LIBRARIES > "\$\{_IMPORT_PREFIX\}\${baselibdir}":' > } > > # all the libraries are unversioned, so don't pack it on PN-dev > -- > 2.34.1 > > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#182643): https://lists.openembedded.org/g/openembedded-core/message/182643 Mute This Topic: https://lists.openembedded.org/mt/99472427/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-