1

I have a application, I wrote 6 years ago, which includes functionality to compare files. Recently this seems to ignore the compare files command. I did a little digging into the code, and this uses opendiff to perform this function.

I will try to dive into the code to follow up, but my question relates to some of my findings.

There are 2 instances of opendiff

/Applications/Xcode.app/Contents/Developer/usr/bin/opendiff
-rwxr-xr-x  1 root  wheel  23712  5 Jun 13:22 /Applications/Xcode.app/Contents/Developer/usr/bin/opendiff

/usr/bin/opendiff
-rwxr-xr-x  1 root  wheel  18304 30 May 09:35 /usr/bin/opendiff

Running the first works as expected.

Running the second produces the following error

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

This error is incomprehensible (at least to me), and I do not know where this came from.

I suspected Command Line Tools may be implicated, and I did install brew 2 days ago (to get an up-to-date rsync)

I would just delete /usr/bin/opendiff, but cannot - probably due to SIP.


I just booted up my MacBook Pro running 10.13.3 and all seems OK.

/usr/bin/opendiff runs, and starts FileMerge 2.10

4

Switch your active developer directory to the correct one as opposed to the one that was chosen (the one in the error message) when brew installed command line tools with:

xcode-select -s /Applications/Xcode.app/Contents/Developer
  • I had previously avoided brew - preferring to stick with macOS, but this seems to be slipping behind (still no Python3) – Milliways Jun 14 '18 at 7:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .