We’re building a large C++ application on OS X Yosemite 10.10. This application relies on a number of third-party libraries which we install using Homebrew prior to building our application. Our release script picks up all the dependencies and include them in the final package.
We love Homebrew as it makes our live so much simpler! We’d like to keep using it.
Unfortunately several of our users reported that our application didn’t work on their Mac. For instance a user running macOS 10.12.6 on a late 2012 27-inch iMac is getting
llegal instruction: 4 (all details here).
It looks like the crash occurs in one of the third-party dependency we bundle, OpenImageIO, which was installed on the build machine with the following commands:
brew tap homebrew/science brew install openimageio
brew info openimageio reports that it was indeed built from source:
/usr/local/Cellar/openimageio/1.7.17_1 (66 files, 16.0MB) * Built from source on 2017-11-27 at 19:15:19
I suspect that Homebrew enables advanced x86 instruction sets when compiling on the build machine.
Here is the Homebrew formula for OpenImageIO:
- Is there a way to find out which flags or which command lines Homebrew is using?
- Alternatively, is there a way to globally set clang’s default flags on macOS?