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?


HEAD: 1920eecb7104301647af0bcf548144f2d85f4e27
Last commit: 3 days ago
Core tap ORIGIN:
Core tap HEAD: 0b1cd2bdabf82f324fb5972d0252d1bef06458ab
Core tap last commit: 2 hours ago
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
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: Change if version >= :mojave to something like if version >= :mojave && false.


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.


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

Well, a year later, I’ve got a similar setup trying to get as much out of this 2010 Mac Mini (4,1). I’ve used the same patched installer as @yozy with Catalina now, and I’m just making sure that I have this right…

For the most part, I’ve installed the latest Xcode and its relevant latest command line tools.
I’ve also done a brew upgrade on all of my homebrew packages and they all compiled no problem, especially php, apache, mariadb,… etc.

Node.js and FFmpeg installed with no problems. But when running or using them is when the problem led me here.

So following the instructions, @MikeMcQuaid would I be correct in modifying line 5 in the file on my system at the following path?:


Then to install node or most any other package, I just added the --build-from-source flag?

Lastly, should I brew upgrade --force --build-from-source all of my packages just in case?

1 Like

I can’t say what you are or aren’t correct in doing, sorry. You’re going to effectively have to fork Homebrew to make it work the way you work and it’s extremely likely things will break.

@MikeMcQuaid we’re good, Node.js installed fine. I had to drop in FFmpeg from a precompiled binary on another system with Catalina and that worked fine.

I have had the same problems reported on that thread and thanks to the posts of many I was also able to solve them. But it was still necessary to use another command: export HOMEBREW_NO_AUTO_UPDATE = 1
I must have found it in the StackOverflow, because without this the file “hardware.rb” loses the previous edition.

Hi FabioMen10,
I’m having a similar issue running Catalina on a 2009 MBP.
Can I ask, in which file did you put the “export HOMEBREW_NO_AUTO_UPDATE = 1”?

thanks very much,


Hello Matt,

I just run the command on terminal.

Sorry for delay. I writed the reply but don’t have posted.

No problem, thanks for getting back. I found you can add it to /usr/local/Homebrew/bin/ and that will disable auto updates, but you have to remember to update manually and there are recommendations against doing it this way… seems to work for me tho…

Thanks again!

In my experience, setting environment variables in shell startup files has only ever failed for one of the following reasons:

  1. It’s in the wrong startup file, e.g. setting in ~/.bash_profile, but actually running zsh.
  2. It’s in the wrong part of the correct startup file, so the export line never gets executed. Maybe it ended up in the wrong branch of an if..then..else, or there’s an error in the file that causes it to abort before it reaches your exports.
  3. You set it up correctly, but haven’t done a fresh login.
  4. You forgot the word export, and so set a shell variable instead.

Adding it to Homebrew’s is a bad idea, because a future update could result in a merge conflict that would actually corrupt the script, due to the extra markup that Git helpfully adds to show the conflict.

Ok thanks for the info. I’ll put it in my .zshrc

can you give me the steps as I am lost in this