In order to continue being able to use and work with my old but working MacBook 2008 Unibody, I have two main hurdles:
To keep up with the OS upgrades. Apple no longer support this laptop with their new OS releases, so I started solving this with dosdude1’s Mojave and Catalina patchers. Now I do it by using OpenCore Legacy Patcher to install Big Sur and, in the future, Monterey.
To have an up to date stack of software and utilities. For the most part I rely on brew to do that.
However, brew software is continuously optimized for the latest macOS version. This has lately implied generating bottled packages with the optimizations available for the oldest macOS supported by Apple.
And then one day, while trying to use a bottled version of Python, I bumped into this error:
After some research, I found reports like this one or this one. However, the definitive answer came from this GitHub comment from user @koenige50.
I followed the directions in order to make my installation of brew started allowing me to compile software optimized for the Core 2 Duo architecture of my MacBook. The content of the relevant file is now:
As you can see, I’ve replaced :nehalem with :core2 in line 24.
Now, for every conflictive formula that I found, I’ve only have to do this:
Once we have the chosen formula built (could take several hours!), we ensure that it won’t be accidentally overwritten by pinning it:
Should we needed to install a newer version, we’ll unpin that version and follow the aforementioned procedure when we have enough time to compile.
For the time being, it only happened to me with Python, Node.js and two or three libraries. In my humble opinion, it’s worth it.