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.

Post not yet marked as solved Up vote post of andrewhw00 Down vote post of andrewhw00
22k views
  • FYI on the arm64 (M1) Macs, Homebrew installs to /opt/homebrew/bin.

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

Add a Comment

Replies

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.

  • Hello,

    I am having this issue generating a framework for CocoaPods with a script on Mac OS Monterey(12.1)

    you says :

    Please file a bug about this.

    I strongly hope this is going to be fixed by Apple....without the need to file a bug !!!

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

    Please can you elaborate more about this ? can't we simply ignore it ?

    Regards,

Add a Comment

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

Add a Comment

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.

  • I see just "Feedback Not Found" for your ticket, and on the left the tickets I've submitted myself.

    The bug seems to be very fleeting, comes and goes. I just tried again in iTerm running native arm64 and got the warning messages. I tried then in Rosetta Terminal, and it did not report the error. I went back to iTerm, and it no longer reports the error either, go figure...

Add a Comment

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 didn't even need to open the terminal in Rosetta. I just needed to run the command using arch -x86_64 (e.g.: xcrun --sdk iphoneos --show-sdk-version). However, this didn't work for all commands (notably xcodebuild)

Add a Comment

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!

Post not yet marked as solved Up vote reply of ojo Down vote reply of ojo

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.

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

  • Thanks, it worked for me on MacBook Air M1.

  • How?

Add a Comment

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

Add a Comment

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

  • This works for me.

Add a Comment

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.