[PATCH] sdk-files: Enforce RPATH usage during relocation

1 view
Skip to first unread message

Jan Kiszka

unread,
Jan 2, 2023, 11:10:10 AM1/2/23
to isar-users
From: Jan Kiszka <jan.k...@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.k...@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

Uladzimir Bely

unread,
Jan 11, 2023, 12:43:19 AM1/11/23
to isar-users, Jan Kiszka
In the email from Monday, 2 January 2023 19:10:01 +03 user Jan Kiszka wrote:
> From: Jan Kiszka <jan.k...@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.k...@siemens.com>

Applied to next, thanks.



Reply all
Reply to author
Forward
0 new messages