Brew bump-formula-pr can not install rubocop

(Mirko Friedenhagen) #1

I just tried to update a formula using brew bump-formula-pr --tag=11.5.0 --revision=3afdaba6bf04910d6db2733af0e7e6f1a4f37738 gitlab-runner

I already did set HOMEBREW_GITHUB_API_TOKEN (in the past I used another computer to do this and succeeded).

$ brew bump-formula-pr --tag=11.5.0 --revision=3afdaba6bf04910d6db2733af0e7e6f1a4f37738 gitlab-runner
Already up-to-date.
==> replace "v11.4.2" with "11.5.0"
==> replace "cf91d5e113e5e77f245c63276e2e4d5f4224bbca" with "3afdaba6bf04910d6db2733af0e7e6f1a4f37738"
==> Installing or updating 'rubocop' gem
Building native extensions.  This could take a while...
ERROR:  Error installing rubocop:
	ERROR: Failed to build gem native extension.

    current directory: /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/jaro_winkler-1.5.1/ext/jaro_winkler
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20181203-55404-e8p9c9.rb extconf.rb
creating Makefile

current directory: /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/jaro_winkler-1.5.1/ext/jaro_winkler
make "DESTDIR=" clean

current directory: /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/jaro_winkler-1.5.1/ext/jaro_winkler
make "DESTDIR="
make: *** No rule to make target `/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin18/ruby/config.h', needed by `adj_matrix.o'.  Stop.

make failed, exit code 2

Gem files will remain installed in /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/jaro_winkler-1.5.1 for inspection.
Results logged to /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.3.0/extensions/universal-darwin-18/2.3.0/jaro_winkler-1.5.1/gem_make.out
Error: Failed to install/update the 'rubocop' gem.
Error: brew audit failed!

This is on macOS 10.14.1, brew doctor` runs without errors. I only have /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin17/ruby/config.h on my system (note that this is darwin17 but not darwin18).

$ xcode-select --version
xcode-select version 2354.
$ pkgutil --packages | grep CLTools

Any hints?


(Sean Molenaar) #2

It seems apple did something wrong with the CLT setup there, I fixed it for myself by forcing the homebrew vendored ruby. I know some people who had the same issue and I’ll ask them what they did though.

(Mirko Friedenhagen) #3

Wow Sean, big thanks for the quick reply!

(Mirko Friedenhagen) #4

Hello Sean,
do you any updates on this by chance?
I now tried installing ruby 2.5 via brew install ruby. However it was not picked although I tried adding export PATH=/usr/local/opt/ruby/bin:$PATH and set CPPFLAGS, LDFLAGS and PKG_CONFIG_PATH as well, however the error stays the same.

(Sean Molenaar) #5

I asked and forgot to tell you the answer :sweat_smile:. For myself export HOMEBREW_FORCE_VENDOR_RUBY=1 worked, others just removed all traces of homebrew and ruby, which seemed a bit excessive.

Brew audit rubocop native extensions error
(Mirko Friedenhagen) #6

Thanks and no problem, will try this next time, as gitlab-runner is already on 11.5.1 now :slight_smile: