Won't build on MacOS 12.2 - wrong SDK
Criterion won't build on MacOS 12.2. I am getting the following error:
../src/core/theories.c:27:10: fatal error: 'ffi.h' file not found
#include <ffi.h>
I've traced this to this line in build when I run ninja -C build :
...
-I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/ffi
...
I don't have this old SDK installed on my machine. The current SDK's are for MacOSX11 and MacOSX12. I cannot figure out where this is being set.
How do we point the build to the newer MacOS SDKs?
I think the SDK version is determined by the toolchain that is installed in your environment (Xcode), MacOSX10.15.sdk is not hardcoded by Criterion, it was auto-detected somehow on your system.
The easiest way to install Criterion on macOS is using Homebrew: https://github.com/Snaipe/Criterion#packages
I've tested the build with the brew-packaged version of libffi, it works out of the box.
Well, I've gone through all the xcode and xcrun recommendations; and none of these tools show MacOS10.15. That xcode toolchain is definitely not installed. Do you have any advice how to find where this is getting pulled from?
We can verify those auto-detected paths by checking the build logs.
Could you share the meson-logs directory?
Or in case you're trying to build the previous release (v2.3.3), CMakeOutput.log and CMakeError.log are the files we are looking for.
I'm closing this issue due to inactivity. Feel free to reopen once you shared your Meson/CMake logs.