Build fails on macOS Monterey/12.0.1
poldy opened this issue · 2 comments
Please find log from
mkdir build
cd build
cmake ..
attached. I mentioned this on the Discord, but nobody there knew the solution.
When I run cmake it fails to find standard C include files like sys/types.h, etc. They're in /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include instead of the more usual UNIX /usr/include. I tried adding a line set(CMAKE_OSX_SYSROOT "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk") to CMakeLists.txt and setting an environment variable with the same name/value, but that didn't work.
I think I found the problem. My version of clang doesn't understand the "-march=native" command-line option. Removing it from SHARED_COMPILE_FLAGS in CMakeLists.txt fixes the build. I can prepare a pull request soon if that is the way to go.