Homebrew-core: Macvim install fails on MacOS 10.14

Created on 26 Sep 2018  Â·  23Comments  Â·  Source: Homebrew/homebrew-core

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • [x] are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
  • [x] have a problem with brew install (or upgrade, reinstall) a single, official formula (not cask)? If it's a general brew problem please file this issue at Homebrew/brew: https://github.com/Homebrew/brew/issues/new/choose. If it's a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
  • [x] ran brew update and can still reproduce the problem?
  • [x] ran brew doctor, fixed all issues and can still reproduce the problem?
  • [x] ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
  • [x] if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?

To help us debug your issue please explain:

  • What you were trying to do (and why)
  • What happened (include command output)
  • What you expected to happen
  • Step-by-step reproduction instructions (by running brew install commands)

What you were trying to do (and why)

I was attempting to install macvim with lua on a fresh install of MacOS 10.14.

brew install macvim --with-lua

What happened (include command output)

https://gist.github.com/agrieser/ddc9c2fc4faec2db971ed11cf7617492

In file included from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby.h:33:
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found
#include "ruby/config.h"

What you expected to happen

Compile without errors

Step-by-step reproduction instructions (by running brew install commands)

brew install macvim --with-lua

Xcode and command line tools are installed and up to date.

Changing the command line tool direction between /Library/Developer/CommandLineTools and /Applications/Xcode.app/Contents/Developer did not make a difference.

outdated stale

Most helpful comment

fwiw
reseting command line tools path helped me:

xcode-select -p

you can also check current path with:

xcode-select -r

after reseting:

% xcode-select -p
/Applications/Xcode.app/Contents/Developer

env:

% set |grep HOMEBREW_BUILD
HOMEBREW_BUILD_FROM_SOURCE=true

macOS Mojave

All 23 comments

same bug

how to fix it?

For what it's worth: macvim without the --with-lua option works fine.

Same bug.
The latest release of macvim is on Aug 14, I will try the master branch.

Everything is OK even I built macvim snapshot-151 successfully without homebrew.

brew install macvim --with-override-system-vim --env=std seems to work fine.

The headers problem is completely solved by running
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
as mentioned on stackoverflow.

@viing937 the macOS_SDK_headers_for_macOS_10.14.pkg is a nice workaround, but it is not recommended by Apple (and thus by us) as it will cease to be available in the near future.

After running

open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

It does compile, but has unrelated issues described here: https://github.com/macvim-dev/macvim/issues/751

Given the install fails on a fresh install of OSX, this issue should remain open. What is the long term fix for this? Running the command above?

Has this build issue been reported to macvim?

Has this build issue been reported to macvim?

In fact, I checked out macvim(both master and the latest release) and run make successfully.
I don't know what is the differences between brew and naked make in compile environment.

@viing937 brew install --verbose will show you the commands it executes

I found brew will exec /usr/bin/sandbox-exec before compile, which contains a lot of lib dir.
Maybe that's why the header can't be found.

Still not working on a vanilla machine running Mojave. Getting:
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

Still not working on a vanilla machine running Mojave. Getting:
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

@adamtyoung I think you need to adjust the path:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Assuming you've already installed the command line tools

fwiw
reseting command line tools path helped me:

xcode-select -p

you can also check current path with:

xcode-select -r

after reseting:

% xcode-select -p
/Applications/Xcode.app/Contents/Developer

env:

% set |grep HOMEBREW_BUILD
HOMEBREW_BUILD_FROM_SOURCE=true

macOS Mojave

I got a similar error that pointed to this issue.

For some here, the issue may be that you actually just need to launch Xcode and let it install some updates. After it has done that run your build of MacVim again.

Thanks @agrieser that solved it for me!

For some here, the issue may be that you actually just need to launch Xcode and let it install some updates. After it has done that run your build of MacVim again.

Thanks very much for the tip, @MrJadaml – I launched XCode where I was immediately prompted to install some additional components. After which, I was able to run brew install macvim without any further issues! :tada:

I've tried all the options listed here, but the only one that lead to a successful installation was using the --env=std option.

In case it's helpful in diagnosing the root cause of this issue, I did not have to do this on my old MacBook Pro, which was upgraded to Mojave. It only occurred on my new laptop, where I started with Mojave (and brew was set up from scratch, sans Migration Assistant or anything like that).

Well, that still resulted in a broken MacVim in my case. There were all sorts of screen refresh issues.

I've used brew cask install macvim and now it is working fine. Perhaps that's how I installed it onto my old laptop too.

There were all sorts of screen refresh issues.

That's due to https://github.com/Homebrew/homebrew-core/issues/32440
There is nothing we can do, sadly, until the macvim project fixes this bug.

@vigilancer instructions did it for me. I did not have to set the env part.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

daviderestivo picture daviderestivo  Â·  4Comments

ghost picture ghost  Â·  3Comments

BluePawDev picture BluePawDev  Â·  3Comments

Steffen911 picture Steffen911  Â·  3Comments

oli-laban picture oli-laban  Â·  3Comments