actboy168 / luamake

MIT License
171 stars 36 forks source link

When compiling on Macos 10.13.6 detects the system version as 10.15 #27

Open vsratobury opened 2 years ago

vsratobury commented 2 years ago

Here is such a error:

8/96] Compile C++ build/obj/source_bee/subprocess_posix.obj
FAILED: build/obj/source_bee/subprocess_posix.obj 
clang -MMD -MT build/obj/source_bee/subprocess_posix.obj -MF build/obj/source_bee/subprocess_posix.obj.d -std=c++17 -O2 -Wall -Werror -fvisibility=hidden -mmacosx-version-min=10.15 -I3rd/bee.lua -DNDEBUG -Wunguarded-availability -o build/obj/source_bee/subprocess_posix.obj -c 3rd/bee.lua/bee/subprocess/subprocess_posix.cpp
3rd/bee.lua/bee/subprocess/subprocess_posix.cpp:231:13: error: use of undeclared identifier 'posix_spawn_file_actions_addchdir_np'; did you mean 'posix_spawn_file_actions_addinherit_np'?
            posix_spawn_file_actions_addchdir_np(&spawnfile_, cwd);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            posix_spawn_file_actions_addinherit_np
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/spawn.h:174:5: note: 'posix_spawn_file_actions_addinherit_np' declared here
int     posix_spawn_file_actions_addinherit_np(posix_spawn_file_actions_t *,
        ^
3rd/bee.lua/bee/subprocess/subprocess_posix.cpp:231:63: error: cannot initialize a parameter of type 'int' with an lvalue of type 'const char *'
            posix_spawn_file_actions_addchdir_np(&spawnfile_, cwd);
                                                              ^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/spawn.h:175:6: note: passing argument to parameter here
                int) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
                   ^
2 errors generated.
[9/96] Compile C++ build/obj/source_bee/format.obj
[10/96] Compile C++ build/obj/source_bee/file_handle.obj
ninja: build stopped: subcommand failed.

-mmacosx-version-min=10.15 and ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED == 101500

These options cause a compilation error by changing the source values to 101600 and replacing min_macos_version with 10.13, compile succeeded.

actboy168 commented 2 years ago

10.15 is the pre-built minimum supported version. You can modify the compile parameters to compile other versions.