Godot: wasm-ld: error: initial memory too small

Created on 21 Feb 2020  路  3Comments  路  Source: godotengine/godot

Godot version:
origin/3.2 (1bc1939c63e07c6a03dbb258d765e0f450559706)

OS/device including version:
Windows 10 1909

Issue description:
Running scons -j12 target=release_debug platform=javascript tools=yes
fails with error message wasm-ld: error: initial memory too small, 19172464 bytes needed
Also tried with target=debug, gave the same kind of error except the bytes needed value was slightly different.
Entire error output is (of platform=release_debug):

[100%] Linking Program        ==> bin\godot.javascript.opt.tools.js
wasm-ld: error: initial memory too small, 19172464 bytes needed
shared:ERROR: 'C:/Users/loris/workspace/projects/testgodot/emsdk/upstream/bin\wasm-ld.exe -o C:\Users\loris\AppData\Local\Temp\emscripten_temp_c_pa0wxw\godot.javascript.opt.tools.wasm --lto-O0 platform\javascript\audio_driver_javascript.javascript.opt.tools.bc platform\javascript\http_client_javascript.javascript.opt.tools.bc -LC:\Users\loris\workspace\projects\testgodot\emsdk\upstream\emscripten\system\local\lib platform\javascript\javascript_eval.javascript.opt.tools.bc -LC:\Users\loris\workspace\projects\testgodot\emsdk\upstream\emscripten\system\lib platform\javascript\javascript_main.javascript.opt.tools.bc -LC:\Users\loris\.emscripten_cache\wasm-obj platform\javascript\os_javascript.javascript.opt.tools.bc main\libmain.javascript.opt.tools.bc main\tests\libtests.javascript.opt.tools.bc modules\libmodules.javascript.opt.tools.bc platform\libplatform.javascript.opt.tools.bc drivers\libdrivers.javascript.opt.tools.bc editor\libeditor.javascript.opt.tools.bc scene\libscene.javascript.opt.tools.bc servers\libservers.javascript.opt.tools.bc core\libcore.javascript.opt.tools.bc modules\freetype\libfreetype_builtin.javascript.opt.tools.bc C:\Users\loris\.emscripten_cache\wasm-obj\libc.a C:\Users\loris\.emscripten_cache\wasm-obj\libcompiler_rt.a C:\Users\loris\.emscripten_cache\wasm-obj\libc-wasm.a C:\Users\loris\.emscripten_cache\wasm-obj\libc++-noexcept.a C:\Users\loris\.emscripten_cache\wasm-obj\libc++abi-noexcept.a C:\Users\loris\.emscripten_cache\wasm-obj\libgl-webgl2.a C:\Users\loris\.emscripten_cache\wasm-obj\libdlmalloc.a C:\Users\loris\.emscripten_cache\wasm-obj\libpthread_stub.a C:\Users\loris\.emscripten_cache\wasm-obj\libc_rt_wasm.a C:\Users\loris\.emscripten_cache\wasm-obj\libsockets.a --allow-undefined --import-memory --import-table -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --export __wasm_call_ctors --export __data_end --export main --export malloc --export free --export setThrew --export __errno_location --export _ZSt18uncaught_exceptionv --export _get_environ --export htonl --export htons --export ntohs --export realloc --export emscripten_main_thread_process_queued_calls --export emscripten_GetProcAddress --export strstr --export _get_tzname --export _get_daylight --export _get_timezone -z stack-size=5242880 --initial-memory=16777216 --no-entry --global-base=1024' failed (1)
scons: *** [bin\godot.javascript.opt.tools.js] Error 1

Steps to reproduce:
Use latest emsdk (1.39.8) and python 3.7.4 (anaconda3) on windows, run build command given above.

Further notes:

  • I am just getting started and I am having look around in the engine, so total newbie here.
  • I tried other version of emsdk without success.
  • Value given to --initial-memory is odd. Exactly 2^24 looks like a default somehow.
  • Possibly a problem in emscripten?
  • Debug platform=windows worked flawlessly, so i am hopeful that this is just a detail that I get wrong.

Any help is greatly appreciated, since I am kind of at a loss where to continue from here.

archived

Most helpful comment

Editor builds (tools=yes) are currently not supported for the HTML5/Javascript platform.
You can try adding -s TOTAL_MEMORY=33554432 to the LINKFLAGS but there's not much to see there since file system persistence is missing.

All 3 comments

cc @Faless

Editor builds (tools=yes) are currently not supported for the HTML5/Javascript platform.
You can try adding -s TOTAL_MEMORY=33554432 to the LINKFLAGS but there's not much to see there since file system persistence is missing.

You can try adding -s TOTAL_MEMORY=33554432 to the LINKFLAGS

That worked! :-) Thanks

but there's not much to see there since file system persistence is missing.

Makes sense, I still want play around a bit

Editor builds (tools=yes) are currently not supported for the HTML5/Javascript platform.

Good to know

Thank you for the fast feedback / help, closing.

Was this page helpful?
0 / 5 - 0 ratings