A few months ago I moved my world wholesale from an Intel Mac to an Apple Silicon Mac. Recently, I was trying to get a cmake project to build that involved several SDL2 related libraries installed by homebrew. Some of them reported, “wrong architecture.” Then I discovered that I had two worlds going:
/opt/homebrew/lib
with Apple silicon architecture libraries,
/usr/local/lib
with Intel architecture libraries, brought over wholesale from my previous Mac.
I resolved my immediate problem by uninstalling everything related to SDL2 and reinstalling it. That came up clean. But /usr/local/lib
is still very well populated, with some libraries of the wrong architecture and some that have dual architectures. Is this a ticking time bomb that needs to be defused? What is the right algorithm for cleanly dealing with this?