axmolengine / axmol

Axmol Engine – A Multi-platform Engine for Desktop, XBOX (UWP) and Mobile games. (A fork of Cocos2d-x-4.0)
https://axmol.dev
MIT License
922 stars 205 forks source link

Build hang forever when building helloworld project wasm on Mac #1410

Closed JoHuang closed 1 year ago

JoHuang commented 1 year ago

Steps to Reproduce:

  1. new a project
  2. axmol build -p wasm

Issue:

...
[ 90%] Building CXX object engine/extensions/Particle3D/CMakeFiles/particle3d.dir/PU/PUUtil.cpp.o
[ 90%] Building CXX object engine/extensions/Particle3D/CMakeFiles/particle3d.dir/PU/PUVelocityMatchingAffector.cpp.o
[ 90%] Building CXX object engine/extensions/Particle3D/CMakeFiles/particle3d.dir/PU/PUVertexEmitter.cpp.o
[ 90%] Building CXX object engine/extensions/Particle3D/CMakeFiles/particle3d.dir/PU/PUVortexAffectorTranslator.cpp.o
[ 90%] Building CXX object engine/extensions/Particle3D/CMakeFiles/particle3d.dir/PU/PUVortexAffector.cpp.o
[ 90%] Building CXX object engine/extensions/Particle3D/CMakeFiles/particle3d.dir/Particle3DEmitter.cpp.o
[ 90%] Building CXX object engine/extensions/Particle3D/CMakeFiles/particle3d.dir/Particle3DRender.cpp.o
[ 91%] Building CXX object engine/extensions/Particle3D/CMakeFiles/particle3d.dir/ParticleSystem3D.cpp.o
[ 91%] Building CXX object engine/extensions/Particle3D/CMakeFiles/particle3d.dir/Particle3DAffector.cpp.o

It stuck here, and CPU keep 100% (even mouse cursor is laggy). I waited it for more than half hour, and had to interrupt (ctrl + c) to stop it.

BTW, if I don't need this extension Particle3D, how can I skip it when building?

Thanks

rh101 commented 1 year ago

BTW, if I don't need this extension Particle3D, how can I skip it when building?

For future reference, just search the cmake files (*.txt and *.cmake) to find that information very quickly. In this case, a search for "particle3d" would have led you to this:

option(AX_ENABLE_EXT_PARTICLE3D "Build extension Particle3D" ON)

To turn it off, add this to the top of your project CMakeLists.txt:

set(AX_ENABLE_EXT_PARTICLE3D OFF CACHE BOOL "Build extension Particle3D" FORCE)

Delete the file [build_folder_name]/CMakeCache.txt if you've already generated the project, otherwise the cached value of AX_ENABLE_EXT_PARTICLE3D may not be updated.

JoHuang commented 1 year ago

After several trials, it always stuck at 91%, but the last file shown on the logs was random. Not always the same file.

halx99 commented 1 year ago

build wasm require large system resource, recommand use PC with high-performance mult-core and 32GB+ memory

halx99 commented 1 year ago

close this not issue

JoHuang commented 1 year ago

I thought MacBook Pro with M1 Pro chip (10-core CPU) (RAM 16GB) is quite high-performance device. Is it normal that stuck for hours even for this device?