symbol collision being reported on stderr by opendiff (a part of Xcode)

Not really a "developer" question per se, but related to the Xcode developer tools as run on a new M1 Mac running Monterey (12.1).

When running various tools, such as "opendiff" I receive the following error reported on stderr: objc[6599]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1e30deb90) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x108f7c2c8). One of the two will be used. Which one is undefined. objc[6599]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1e30debe0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x108f7c318). One of the two will be used. Which one is undefined.

I'm working on the assumption that two conflicting libraries have been installed that provide a definition for the same symbol, and (since the opendiff program loads and runs) that at least for now, both symbols are defined in a similar enough way that whichever one is actually loaded works.

I was at first very confused because there is actually no file on my system with the name /usr/lib/libauthinstall.dylib

While this makes the error message rather confusing, I found this thread https://developer.apple.com/forums/thread/692383 that makes clear that many of the files in /usr/lib in an earlier part of the release process are amalgamated, and I assume that libauthinstall.dylib is one of these files.

Given that this implies that the /usr/lib versions are likely the "more authoritative" versions, I am not actually sure why the directory /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework even exists -- I don't do any mobile development on this machine, so I assume that it came out of the setup, or possible from a migration of the user content from a machine running BigSur (content transferred using TimeMachine).

Does anyone have any ideas regarding: (a) how this came about (as it appears that both sources are installed by Apple), and (b) how I can remove the conflict.

I'm using opendiff in a project workflow and really don't want to see the workflow polluted with spurious error messages, not to mention the fragility of not being able to control which symbol these tools are actually using.

Thanks in advance for any thoughts.

EDIT: There are a number of posts around the 'net linking this error with "homebrew". I believe that this is at least partially a red herring, because: a) I don't use homebrew (though I do use MacPorts) -- I avoid hombrew largely because of its plan to play in /usr while MacPorts keeps everything well out of the way in /opt b) both of the named sources are from Apple.

MobileDevice framework is weird because it’s used by both macOS itself (for the Finder’s device management [1]) and Xcode. Both clients need to be able to update the framework independently as Apple ships new iOS releases (including beta releases) and hardware. That’s why it’s in /Library/Apple/System/Library rather than, say, /System/Library.

I am not actually sure why the directory …/MobileDevice.framework even exists — I don't do any mobile development on this machine

It’s part of the base macOS install. I verified this by restoring my macOS 12.0.1 VM to a snapshot taken immediately after running through the setup assistant, and there it is.

As to this message, it’s definitely log noise. See this post for an earlier discussion.

I'm using opendiff in a project workflow and really don't want to see the workflow polluted with spurious error messages

Fair enough. In that case:

  • Please file a bug about this.

  • You should be able to work around it by wrapping opendiff in a shell script that filters out the noise.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] It’s actually weirder than that, because this functionality has only recently moved into the OS. Previously it was part of iTunes, and iTunes was responsible for installing the framework.

Great -- thank you for the feedback. Bug logged, ID https://feedbackassistant.apple.com/feedback/9851914

fyi, it is not just opendiff

For example:

xcrun --sdk iphoneos --show-sdk-version

will show the same warnings.

I could not see the submitted bug, presumably those are not public?

To complete, the warning message suddenly went away.
Most likely because something changed when I installed command line development tools.

Yeah, definitely not just opendiff. I've seen it periodically in some other tools, but as they were being run from scripts haven't tracked down exactly which tools yet.

The bugs are public, but I believe that you need to sign up for a (free) developer account to log in. What are you seeing when you try to visit the link?

Per your "went away" comment -- I though that this had gone away from opendiff for a similar reason (updates installed) but now it is back again.

In my case (MacBook Pro 14 M1) these messages have been showing after executing several commands like: xcodebuild, git, swift, ... (command tools connected with xcode). It is so annoying. Quick fix to get rid of warnings is to switch a Terminal App to 'Open using Rosetta' (Applications -> Terminal -> 'Get Info') option. But after doing a quick fix, all commands executed in Terminal get a serious lag. And it's even more annoying! So I switched back to not to 'open using rosetta'. It's pretty clear that the problem refer somehow to native M1 software compatibility of xcode developer package. Waiting for updates.

I have the same problem on my M1. Is there any solution????

Same output when I ran % python3 for the first time. I also installed the Xcode command line tools a week ago; don't think I've touched anything else that could affect it. Hope that info helps!

FYI similar error here:

objc[8608]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libamsupport.dylib (0x21488b678) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1065ac2c8). One of the two will be used. Which one is undefined.

objc[8608]: Class AMSupportURLSession is implemented in both /usr/lib/libamsupport.dylib (0x21488b6c8) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1065ac318). One of the two will be used. Which one is undefined.

objc[8609]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libamsupport.dylib (0x21488b678) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1079c02c8). One of the two will be used. Which one is undefined.

objc[8609]: Class AMSupportURLSession is implemented in both /usr/lib/libamsupport.dylib (0x21488b6c8) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1079c0318). One of the two will be used. Which one is undefined.

Brand new MacBookPro M1, launched a few commands for the first time (git, python3) these errors pop up. Subsequent runs seem to be unaffected.

FYI on the arm64 (M1) Macs, Homebrew installs to /opt/homebrew/bin.

Hello! For flutter development case, You need to add this library https://pub.dev/packages/platform

I have the same issue. Every time I open my terminal, it's spammed with this message.

For anyone else looking for a solution for this:

I was seeing this error when running clang --version.

So I found the comment from this guys, which solves it (it is the second post from excelsior_ink on the discussion):

It seems it was caused maybe due to uninstalling homebrew. I fixed it by:

sudo xcode-select -r

https://discussions.apple.com/thread/252824300?answerId=252824300021#252824300021

Running “xcode-select --install” and then “xcode-select -s /Library/Developer/CommandLineTools” made the error go away for me. 

Hi people,

The instruction “xcode-select -s /Library/Developer/CommandLineTools” worked for me as well. Cheers.

I just encountered this problem with the new Xcode beta 13.3.1 build 13E500a.

sudo xcode-select -r fixed the issue for me.

For iOS development sudo xcode-select -s /Library/Developer/CommandLineTools might not work. For my build flow, we make use of Cocoapods and a post-install script that leverages xcodebuild. When attempting to run, I get the following error:

error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

sudo xcode-select -r resets my state to normal, but does not silence the warnings we're discussing here.

I tried the various things suggested here and none of them fixed the problem for me. What did fix it was to disable Bitdefender's ransomware protection. Then I could do my builds and they worked just fine. So if you use Bitdefender, give that a try.

Installing a new macOS update, that is v12.4, resolved my issue.

How can I remove one of them? I use Xcode 13.2.1 When I update my MacOS 12.6 it installed latest command line.

symbol collision being reported on stderr by opendiff (a part of Xcode)
 
 
Q