Open tlnagy opened 6 years ago
I was having the same issue. I followed the suggestion from #206 to nuke the repo and add it again and it seems to work now.
Apparently clearing out the repo isn't enough, since the failures are reproducible on Travis? See https://travis-ci.org/JuliaOpt/CoinOptServices.jl/jobs/302334821#L334
This is reproducible from the command line
> $JULIA_PKGDIR/v0.6/Homebrew/deps/usr/bin/brew info git
Error: git: /Users/imolk/Library/Julia/packages/v0.6/Homebrew/deps/usr/Library/Taps/homebrew/homebrew-core/Formula/git.rb:190: syntax error, unexpected $undefined, expecting keyword_end
\thelper = osxkeychain
^
> $JULIA_PKGDIR/v0.6/Homebrew/deps/usr/bin/brew config
HOMEBREW_VERSION: 1.3.2
ORIGIN: https://github.com/Homebrew/brew
HEAD: 751334a257d81851e68da7ab390982d4e9fdf909
Last commit: 3 months ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: f17f64c9aa75957ee7775f6a4d5d32db4a137b6d
Core tap last commit: 2 hours ago
HOMEBREW_PREFIX: $JULIA_PKGDIR/v0.6/Homebrew/deps/usr
HOMEBREW_REPOSITORY: $JULIA_PKGDIR/v0.6/Homebrew/deps/usr
HOMEBREW_CELLAR: $JULIA_PKGDIR/v0.6/Homebrew/deps/usr/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.0.0-p648 => $JULIA_PKGDIR/v0.6/Homebrew/deps/usr/Library/Homebrew/vendor/portable-ruby/2.0.0-p648/bin/ruby
Clang: 9.0 build 900
Git: 2.14.2 => $JULIA_PKGDIR/v0.6/Homebrew/deps/usr/bin/git
Perl: /usr/local/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/local/bin/ruby => /usr/local/Cellar/ruby/2.4.1_1/bin/ruby
Java: N/A
macOS: 10.12.6-x86_64
Xcode: N/A
CLT: 9.1.0.0.1.1508540944
X11: 2.7.8 => /opt/X11
Nuking the Homebrew
package directory indeed fixes the issue. It also installs a newer version of homebrew.
> $JULIA_PKGDIR/v0.6/Homebrew/deps/usr/bin/brew config
HOMEBREW_VERSION: 1.3.8
ORIGIN: https://github.com/Homebrew/brew
HEAD: 236b0172306a6f4b233d374fcc20adce5c3e3261
Last commit: 9 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: f17f64c9aa75957ee7775f6a4d5d32db4a137b6d
Core tap last commit: 3 hours ago
HOMEBREW_PREFIX: $JULIA_PKGDIR/v0.6/Homebrew/deps/usr
HOMEBREW_REPOSITORY: $JULIA_PKGDIR/v0.6/Homebrew/deps/usr
HOMEBREW_CELLAR: $JULIA_PKGDIR/v0.6/Homebrew/deps/usr/Cellar
HOMEBREW_CELLAR: $JULIA_PKGDIR/v0.6/Homebrew/deps/usr/Cellar
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_GIT_CONFIG_FILE: $JULIA_PKGDIR/v0.6/Homebrew/deps/usr/.git/config
HOMEBREW_NO_ANALYTICS_THIS_RUN: 1
HOMEBREW_PREFIX: $JULIA_PKGDIR/v0.6/Homebrew/deps/usr
HOMEBREW_REPOSITORY: $JULIA_PKGDIR/v0.6/Homebrew/deps/usr
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.3.3 => $JULIA_PKGDIR/v0.6/Homebrew/deps/usr/Library/Homebrew/vendor/portable-ruby/2.3.3/bin/ruby
Clang: 9.0 build 900
Git: 2.15.1 => $JULIA_PKGDIR/packages/v0.6/Homebrew/deps/usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
Perl: /usr/local/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/local/bin/ruby => /usr/local/Cellar/ruby/2.4.1_1/bin/ruby
Java: N/A
macOS: 10.12.6-x86_64
Xcode: N/A
CLT: 9.1.0.0.1.1508540944
X11: 2.7.8 => /opt/X11
So fyi I followed the instructions here, and it fixed the above issue, but now I'm seeing the same thing as #215.
Error: git: /Users/imolk/Library/Julia/packages/v0.6/Homebrew/deps/usr/Library/Taps/homebrew/homebrew-core/Formula/git.rb:190: syntax error, unexpected $undefined, expecting keyword_end \thelper = osxkeychain ^
This error means the ruby, which brew uses, cannot recognize indented here document by <<~
that is introduced at Ruby 2.3. I think the system in which this error occurs has Ruby 2.0 at /usr/bin/ruby
and brew uses it.
I propose the following temporary workaround for such situation:
julia> ENV["HOMEBREW_DEVELOPER"] = "1"
julia> ENV["HOMEBREW_RUBY_PATH"] = "YOUR_RUBY_PATH"
julia> Pkg.build("Homebrew")
Setting the two environment variable HOMEBREW_DEVELOPER
and HOMEBREW_RUBY_PATH
, you can force brew to use the specific ruby. Please replace YOUR_RUBY_PATH
with the correct path of ruby >= 2.3. If you use rbenv, it should be like /Users/mrkn/.rbenv/shims/ruby
.
Confirmed that the system ruby on OSX is ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
, at least for 10.12.6.
It'd be really nice to ensure that Homebrew.jl
worked without having to install a custom version of ruby.
Hey @staticfloat, I see this everytime I try to build
Homebrew
on Julia 0.6.1Any thoughts?