All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Himanshu Jadon -X (hjadon - E INFOCHIPS PRIVATE LIMITED at Cisco)" <hjadon@cisco.com>
To: openembedded-devel@lists.openembedded.org
Subject: [meta-oe][master][PATCH 2/2] suitesparse: avoid install rpath buildpaths QA
Date: Thu, 20 Aug 2026 06:03:58 -0700	[thread overview]
Message-ID: <20260820130358.2402128-2-hjadon@cisco.com> (raw)
In-Reply-To: <20260820130358.2402128-1-hjadon@cisco.com>

From: Himanshu Jadon <hjadon@cisco.com>

SuiteSparse adds -Wl,-rpath=$(INSTALL_LIB) while linking shared
libraries on Linux. In the OpenEmbedded build this value can resolve to
a build or install path under TMPDIR, so installed ELF files can keep an
absolute build path and fail buildpaths QA.

The packaged libraries do not need this install-tree rpath. Runtime
resolution is handled through normal package dependencies and the target
library search path. Keep the librt link and drop only the rpath entry.

Signed-off-by: Himanshu Jadon <hjadon@cisco.com>
---
 ...dd-install-rpath-to-shared-libraries.patch | 37 +++++++++++++++++++
 .../suitesparse/suitesparse_5.10.1.bb         |  1 +
 2 files changed, 38 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/suitesparse/suitesparse/0005-Do-not-add-install-rpath-to-shared-libraries.patch

diff --git a/meta-oe/recipes-devtools/suitesparse/suitesparse/0005-Do-not-add-install-rpath-to-shared-libraries.patch b/meta-oe/recipes-devtools/suitesparse/suitesparse/0005-Do-not-add-install-rpath-to-shared-libraries.patch
new file mode 100644
index 0000000000..a6105f73f8
--- /dev/null
+++ b/meta-oe/recipes-devtools/suitesparse/suitesparse/0005-Do-not-add-install-rpath-to-shared-libraries.patch
@@ -0,0 +1,37 @@
+From f8be0a727c506d25450386c370a846e66b3f3297 Mon Sep 17 00:00:00 2001
+From: Deepak Rathore <deeratho@cisco.com>
+Date: Wed, 5 Aug 2026 00:00:00 -0700
+Subject: [PATCH] Do not add install rpath to shared libraries
+
+SuiteSparse adds the install library directory to Linux shared library
+links through -Wl,-rpath=$(INSTALL_LIB). In Yocto builds INSTALL_LIB
+resolves to a build or install path under TMPDIR, so the final ELF files
+keep an absolute TMPDIR path in .dynstr even after chrpath removes the
+dynamic rpath tag.
+
+Yocto stages dependent SuiteSparse libraries through normal sysroot and
+package runtime dependencies. The install-tree rpath is not required for
+packaged target libraries, and it makes buildpaths QA fail.
+
+Upstream-Status: Inappropriate [oe-specific: build/install path triggers buildpaths QA]
+
+Signed-off-by: Deepak Rathore <deeratho@cisco.com>
+---
+ SuiteSparse_config/SuiteSparse_config.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/SuiteSparse_config/SuiteSparse_config.mk b/SuiteSparse_config/SuiteSparse_config.mk
+index 8309c5142..807323c4c 100644
+--- a/SuiteSparse_config/SuiteSparse_config.mk
++++ b/SuiteSparse_config/SuiteSparse_config.mk
+@@ -358,7 +358,7 @@ SUITESPARSE_VERSION = 5.10.1
+ 
+     ifeq ($(UNAME),Linux)
+         # add the realtime library, librt, and SuiteSparse/lib
+-        LDLIBS += -lrt -Wl,-rpath=$(INSTALL_LIB)
++        LDLIBS += -lrt
+     endif
+ 
+     #---------------------------------------------------------------------------
+-- 
+2.43.0
diff --git a/meta-oe/recipes-devtools/suitesparse/suitesparse_5.10.1.bb b/meta-oe/recipes-devtools/suitesparse/suitesparse_5.10.1.bb
index f655ac17fd..a2fee6400c 100644
--- a/meta-oe/recipes-devtools/suitesparse/suitesparse_5.10.1.bb
+++ b/meta-oe/recipes-devtools/suitesparse/suitesparse_5.10.1.bb
@@ -6,6 +6,7 @@ SRC_URI = "git://github.com/DrTimothyAldenDavis/SuiteSparse;protocol=https;branc
            file://0003-Add-version-information-to-libmetis.patch \
            file://makefile-quoting.patch \
            file://0004-Allow-build-with-CMake-4.patch \
+           file://0005-Do-not-add-install-rpath-to-shared-libraries.patch \
            "
 SRCREV = "538273cfd53720a10e34a3d80d3779b607e1ac26"
 
-- 
2.35.6



      reply	other threads:[~2026-08-20 13:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20 13:03 [meta-oe][master][PATCH 1/2] suitesparse: fix CMake 4 configure failure Himanshu Jadon -X (hjadon - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-08-20 13:03 ` Himanshu Jadon -X (hjadon - E INFOCHIPS PRIVATE LIMITED at Cisco) [this message]

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=20260820130358.2402128-2-hjadon@cisco.com \
    --to=hjadon@cisco.com \
    --cc=openembedded-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.