Brew now requires Xcode 8.0?

(Michael Gallacher) #1

I am running Mac OS 10.11.6 with Xcode 7.3.1 and the associated command line tools. I just tried ‘brew upgrade’ and I get a “error” that my 7.3.1 is outdated and should be updated to Xcode 8.0, which is odd since ‘brew update’ works fine, and odder still that ‘brew doctor’ only considers an outdated Xcode to be just a warning.

Unfortunately, moving entirely to Xcode 8 is not an option, as Xcode 8 has fully deprecated the UI Automation instrument I use to write mobile automation tests. I have tried reinstalling homebrew from scratch, but get the same error. I have tried installing Xcode 8 and if I fiddle with ‘xcode-select’ every time I want to switch between updating brew and doing my day-to-day work, I can get by.

Why require Xcode 8?

Xcode 8.0 is outdated?
Newbie - Problem installing on Mac OS 10.12 Sierra
(Zhiming Wang) #2

It was an overly strict move, and after some debate the decision has been vastly loosened in 12aad5c. It will be made generally available with the 1.0.4 release, which will be cut fairly soon. For now there are at least three workarounds:

  1. Probably the easiest: set the TRAVIS environment variable:

     export TRAVIS=1
  2. Manually check out the master branch;

  3. Manually check out the 1.0.2 tag.

Sorry for the inconvenience.

(Victor Shoup) #3

export TRAVIS=1
That just saved me!
My brew setup stopped working almost as soon as I started using it!!
I have two macbooks that I just recently upgraded to 10.11.6, and I don’t
really feel like installing all of Xcode.
One of the things that is great about homebrew is that it is all fairly
lightweight, and requiring all of Xcode kind of defeats that…

For the time being, I will put export TRAVIS=1 in my .bashrc…
I have no idea what it does, but it fixes this issue :slight_smile:

(Zhiming Wang) #4

You can probably unset that very soon, within 24 hours I’d say. I’ll let you know in this thread when the time comes.

(Victor Shoup) #5

Great, thanks!!!

(Zhiming Wang) #6

@michaelgallacher @victorshoup You can now brew update to 1.0.4 and unset TRAVIS.

(Michael Gallacher) #7

@zmwangx Just FYI: I’m having no luck. I unset TRAVIS and updated to 1.0.4. I still get the same error.

~$ brew -v
Homebrew 1.0.4
Homebrew/homebrew-core (git revision 9780; last commit 2016-09-24)
~$ brew update
Already up-to-date.
~$ brew upgrade
Error: Your Xcode (7.3.1) is outdated
Please update to Xcode 8.0.
Xcode can be updated from the App Store.

(Michael Gallacher) #8

@zmwangx I just read the release notes and realize why it is failing: I’m running macOS Sierra. Why have this fatal error for >= Sierra?

(Zhiming Wang) #9

Didn’t you say “I am running Mac OS 10.11.6 with Xcode 7.3.1”?

If you’ve upgraded to Sierra: please upgrade to Xcode 8.0. Xcode 7.3.1 does not contain the 10.12 SDK and has caused too much trouble, we know for sure it’s not a supportable configuration.

(Zhiming Wang) #10

By the way, there is a way to keep a 7.3.1 installation on your machine while being able to use brew. Move it to any location you’d like, now download and install Xcode 8.0 along with CLT 8.0 (sudo xcode-select --install). Use those for brew. And when you need Xcode 7.3, just launch the .app which you moved, and if necessary, use sudo xcode-select --switch <path> to switch to Xcode 7.3.

(Michael Gallacher) #11

Sorry to muddy the waters. I am glad you read at least the first line of my post. I have two machines. One is on 10.11.6 with Xcode 7.3.1, and this is working perfectly now. Thanks! The other is 10.12 and shows the error. I’ll just set the CI flag and hope for the best.

Also, in the rest of my post, I mention that using just Xcode 8.0 is not an option, and that I’m already using xcode-select to move back and forth. :wink: Thanks.

(Mike McQuaid) #12

Note Xcode 8 is now required only on Sierra (where many things break without it).

(Daniel Doro Ferrante) #13

There’s a bit of a “catch 22” between Xcode 8 (and brew’s requirement of it) and OpenCV (provided by either ‘opencv’ or ‘opencv3’): NVCC (provided by CUDA) does not recognize Xcode 8, so OpenCV doesn’t compile/install. The only alternative, until Nvidia fixes CUDA to work with Xcode 8, is to downgrade Xcode to 7.*. Which then proceeds to break brew. Is there any way out of this pickle?

(Mike McQuaid) #14

Unfortunately the only solution is to patch the required software so it works with Xcode 8. Almost everything is broken on Sierra with Xcode 7.

(Simon Jefford) #15

I’m confused. I thought that just installing the command line tools and ensuring that they are selected via xcode-select would be enough? And in fact for a time it seemed to be. When I first upgraded to Sierra I just installed the command-line tools and left my Xcode 7 install alone.

(Mike McQuaid) #16

Xcode 7 does not have the necessary 10.11 SDKs. Even if you use xcode-select some buildsystems will attempt to use Xcode anyway.

(Brantone) #17

Currently have an iOS build farm has Xcode 7.3.1 working successfully on Sierra; therefore saying almost everything is broken on Sierra with Xcode 7 is not correct. Handcuffing Brew to have latest version of Xcode does not lend itself to support for legacy setups, sadly.

(Mike McQuaid) #18

Lots in Homebrew are broken. Our goal is not to support legacy setups but to support supported setups, sorry.

(Brantone) #19

Ah, but if an older version of Homebrew could be installed then it would satisfy current while also allowing for legacy.
Sorry to hear that a package manager doesn’t have interest in supporting legacy setups, good thing not relying on it for jdk7.

(Mike McQuaid) #20

An older version would not “satisfy current” because formulae assume the latest stable version is installed and macOS receives updates from Apple that require changes from us to not be broken. There’s nothing stopping you manually checking out an old version, disabling auto-update and never running brew update except you will have to use old formulae too and can never file bug reports as we’ll tell you to brew update.

I’m not sure what this means but it sounds a little rude. We’re providing you with something for free that you’re using (presumably) to help you do your job. What we choose to support or not support is a limitation of our time and financial resources.