Last night I updated my system to 11.5.2 but found that clang no longer was working, especially for a project I need to compile from command line.
Here's the output I'm receiving
(base) kd@kd-MacBook-Pro ~ % clang --version
objc[3677]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x20082bad8) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1233e42b8). One of the two will be used. Which one is undefined.
objc[3677]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x20082bb28) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1233e4308). One of the two will be used. Which one is undefined.
xcodebuild: error: SDK "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" cannot be located.
clang: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find clang 2> /dev/null' failed with exit code 16384: (null) (errno=Invalid argument)
xcode-select: Failed to locate 'clang', requesting installation of command line developer tools.
(base) kd@kd-MacBook-Pro ~ % ls /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
Entitlements.plist SDKSettings.json SDKSettings.plist System usr
(base) kd@kd-MacBook-Pro ~ %
As you can see the directory does in fact exist, what's new is that AMSupportURLConnectionDelegate and AMSupportURLSession had popped up, /usr/lib sounds like the correct place but that Mobile directory it's referencing is beyond me.
My seeking suspicion is that Mobile framework? I'm not sure. If I allow Clang to install, it goes right back to providing this error. If I even restart the terminal or even the computer it still has this error.
How do I fix this so clang is found, no longer asking me to install it and providing this nasty error.