pharo-project / pharo-vm

This is the VM used by Pharo
http://pharo.org
Other
115 stars 71 forks source link

Building on MacOS11 tries to use SDK for MacOS12 #795

Closed RenaudFondeur closed 6 months ago

RenaudFondeur commented 6 months ago

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 https://github.com/pharo-project/pharo-vm/blob/48ddfeee791ca9bcdf3d65c10d25e54e732bebec/CMakeLists.txt#L263.

Otherwise CMake can override it and provoke this issue

guillep commented 6 months ago

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

guillep commented 6 months ago

(you will need to pull)