==> Pouring gcc-8.2.0.high_sierra.bottle.1.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink include/c++
Target /usr/local/include/c++
already exists. You may want to remove it:
rm '/usr/local/include/c++'
To force the link and overwrite all conflicting files:
brew link --overwrite gcc
To list all files that would be deleted:
brew link --overwrite --dry-run gcc
Possible conflicting files are:
/usr/local/include/c++ -> /usr/local/Caskroom/oclint/0.13.1,17.4.0/oclint-0.13.1/include/c++
I restart it and it failed with the exact same error so it doesn’t seem to be a fluke.
Our macOS build was fine until approximately 16 hours ago.
Thanks, but the problem is that we don’t pour gcc ourselves. Nowhere do we deal with gcc or even gdal. These appear to be dependencies of dependencies.
Here’s our full Travis setup on macOS, it’s fairly straightforward:
I understand that you don’t. But the formula(e) you do use did change and now that’s causing a problem. You can try skipping brew update or brew upgrade X, but whether or not that is sufficient to get your build going (right now or far into the future) is unclear.
I understand and agree wholeheartedly, however what I don’t understand is what you suggest we should actually do. If we don’t request/install gcc ourselves, how can we do brew link --overwrite gcc? Or do you mean we should do it after brew update/upgrade?
Ah, I see what you mean now. I would try something like this:
brew upgrade X || sudo brew link --overwrite gcc # for some X
brew upgrade
The problem here is that you don’t know ahead of time what packages are going to be upgraded if you just run brew upgrade. So you’d have to be really selective on what package to upgrade, and anticipate what commands are necessary to fix any problem that brew will encounter. Ideally brew would provide a flag to run these recommended commands, but I don’t know if such a thing exists.
$ sudo brew link --overwrite gcc
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.