tanruixiang commented on issue #776: URL: https://github.com/apache/incubator-kvrocks/issues/776#issuecomment-1240252246
> > Hi. I am using MacBook M1. According to [341a989#r80998035](https://github.com/apache/incubator-kvrocks/commit/341a989d75783d8dad76bbd5a4473dd345472337#r80998035), If I replace `${CMAKE_OSX_DEPLOYMENT_TARGET}` with `11.0`, The compilation can be successful. I am not very familiar with cmake. Do you have time to repair it? I noticed that you don't have an apple device to test. I can compile and test for you. @PragmaTwice > > Hi @tanruixiang, actually you can directly pass the option to cmake, e.g. `cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.3 ..`, `MACOSX_DEPLOYMENT_TARGET=10.3 cmake ..` or `./x.py build -DCMAKE_OSX_DEPLOYMENT_TARGET=10.3` rather than modifying cmake files. > > If you want to try to fix this problem, you can add an `if ... else ...` to CMakeLists, i.e. when it is currently in macos and `CMAKE_OSX_DEPLOYMENT_TARGET` is not configured, an error should be reported and the user will be reminded to configure it. The current error report is like this `Makefile:320: *** missing: export MACOSX_DEPLOYMENT_TARGET=XX.YY. Stop.` As a new user, I will be a little confused about this error report. Can we update readme and note that MacOS needs to use the command you gave? Or if `MACOSX_DEPLOYMENT_TARGET` does not exist, give a default value(like 11.0 before). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
