From: Jordan Crouse <jorcrous@amazon.com>
To: <openembedded-core@lists.openembedded.org>
Cc: Jordan Crouse <jorcrous@amazon.com>
Subject: [PATCH 1/3] spirv-tools: Correctly set the prefix in exported cmake packages
Date: Thu, 10 Nov 2022 20:42:30 +0000 [thread overview]
Message-ID: <20221110204232.12768-2-jorcrous@amazon.com> (raw)
In-Reply-To: <20221110204232.12768-1-jorcrous@amazon.com>
spirv-tools exports Cmake packages. When they are installed the
INTERFACE_LINK_LIBRARIES variable is not correctly updated to use
_IMPORT_PREFIX like the other variables. This may have something to do with
the path to the sysroot being different than the source path.
The existing recipe recognizes that the sysroot path made it through to the
install and tries to get rid of it, but this just ends up with dependent
tools looking in vain for /usr/lib/librt.so.
Replace the INTERFACE_LINK_LIBRARIES value in SPIRV-ToolsTarget.cmake with
"${IMPORT_PREFIX}/lib".
Signed-off-by: Jordan Crouse <jorcrous@amazon.com>
---
meta/recipes-graphics/spir/spirv-tools_1.3.231.1.bb | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-graphics/spir/spirv-tools_1.3.231.1.bb b/meta/recipes-graphics/spir/spirv-tools_1.3.231.1.bb
index ea47796543..fdc9c9225a 100644
--- a/meta/recipes-graphics/spir/spirv-tools_1.3.231.1.bb
+++ b/meta/recipes-graphics/spir/spirv-tools_1.3.231.1.bb
@@ -10,6 +10,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
SRCREV = "eb0a36633d2acf4de82588504f951ad0f2cecacb"
SRC_URI = "git://github.com/KhronosGroup/SPIRV-Tools.git;branch=master;protocol=https"
PE = "1"
+PR = "r1"
+
UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
S = "${WORKDIR}/git"
@@ -25,9 +27,10 @@ EXTRA_OECMAKE += "\
"
do_install:append:class-target() {
- # reproducibility: remove build host path
+ # 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:${STAGING_DIR_HOST}::g'
+ -e 's:INTERFACE_LINK_LIBRARIES.*$:INTERFACE_LINK_LIBRARIES "\$\{_IMPORT_PREFIX\}/lib":'
}
# all the libraries are unversioned, so don't pack it on PN-dev
--
2.37.1
next prev parent reply other threads:[~2022-11-10 20:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-10 20:42 [PATCH 0/3] Add vulkan validation and improvements for headless devices Jordan Crouse
2022-11-10 20:42 ` Jordan Crouse [this message]
2022-11-10 20:43 ` [OE-core] [PATCH 1/3] spirv-tools: Correctly set the prefix in exported cmake packages Khem Raj
2022-11-11 10:44 ` Jose Quaresma
2022-11-10 20:42 ` [PATCH 2/3] vulkan-loader: Allow headless targets to build the loader Jordan Crouse
2022-11-10 20:42 ` [PATCH 3/3] vulkan-validation: Add the official Vulkan validation layers Jordan Crouse
2022-11-10 20:57 ` [OE-core] " Alexander Kanavin
2022-11-10 21:30 ` Jordan Crouse
2022-11-11 8:03 ` Alexander Kanavin
2022-11-11 15:27 ` Jordan Crouse
2022-11-11 17:31 ` Alexander Kanavin
2022-11-13 22:11 ` Alexandre Belloni
2022-11-14 15:23 ` Jordan Crouse
2023-06-01 21:55 ` Vincent Davis Jr
2023-06-02 5:21 ` [OE-core] " Alexander Kanavin
2023-06-27 17:10 ` Jordan Crouse
2023-06-27 19:13 ` Alexander Kanavin
2023-06-27 19:26 ` Vincent Davis Jr
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=20221110204232.12768-2-jorcrous@amazon.com \
--to=jorcrous@amazon.com \
--cc=openembedded-core@lists.openembedded.org \
/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