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

Building on MacOS11 tries to use SDK for MacOS12 #795

Closed
RenaudFondeur opened this issue May 3, 2024 · 2 comments · Fixed by #792
Closed

Building on MacOS11 tries to use SDK for MacOS12 #795

RenaudFondeur opened this issue May 3, 2024 · 2 comments · Fixed by #792

Comments

@RenaudFondeur
Copy link
Contributor

When building the objective C files during the VM build, cmake by default tried to use the MacOS12 SDK, failing compilation.

We worked it around by explicitly setting -DCMAKE_OSX_SYSROOT=... as specified here: https://stackoverflow.com/questions/10165335/can-cmake-specify-the-base-sdk-on-mac-os-x.

We also saw that CMake provides already support to detect the SDK and that we should use https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_DEPLOYMENT_TARGET.html#variable:CMAKE_OSX_DEPLOYMENT_TARGET
to specify the target instead of setting the compiler flag manually like this

set(COMMON_FLAGS "-stdlib=libc++ -mmacosx-version-min=10.7 ${COMMON_FLAGS}")
.

Otherwise CMake can override it and provoke this issue

@guillep
Copy link
Member

guillep commented May 6, 2024

@RenaudFondeur I fixed this in the last PR, would you mind if this works out of the box in your machine?

@guillep
Copy link
Member

guillep commented May 6, 2024

(you will need to pull)

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

Successfully merging a pull request may close this issue.

2 participants