Closed guoyiteng closed 4 years ago
Yeah, this is a macOS-only problem. I've encountered this before. See this article for a solution: https://silvae86.github.io/sysadmin/mac/osx/mojave/beta/libxml2/2018/07/05/fixing-missing-headers-for-homebrew-in-mac-osx-mojave/ You have to run this pkg every time after you upgrade your macOS.
What did you change that caused my build to break though? I can build the master branch no problem, even though I have upgraded my OS since my last build.
(But that fix did work)
I have no idea... Is it possible that the master branch somehow caches the compiled files so the c compiler did not actually run? However, we need to fix this issue anyway if we want to continue supporting it on macOS. The latest macOS Catalina removes this workaround pkg file. I will look for a solution these days.
It looks like this is the correct way to go: https://apple.stackexchange.com/questions/337940/why-is-usr-include-missing-i-have-xcode-and-command-line-tools-installed-moja
Add the -isysroot flag to your compile flags to automatically include the appropriate SDK header directory and avoid the need for the /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg package that will "in a future release, ... no longer be provided."
Examples:
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
or
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
You can use xcrun --show-sdk-path to find the default SDK path.
I added some compilation flags in runtime/Makefile. Now, it compiles on macOS Catalina.
Looks good to me!
But can you also actually update the README.md with how to get started using the IDE now that you have configs for it? (I just opened up the project in IntelliJ and still had a ton of warnings etc. A quick how-to on getting IntelliJ to build the compiler for you would be great)
Ok, I updated the README and the config files. Now, it could compile and run the unit tests without any problem. I have already tested it on both macOS and Linux. Let me know if you encounter any problem when running it.
This breaks the build on my Mac (haven't tested on Linux). I get the following error when compiling native code: