-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Homebrew development commands fail to install some gems on Mojave on Xcode >10 #5561
Comments
Need your ‘brew config’ and ‘xcode-select —print-path’ |
I am experiencing same issue with
|
|
This is a Mojave bug: |
Same problem. |
@fxcoudert Have you tried |
@MikeMcQuaid setting
|
@susemeee please explain are the HOMEBREW_DEVELOPER and the HOMEBREW_RUBY_PATH set to the same path |
@JuPlutonic Not exactly, instead I put ruby 2.6.0 pulled from rvm and set HOMEBREW_RUBY_PATH to the ruby (from rvm) path. When I did not put HOMEBREW_DEVELOPER flag to env, Homebrew keeps using its portable-ruby (I don't know exactly why) so I simply put HOMEBREW_DEVELOPER=true. I think there is some incompatibility between macOS' default Ruby (and probably portable-ruby from Homebrew's) and its native extensions. |
Yes, see: Homebrew/homebrew-cask#52775 (comment) https://openradar.appspot.com/46465917. Apple are aware of it and are working on a fix. I'm not sure why this doesn't affect everyone. |
I just observed the bug while I was trying to push a new version of SwiftGen… from my machine which is still on High Sierra… so this definitively isn't only a Mojave bug 😢
brew config
brew audit swiftgen
FWIW, I tried with |
Note: Realizing Xcode 10.1 contained the MacOS10.14 SDK, I decided to switch my xcode-select from Xcode 10.1 to 9.4.1 (while still on the same machine with the same OS)… and the problem disappears 🤔 (after the |
It's not just a Mojave bug - I experience the same issue in High Sierra 10.13.6 |
It’s technically Xcode 10 so yes it can affect High Sierra. |
My current workaround:
Using |
@VonUniGE, thanks a lot. Only yours solution works and it is cross platform.. I got(Linuxbrew / Ubuntu 18.10). |
@VonUniGE, I just tried that but |
@mfriedenhagen I've had success with |
@MikeMcQuaid I'm sorry but I thought as per the previous 47 similar comments it was helpful to provide extra information so that the source of the issue could be more clearly understood. Clearly my comment has upset you as you have not request any of the previous 47 identical comments to post on discus. I'm sorry if I have upset you. |
@jamesdbloom You haven't upset me, thanks for the apology anyway though. The cause of the issue is understood, it's on Apple's end. Suggested workarounds here are the only additional useful contributions here, thanks. |
Just for future reference if someone (like me) would encounter this issue: |
@mcdado solution worked for me
|
I've dealt with a similar issue if I'm understanding correctly. I resolved it with the current 2.6.3 with: When the portable-ruby version was on 2.3.0 I think I only needed to run their gem update: |
Has there been much reports of this now that we have updated vendored Ruby to 2.6.3 and therefore avoid using system Ruby on Mojave? It, in theory, shouldn't be possible now. If it's still trying to find 2.3 headers then it's clearly not using 2.6.3 properly. I have not been able to reproduce this with brew's Ruby in the last few months on my Mojave install. That said, |
Yeh, gonna close this out. Comment here if you're still affected! |
I’m still affected by this. I’ve been unable to run
Command output
|
That's a bit different than the original error which was about finding Ruby headers ( For you, it looks like it is using the Ruby in Is there a Does |
Yes, that will be the problem. |
What you were trying to do (and why)
Run
brew audit
on any formula, e.g.,brew audit gmp
.What happened (include command output)
The error is
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
Full output below:Command output
Reproducibility
At first, I thought it was only a problem on my machine, and linked to me having
/usr/include
populated under Mojave (which is not supposed to happen) due to a faulty CLT update from Apple.However, I have now removed and reinstalled both CLT and Xcode, and nuked that faulty include directory, meaning I now have a “normal” Mojave system, and it still happens. Other users have been reporting it, for example here Homebrew/homebrew-core#36156 and there Homebrew/homebrew-core#35934, so there definitely is something to fix here.
Why do I believe it is a brew issue, and not a ruby issue? I have never in my life used Ruby outside of brew, so if something messed it up, it must be brew-related 😢
Have I tried to fix it?
I have run
rm -rf /usr/local/Homebrew/Library/Homebrew/vendor/bundle ~/.gem
(per @MikeMcQuaid's advice), thenbrew tests
. The tests fail with the same error as above.Additional info
The text was updated successfully, but these errors were encountered: