From 4275b23a276a42285ad065899c9e649adcf6194d Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Sat, 18 Jul 2026 12:27:45 +0500 Subject: [PATCH] ifcviewer: fatal_error on missing patchelf instead of warning --- nix/build-all.py | 2 ++ src/ifcviewer/CMakeLists.txt | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/nix/build-all.py b/nix/build-all.py index b422579188..1d244479e5 100644 --- a/nix/build-all.py +++ b/nix/build-all.py @@ -444,6 +444,8 @@ if "wasm" in flags: required_commands.append("pyodide") required_commands.remove(yacc) required_commands.remove(bison) +if platform.system() == "Linux" and "BonsaiViewer" in targets: + required_commands.append("patchelf") for cmd in required_commands: if shutil.which(cmd) is None: diff --git a/src/ifcviewer/CMakeLists.txt b/src/ifcviewer/CMakeLists.txt index 9b43b45279..fbca735837 100644 --- a/src/ifcviewer/CMakeLists.txt +++ b/src/ifcviewer/CMakeLists.txt @@ -82,6 +82,7 @@ FetchContent_MakeAvailable(wgpu_native) # the SONAME in once at configure time so dependents get a clean # libwgpu_native.so reference, and pin the executable's rpath to the lib dir. if(UNIX AND NOT APPLE) + # Critical: skipping this makes installation fail later. find_program(PATCHELF_EXECUTABLE patchelf) if(PATCHELF_EXECUTABLE) execute_process( @@ -90,10 +91,10 @@ if(UNIX AND NOT APPLE) RESULT_VARIABLE _patchelf_rc ) if(NOT _patchelf_rc EQUAL 0) - message(WARNING "patchelf --set-soname failed on libwgpu_native.so") + message(FATAL_ERROR "patchelf --set-soname failed on libwgpu_native.so") endif() else() - message(WARNING + message(FATAL_ERROR "patchelf not found; libwgpu_native.so will be linked with a " "relative DT_NEEDED. Install patchelf to fix.") endif()