Posts

Post not yet marked as solved
2 Replies
1k Views
My hardened, developer-delivered MacOS app has a couple of embedded command-line executables, which are called from the main app, as well as dozens of dylibs that those executables require.The executables are in Contents/MacOS and the libraries are in Contents/lib/*.dylib. I used install_name_tool to point the executables at the appropriate dylibs with @executable_path. They are all signed; this has run great in the past, and the existing binary still runs fine. But...now when I build and run the unchanged app in Xcode (both 12 and 13), I get an error when the executable is called: dyld: Library not loaded @executable_path/../lib/library.dylib Referenced from: .../Contents/MacOS/subprogram Reason: no suitable image found.  Did find: file system relative paths not allowed in hardened programs Anybody know if a rule has changed here? Is @executable_path no longer supported in hardened environments? I've spent hours experimenting here. In searching the forums, I find various references to putting the dylibs into a framework. I tried just moving the dylibs into ../Framework instead of ../lib, with same error. Will switching to @rpath fix this? Would encapsulating them in full frameworks fix this? Is there any tool/documentation for that process? Does it require one framework for each dylib?
Posted
by mackworth.
Last updated
.
Post not yet marked as solved
0 Replies
1.4k Views
(Copying this info from StackOverflow, so people can find it here in the beta section.https://stackoverflow.com/questions/56455562/xcode-11-beta-simulator-crashes-when-trying-to-load-audiotoolbox )So if you get these error message from dyld in the simulator:dyld: Symbol not found: __ZTISt11logic_error Referenced from: <<your program>> Expected in: /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox in <<your program>>or __ZTISt9bad_alloc error. then you've run into a bug in the iOS 13 Beta SDK. You can hack around it by editing the AudioToolbox.tbd file within the SDK to remove the __ZTISt11logic_error (et al) symbols that shouldn't have been exported from there.Specifically, the file is at /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox.tbdand the lines you take out are: weak-def-symbols: [ __ZTI11CAException, __ZTIN8DSPGraph9ExceptionE, __ZTINSt3__112bad_weak_ptrE, __ZTINSt3__117bad_function_callE, __ZTISt11logic_error, __ZTISt12length_error, __ZTISt12out_of_range, __ZTISt13runtime_error, __ZTISt16invalid_argument, __ZTISt18bad_variant_access, __ZTISt8bad_cast, __ZTISt9bad_alloc, __ZTISt9exception, __ZTS11CAException, __ZTSN8DSPGraph9ExceptionE, __ZTSNSt3__112bad_weak_ptrE, __ZTSNSt3__117bad_function_callE, __ZTSSt11logic_error, __ZTSSt12length_error, __ZTSSt12out_of_range, __ZTSSt13runtime_error, __ZTSSt16invalid_argument, __ZTSSt18bad_variant_access, __ZTSSt8bad_cast, __ZTSSt9bad_alloc, __ZTSSt9exception ]
Posted
by mackworth.
Last updated
.