From 85fc651460f0e408548c13d7056e7e30a148a946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?= Date: Tue, 21 Jun 2022 13:57:38 +0200 Subject: build: catch RuntimeError for install_name_tool on macOS To solve the issue when trying to add a RPATH to a binary that already has it. Pick-to: 6.3 Change-Id: Ia181d932d03c81f3c4a244e267c97cca84d30620 Reviewed-by: Friedemann Kleint --- build_scripts/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'build_scripts/utils.py') diff --git a/build_scripts/utils.py b/build_scripts/utils.py index 39a69e385..a99ef073b 100644 --- a/build_scripts/utils.py +++ b/build_scripts/utils.py @@ -565,7 +565,10 @@ def macos_get_rpaths(libpath): def macos_add_rpath(rpath, library_path): - back_tick(f"install_name_tool -add_rpath {rpath} {library_path}") + try: + back_tick(f"install_name_tool -add_rpath {rpath} {library_path}") + except RuntimeError as e: + print(f"Exception {type(e).__name__}: {e}") def macos_fix_rpaths_for_library(library_path, qt_lib_dir): -- cgit v1.2.3