Date
1 - 3 of 3
library not found: libclang_rt.tsan_osx_dynamic.dylib
Gerriet M. Denkmann
On 16 Jun 2022, at 00:37, Ben Kennedy <ben-groups@...> wrote:Iff the Thread Sanitiser is enabled on the main app, then its HelperTool will contain lots of Xcode stuff. The main app asks the HelperTool for its version, and if they don’t match, then a new HelperTool will be installed into /Library/PrivilegedHelperTools. The old thing in PrivilegedHelperTools did contain Xcode stuff, including a reference to XcodeDefault.xctoolchain/usr/lib/clang/13.0.0. This should not have happened; but until now I was not aware of this danger. But everything worked fine, until I installed a newer version of Xcode (which has clang/13.1.6). So now, when the main app asked the HelperTool for its version, it just crashed without invoking any of the error handlers in the main app. Lesson learnt: do NOT put a HelperTool with Debug-stuff into PrivilegedHelperTools. This is only ok for testing, but might crash with the next version of Xcode. Gerriet. |
|
This is a wild guess, but are you building with Thread Sanitizer enabled? (The "tsan" in the missing library name suggests so.)
toggle quoted message
Show quoted text
That the named clang version (13.0.0) seems not to match your toolchain (13.1.6) seems unusual also. Is this a development or release build? Is it running on the same system that it was built on? -ben On 15 Jun 2022, at 3:55 am, Gerriet M. Denkmann <gerriet@...> wrote: |
|
Gerriet M. Denkmann
I have an macOS app, which uses a privileged helper tool: de.mdenkmann.SW-Helper
This helper tool crashes with (Console.app): ASI found [dyld] (sensitive) 'Library not loaded: @rpath/libclang_rt.tsan_osx_dynamic.dylib Referenced from: /Library/PrivilegedHelperTools/de.mdenkmann.SW-Helper Reason: tried: '/Library/PrivilegedHelperTools/libclang_rt.tsan_osx_dynamic.dylib' (no such file), '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/lib/darwin/libclang_rt.tsan_osx_dynamic.dylib' (no such file), '/Library/PrivilegedHelperTools/libclang_rt.tsan_osx_dynamic.dylib' (no such file), '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/lib/darwin/libclang_rt.tsan_osx_dynamic.dylib' (no such file), '/usr/local/lib/libclang_rt.tsan_osx_dynamic.dylib' (no such file), '/usr/lib/libclang_rt.tsan_osx_dynamic.dylib' (no such file)’ There is a: -rwxr-xr-x 1 root wheel 3555872 18 May 11:15 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/lib/darwin/libclang_rt.tsan_osx_dynamic.dylib* Note: 13.1.6 but not 13.0.0. Also I don’t understand why: -r-xr--r-- 1 root wheel 261440 2 Dec 2021 /Library/PrivilegedHelperTools/de.mdenkmann.SW-Helper* I would expect it to use: -rwxr-xr-x 1 gerriet staff 259680 15 Jun 17:28 /Users/gerriet/Library/Developer/Xcode/DerivedData/SchwarzWald-aftcfaewggcqztcrhnwltqoiahjj/Build/Products/Development/SchwarzWald.app/Contents/Library/LaunchServices/de.mdenkmann.SW-Helper* Gerriet. |
|