public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH] sdk-files: Enforce RPATH usage during relocation
Date: Mon, 2 Jan 2023 17:10:01 +0100	[thread overview]
Message-ID: <0d0b57d6-746d-8102-be36-357b35d1e030@siemens.com> (raw)

From: Jan Kiszka <jan.kiszka@siemens.com>

This is needed to ensure that dlopen'ed libs are also taken from the SDK
and not the host system, see also
https://www.qt.io/blog/2011/10/28/rpath-and-runpath.

Probably became broken for bullseye SDKs, see the bug report in
https://github.com/siemens/meta-iot2050/issues/392.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta/recipes-devtools/sdk-files/files/relocate-sdk.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/sdk-files/files/relocate-sdk.sh b/meta/recipes-devtools/sdk-files/files/relocate-sdk.sh
index 0d1c6330..82f63b30 100755
--- a/meta/recipes-devtools/sdk-files/files/relocate-sdk.sh
+++ b/meta/recipes-devtools/sdk-files/files/relocate-sdk.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # This software is a part of ISAR.
-# Copyright (c) Siemens AG, 2020
+# Copyright (c) Siemens AG, 2020-2023
 #
 # SPDX-License-Identifier: MIT
 
@@ -34,6 +34,7 @@ for binary in $(find ${sdkroot}/usr/bin ${sdkroot}/usr/sbin ${sdkroot}/usr/lib/g
 	if [ -n "${interpreter}" ]; then
 		patchelf --set-interpreter ${new_sdkroot}${interpreter} \
 			--set-rpath ${new_sdkroot}/usr/lib:${new_sdkroot}/usr/lib/${arch}-linux-gnu \
+			--force-rpath \
 			$binary 2>/dev/null
 	fi
 done
-- 
2.35.3

             reply	other threads:[~2023-01-02 16:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-02 16:10 Jan Kiszka [this message]
2023-01-11  5:43 ` Uladzimir Bely

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=0d0b57d6-746d-8102-be36-357b35d1e030@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=isar-users@googlegroups.com \
    /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