3.8.3 自定引擎无法编译模拟器

环境是mac mini M2, macos 14.4.1, xcode 15.4

依照手册 定制引擎 做的

从Github上抓取3.8.4 branch的代码,
然后在engine根目录做 npm install

再到 native 下做 npm installgulp init

接着再做 gulp gen-simulator

❯ gulp gen-simulator                                                                                                                                                                                                                 ─╯
[06:07:06] Using gulpfile /Volumes/idea/cc/engines/3.8/native/gulpfile.js
[06:07:07] Starting 'gen-simulator'...
remove old simulator project

=====================================
make project
=====================================
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:4 (project):
  No CMAKE_CXX_COMPILER could be found.
-- Configuring incomplete, errors occurred!
cmake finished!
=====================================
build project
=====================================

2024-05-18 06:07:10.960 xcodebuild[951:10983437] Writing error result bundle to /var/folders/wj/1cs10q7j7jq_dt3334gbyvtr0000gn/T/ResultBundle_2024-18-05_06-07-0010.xcresult
xcodebuild: error: 'SimulatorApp.xcodeproj' does not exist.
cmake finished!
[06:07:12] Finished 'gen-simulator' after 5.06 s

输出的结果是找不到 SimulatorApp.xcodeproj

请教各位前辈如何正确的操作,感谢

我今天再次尝试了一次,
发现它竟然找的到CXX compiler了…

我并不清楚原因,
但这几天我曾经使用过 xcodebuild 建置了其他的专案,
或许是这样就可以了…

总之,如果有其他人遇到相同的问题,
先检查自已的环境看看是否其他项目能正常编译

就这样吧…

另外说一下…今天拉的是 3.8.5的代码…

❯ gulp gen-simulator                                                                                                                             ─╯
[02:51:09] Using gulpfile /Volumes/idea/cc/engines/3/native/gulpfile.js
[02:51:09] Starting 'gen-simulator'...
remove old simulator project

=====================================

make project

=====================================

-- The CXX compiler identification is AppleClang 15.0.0.15000309

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ - skipped

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- The C compiler identification is AppleClang 15.0.0.15000309

-- The ASM compiler identification is AppleClang

-- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - skipped

-- Detecting C compile features

-- Detecting C compile features - done

-- The OBJC compiler identification is AppleClang 15.0.0.15000309

-- The OBJCXX compiler identification is AppleClang 15.0.0.15000309

-- Detecting OBJC compiler ABI info

-- Detecting OBJC compiler ABI info - done

-- Check for working OBJC compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - skipped

-- Detecting OBJCXX compiler ABI info

-- Detecting OBJCXX compiler ABI info - done

-- Check for working OBJCXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ - skipped

-- platform: Darwin

-- Ignore NO_WERROR

CMake Deprecation Warning at /Volumes/idea/cc/engines/3/templates/cmake/common.cmake:9 (cmake_policy):
  The OLD behavior for policy CMP0111 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  /Volumes/idea/cc/engines/3/native/cmake/predefine.cmake:377 (include)
  /Volumes/idea/cc/engines/3/native/CMakeLists.txt:2 (include)
  CMakeLists.txt:40 (include)



-- OPTION BUILTIN_COCOS_X_PATH:
-- OPTION USE_BUILTIN_EXTERNAL:	OFF
-- OPTION USE_MODULES:	OFF

-- OPTION CC_USE_METAL:	ON
-- OPTION CC_USE_GLES3:	OFF
-- OPTION CC_USE_GLES2:	OFF
-- OPTION CC_USE_VULKAN:	OFF
-- OPTION CC_DEBUG_FORCE:	ON
-- OPTION USE_SE_V8:	ON
-- OPTION USE_V8_DEBUGGER:	ON
-- OPTION USE_V8_DEBUGGER_FORCE:	ON
-- OPTION USE_SE_SM:	OFF
-- OPTION USE_SOCKET:	ON
-- OPTION USE_AUDIO:	ON
-- OPTION USE_EDIT_BOX:	ON
-- OPTION USE_VIDEO:	OFF
-- OPTION USE_WEBVIEW:	OFF
-- OPTION USE_MIDDLEWARE:	ON
-- OPTION USE_DRAGONBONES:	ON
-- OPTION USE_SPINE:	ON
-- OPTION USE_WEBSOCKET_SERVER:	OFF
-- OPTION USE_PHYSICS_PHYSX:	ON
-- OPTION USE_JOB_SYSTEM_TBB:	OFF
-- OPTION USE_JOB_SYSTEM_TASKFLOW:	OFF
-- OPTION USE_XR:	OFF
-- OPTION USE_SERVER_MODE:	OFF
-- OPTION USE_AR_MODULE:	OFF
-- OPTION USE_AR_AUTO:	OFF
-- OPTION USE_AR_CORE:	OFF
-- OPTION USE_AR_ENGINE:	OFF
-- OPTION USE_CCACHE:
-- OPTION CCACHE_EXECUTABLE:	CCACHE_EXECUTABLE-NOTFOUND
-- OPTION NODE_EXECUTABLE:	/Users/raz/.nvm/versions/node/v18.20.2/bin/node
-- OPTION NET_MODE:	0
-- OPTION USE_REMOTE_LOG:	OFF

-- platform path:

-- Configuring done (26.2s)

-- Generating done (0.0s)

-- Build files have been written to: /Volumes/idea/cc/engines/3/native/simulator

cmake finished!
=====================================

build project

=====================================

/Volumes/idea/cc/engines/3/native/tools/simulator/libsimulator/lib/protobuf-lite/google/protobuf/io/zero_copy_stream_impl_lite.cc:156:27: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]

后面省略..