Programming

How to Screw Yourself with Hombrew for OS X and Clang

I really love homebrew for OS X. It installs all the crap I need that I can’t find anywhere else.

And I do mean *everything*.

Old school OS X users will tell you to use macports. I went with brew, it’s more fun.

 

However, lately, I hit a tough issue on which I wasted a ton of time.

I was linking my app with wxWidgets from Homebrew, which I built statically.

 

I was compiling on a Core i7 and the app kept crashing on a Core i5. Why?

Because brew was building everything with -march=native which on my Core i7 means using AVX2 extensions. Which is fine if you don’t distribute your app!

 

Long story short this is the solution

brew install --build-bottle wxmac

to compile with goddamn -march=core2 so that everyone can enjoy your fine app!

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.