We have a huge app with many frameworks. I want to use address sanitizer with it. After enable it in Xcode and recompile the app does not start.
dyld[73936]: dyld cache '(null)' not loaded: syscall to map cache into shared region failed
dyld[73936]: Library not loaded: /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
Referenced from: <926AEF5E-4934-3EA0-BC60-64CC0A28EC0C> /Users/schmitt/Library/Developer/Xcode/DerivedData/TeamViewerWorkspace-bzqkzpkzdmerjreghjwkjpbhtmua/Build/Products/Debug/TeamViewer.app/Contents/MacOS/TeamViewer
Reason: tried: '/Users/schmitt/Library/Developer/Xcode/DerivedData/TeamViewerWorkspace-bzqkzpkzdmerjreghjwkjpbhtmua/Build/Products/Debug/Foundation.framework/Versions/C/Foundation' (no such file), '/Users/schmitt/Library/Developer/Xcode/DerivedData/TeamViewerWorkspace-bzqkzpkzdmerjreghjwkjpbhtmua/Build/Products/Debug/PackageFrameworks/Foundation.framework/Versions/C/Foundation' (no such file), '/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation' (no such file), '/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation' (no such file, no dyld cache), '/Library/Frameworks/Foundation.framework/Versions/C/Foundation' (no such file)
It looks like Foundation.framework is no longer found.
When I try the same thing with a new app from the macOS app template and link it to our frameworks, the app launches normally.
I have tried playing with the deployment target, but have no luck getting any clues as to what is going wrong