brew: XCode CLT incorrectly flagged as required under XCode 9.1/MacOS 10.12

  • Confirmed this is a problem with running a brew command and not brew installing or the post-install behaviour of one or more formulae? If it’s a formulae-specific problem please file this issue at the relevant tap e.g. for Homebrew/homebrew-core https://github.com/Homebrew/homebrew-core/issues/new
  • Ran brew update and retried your prior step?
  • Ran brew doctor, fixed all issues and retried your prior step?
    • As much as possible, given the nature of this issue
  • Ran brew config and brew doctor and included their output with your issue?

Debug Output

Config Output

HOMEBREW_VERSION: 1.3.8
ORIGIN: https://github.com/Homebrew/brew
HEAD: 236b0172306a6f4b233d374fcc20adce5c3e3261
Last commit: 17 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 4044983a9319949da0b3087e988405f83ab9ea2c
Core tap last commit: 14 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DEV_CMD_RUN: 1
HOMEBREW_GIT_CONFIG_FILE: /usr/local/Homebrew/.git/config
HOMEBREW_NO_ANALYTICS_THIS_RUN: 1
CPU: quad-core 64-bit skylake
Homebrew Ruby: 2.3.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/bin/ruby
Clang: 9.0 build 900
Git: 2.15.0 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: N/A
macOS: 10.12.6-x86_64
Xcode: 9.1
CLT: N/A
X11: 2.7.11 => /opt/X11

Doctor output

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
  /usr/local/lib/libnnz11.dylib
  /usr/local/lib/libociei.dylib
  /usr/local/lib/libocijdbc11.dylib

Warning: Xcode alone is not sufficient on Sierra.
Install the Command Line Tools:
  xcode-select --install

Issue Description

To help us debug your issue please explain:

  • What you were trying to do (and why)
  • What happened (include command output)
    brew upgrade
    Error: Xcode alone is not sufficient on Sierra.
    Install the Command Line Tools:
    xcode-select --install
    
  • What you expected to happen
    • Brew upgrade to run 😉
  • Step-by-step reproduction instructions (by running brew commands)

Since the approximate landing of #3453, brew is flagging my XCode 9.1 install on MacOS 10.12 (Sierra) as missing the CLTs. If I follow the CLT code correctly, XCode 9.1 should be flagged as the latest XCode for this platform for Sierra and not requiring a separate install. xcode-select --install confirms that there is no version available for this platform (ran from multiple locations across multiple days). I do have the command line tools in path and they are located under /Applications/Xcode.app/Contents/Developer as verified via xcode-select -p.

A full Xcode removal and reinstall (both via the App Store and via a terminal initiated xcode-select --install) does not correct this problem. The one step I have not tried, as I’m not sure of it’s safety, is to install the 9.0.1 CLTs on top of a XCode 9.1 install.

Thanks for the terrific tool and thanks in advance for the help!

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

@pixlwave Apple stopped bundling old macOS SDK versions in newer versions of Xcode (so they only had the latest version of macOS not the installed version) which required huge numbers of hacks to work around this. We wanted to remove the hacks hence this change.

Some minor differences from ours, which shouldn’t matter. But you can try

sudo softwareupdate --clear-catalog

and see if it makes any difference.

Also seeing xcode-select -p still pointing to the same (previous/incorrect location.

That is correct and what’s expected.

No. Nothing new found.

Odd. On Jenkins, we currently have the same Xcode 9.1 / CLT 9.0.1.0.1.1506734476 configuration you do. But softwareupdate -l is listing an upgrade for the 9.1 CLT available.