Almost all applications crash with 'illegal hardware instruction' on old 2009 MacBook Pro

After updating to homebrew 2.0 (macos 10.14.3 on an old 2009 macbook pro) I have almost all applications crashing with ‘illegal hardware instruction’ message.

This includes node, neovim, tig (program launches but switching to any other than default screen crashes, mpv

Some programs work. I tried compiling tig from sources and it works (building it myself, using brew install --HEAD tig does not resolve the issue.

Anybody had a similar problem? I have already tried removing all of brew and reinstalling it.

Some of the default compile flags for bottles were changed recently. What is the output of brew config?

it’s

HOMEBREW_VERSION: 2.0.0
ORIGIN: https://github.com/Homebrew/brew
HEAD: 1920eecb7104301647af0bcf548144f2d85f4e27
Last commit: 3 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 0b1cd2bdabf82f324fb5972d0252d1bef06458ab
Core tap last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_LOGS: /Users/yozy/Library/Logs/Homebrew
CPU: dual-core 64-bit penryn
Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 10.0 build 1000
Git: 2.17.2 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
macOS: 10.14.3-x86_64
CLT: 10.1.0.0.1.1539992718
Xcode: 10.1
XQuartz: 2.7.11 => /opt/X11

The 2009 MacBook Pro does not officially support Mojave. Can you confirm if you were prompted for an upgrade by Apple and ran all the official installers? Can you confirm the exact model number of your MacBook Pro? Thanks!

Indeed it is a mid-2009 macbook pro (MacBook Pro5,3) and I am using a patched installer (from dosdude1) to use Mojave on it. I don’t mind having to compile all packages but I’d like to know if making it work is at all possible, for example by modifying the default compiler flags.

You’ll need to modify Homebrew itself in that case to have it work. These are the relevant lines you’ll need to bypass: https://github.com/Homebrew/brew/blob/master/Library/Homebrew/extend/os/mac/hardware.rb#L3-L7. Change if version >= :mojave to something like if version >= :mojave && false.

1 Like

And then additionally you’ll need to manually --build-from-source for everything you install.

1 Like

Thank you for all the help! Sorry for the inconvenience, I’m trying to squeeze as much life from this old computer as I can :slight_smile:

I see that the HOMEBREW_BUILD_FROM_SOURCE variable was deprecated and removed. I think I’ll revert the change in my home-brew to make it easier.

2 Likes

Thanks for understanding @yozy! Yes, that sounds like the best bet if you’re going to modify things anyway.