pharo-project / pharo-vm

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

Building on MacOS11 tries to use SDK for MacOS12 #795

Closed RenaudFondeur closed 1 month ago

RenaudFondeur commented 1 month 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 1 month ago

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

guillep commented 1 month ago

(you will need to pull)