Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS 11 build breaks #56

Open
akshay1992 opened this issue Dec 3, 2020 · 0 comments
Open

macOS 11 build breaks #56

akshay1992 opened this issue Dec 3, 2020 · 0 comments

Comments

@akshay1992
Copy link

Hey! I just upgraded to macOS 11 and it seems like it can't find the cmath header anymore.

> make 
CXX src/arr.cpp build/obj/arr.o
clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
src/arr.cpp:4:10: fatal error: 'cmath' file not found
#include <cmath>
         ^~~~~~~
1 error generated.
make: *** [build/obj/arr.o] Error 1

I did a bit of digging around, and it seems like the problem lies in Makefile.common:233.

	CFLAGS += -isysroot $(OSX_SDK_PATH)$(OSX_SDK) -mmacosx-version-min=10.$(OSX_VERSION)

My hunch is that target SDK version and the -mmacosx-version-min have to have the same major version number. If I change the above line to the following, it seems to work.

	CFLAGS += -isysroot $(OSX_SDK_PATH)$(OSX_SDK) -mmacosx-version-min=11.$(OSX_VERSION)

Alternatively, if I simply remove the minimum version flag, it build successfully. See below:

	CFLAGS += -isysroot $(OSX_SDK_PATH)$(OSX_SDK)

Taking a closer look at my SDKs directory, I see the following, which would partially explains my hunch.

> ls /Applications/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
DriverKit20.0.sdk/ MacOSX.sdk/        MacOSX11.0.sdk@

I'm not intimately familiar with how macOS SDK targeting works, but I thought I'd share my initial investigation. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant