wasm-ld: error: initial memory too small, 87418256 bytes needed
Unsolved
Qt for WebAssembly
-
I am using Qt 6.8.0 in MacOS M3 Sequoia , I have sucessfully compiled other web assembly projects, but this one has huge textures images, I get the following error:
wasm-ld: error: initial memory too small, 87418256 bytes needed em++: error: '/Users/joao/emsdk/upstream/bin/wasm-ld @/var/folders/cb/7crk1mjj353594gh4q63jhhh0000gn/T/emscripten_81k229f2.rsp.utf-8' failed (returned 1) make: *** [SolarSystem3D.js] Error 1 06:27:49: The process "/usr/bin/make" exited with code 2. 06:27:49: Error while building/deploying project SolarSystem3D (kit: WebAssembly Qt 6.8.0 (single-threaded)) 06:27:49: When executing step "Make"
I am using qmake, I have added
QMAKE_LFLAGS += -ALLOW_MEMORY_GROWTH=true QMAKE_LFLAGS += -s TOTAL_MEMORY=134217728
but still does not work. What is the correct way to increase the memory ?
Edit: I got this working by reducing the images resolutions and sizes, still I would like to know how to fix this memory issue