From 283d5c96ec48fdacf67514943fc325f3ee4ce8e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 3 Jan 2023 18:49:51 +0100 Subject: [PATCH] macdeployqt: Don't remove rpaths more than once In a universal build the tool will find multiple duplicated rpaths, but the install_name tool doesn't like it if we try to remove it more than once. Fixes: QTBUG-109738 Change-Id: I4a8bea0ad3e47b28e6384ceead551edc83e30d26 Reviewed-by: Timur Pocheptsov (cherry picked from commit 9a2198f9cdd5df482c64a52cb5d1e372ac24610c) Reviewed-by: Qt Cherry-pick Bot --- src/tools/macdeployqt/shared/shared.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tools/macdeployqt/shared/shared.cpp b/src/tools/macdeployqt/shared/shared.cpp index 8df6199abe2..643fe5390a7 100644 --- a/src/tools/macdeployqt/shared/shared.cpp +++ b/src/tools/macdeployqt/shared/shared.cpp @@ -874,7 +874,8 @@ void deployRPaths(const QString &bundlePath, const QList &rpaths, const continue; } if (rpaths.contains(resolveDyldPrefix(rpath, binaryPath, binaryPath))) { - args << "-delete_rpath" << rpath; + if (!args.contains(rpath)) + args << "-delete_rpath" << rpath; } } if (!args.length()) {