Skip to content

Instantly share code, notes, and snippets.

@icculus
Created October 26, 2017 18:41
Show Gist options
  • Save icculus/d57e1e3fb504cb698edb091543bda27b to your computer and use it in GitHub Desktop.
Save icculus/d57e1e3fb504cb698edb091543bda27b to your computer and use it in GitHub Desktop.
Running out of memory linking Emscripten MAME...
Linking mame.bc...
WARNING:root:emcc: cannot find library "util"
WARNING:root:emcc: cannot find library "SDL2_ttf"
Running post-build commands
/Users/icculus/Desktop/emsdk_portable/emscripten/1.37.9/emcc -O3 -s USE_SDL=2 -s USE_SDL_TTF=2 --memory-init-file 0 -s ALLOW_MEMORY_GROWTH=0 -s TOTAL_MEMORY=268435456 -s DISABLE_EXCEPTION_CATCHING=2 -s EXCEPTION_CATCHING_WHITELIST='["__ZN15running_machine17start_all_devicesEv","__ZN12cli_frontend7executeEiPPc"]' -s EXPORTED_FUNCTIONS="['_main', '_malloc', '__ZN15running_machine30emscripten_get_running_machineEv', '__ZN15running_machine17emscripten_get_uiEv', '__ZN15running_machine20emscripten_get_soundEv', '__ZN15mame_ui_manager12set_show_fpsEb', '__ZNK15mame_ui_manager8show_fpsEv', '__ZN13sound_manager4muteEbh', '_SDL_PauseAudio', '_SDL_SendKeyboardKey', '__ZN15running_machine15emscripten_saveEPKc', '__ZN15running_machine15emscripten_loadEPKc', '__ZN15running_machine21emscripten_hard_resetEv', '__ZN15running_machine21emscripten_soft_resetEv', '__ZN15running_machine15emscripten_exitEv']" --pre-js /Users/icculus/projects/mame/src/osd/modules/sound/js_sound.js --post-js /Users/icculus/projects/mame/scripts/resources/emscripten/emscripten_post.js --embed-file /Users/icculus/projects/mame/bgfx/chains@bgfx/chains --embed-file /Users/icculus/projects/mame/bgfx/effects@bgfx/effects --embed-file /Users/icculus/projects/mame/bgfx/shaders/essl@bgfx/shaders/essl --embed-file /Users/icculus/projects/mame/artwork/slot-mask.png@artwork/slot-mask.png ../../../../../mame.bc -o /Users/icculus/projects/mame/mamemame.js
warning: unresolved symbol: glPointSize
warning: unresolved symbol: glPopAttrib
warning: unresolved symbol: glEnableClientState
warning: unresolved symbol: glTexCoordPointer
warning: unresolved symbol: glPushAttrib
warning: unresolved symbol: glColor4f
warning: unresolved symbol: glEnd
warning: unresolved symbol: glGetTexLevelParameteriv
warning: unresolved symbol: glVertex2f
warning: unresolved symbol: pthread_setcancelstate
warning: unresolved symbol: glShadeModel
warning: unresolved symbol: glOrtho
warning: unresolved symbol: glDisableClientState
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
Traceback (most recent call last):
File "/Users/icculus/Desktop/emsdk_portable/emscripten/1.37.9/emcc", line 13, in <module>
emcc.run()
File "/Users/icculus/Desktop/emsdk_portable/emscripten/1.37.9/emcc.py", line 1976, in run
JSOptimizer.flush()
File "/Users/icculus/Desktop/emsdk_portable/emscripten/1.37.9/emcc.py", line 1871, in flush
run_passes(chunks[0], title, just_split=False, just_concat=False)
File "/Users/icculus/Desktop/emsdk_portable/emscripten/1.37.9/emcc.py", line 1844, in run_passes
final = shared.Building.js_optimizer(final, passes, debug_level >= 4, JSOptimizer.extra_info, just_split=just_split, just_concat=just_concat)
File "/Users/icculus/Desktop/emsdk_portable/emscripten/1.37.9/tools/shared.py", line 2046, in js_optimizer
ret = js_optimizer.run(filename, passes, NODE_JS, debug, extra_info, just_split, just_concat)
File "/Users/icculus/Desktop/emsdk_portable/emscripten/1.37.9/tools/js_optimizer.py", line 563, in run
return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, source_map, extra_info, just_split, just_concat))
File "/Users/icculus/Desktop/emsdk_portable/emscripten/1.37.9/tools/tempfiles.py", line 78, in run_and_clean
return func()
File "/Users/icculus/Desktop/emsdk_portable/emscripten/1.37.9/tools/js_optimizer.py", line 563, in <lambda>
return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, source_map, extra_info, just_split, just_concat))
File "/Users/icculus/Desktop/emsdk_portable/emscripten/1.37.9/tools/js_optimizer.py", line 502, in run_on_js
assert proc.returncode == 0
AssertionError
make[2]: *** [../../../../../mame.bc] Error 1
make[1]: *** [mame] Error 2
make: *** [asmjs] Error 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment