{"action":"created","issue":{"url":"https://api.github.com/repos/kripken/emscripten/issues/4018","labels_url":"https://api.github.com/repos/kripken/emscripten/issues/4018/labels{/name}","comments_url":"https://api.github.com/repos/kripken/emscripten/issues/4018/comments","events_url":"https://api.github.com/repos/kripken/emscripten/issues/4018/events","html_url":"https://github.com/kripken/emscripten/issues/4018","id":125282746,"number":4018,"title":"EMTERPRETIFY throwing error","user":{"login":"jenvannier","id":13319340,"avatar_url":"https://avatars.githubusercontent.com/u/13319340?v=3","gravatar_id":"","url":"https://api.github.com/users/jenvannier","html_url":"https://github.com/jenvannier","followers_url":"https://api.github.com/users/jenvannier/followers","following_url":"https://api.github.com/users/jenvannier/following{/other_user}","gists_url":"https://api.github.com/users/jenvannier/gists{/gist_id}","starred_url":"https://api.github.com/users/jenvannier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenvannier/subscriptions","organizations_url":"https://api.github.com/users/jenvannier/orgs","repos_url":"https://api.github.com/users/jenvannier/repos","events_url":"https://api.github.com/users/jenvannier/events{/privacy}","received_events_url":"https://api.github.com/users/jenvannier/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-01-06T23:00:24Z","updated_at":"2016-01-12T16:59:38Z","closed_at":null,"body":"For the program\r\n\r\n> #ifdef EMSCRIPTEN\r\n> #include \\<emscripten/emscripten.h>\r\n> #include \\<SDL/SDL.h>\r\n> #include \\<GLES2/gl2.h>\r\n> #endif\r\n>\r\n> int main() {\r\n>   return 0;\r\n> }\r\n\r\nI compile with the command line:\r\n> em++ -std=c++11  -DEMSCRIPTEN -s USE_PTHREADS=1 -s  -s EMTERPRETIFY=1  -s EMTERPRETIFY_ASYNC=1   test.cc  -o test.html\r\n\r\nand it throws this error:\r\n> WARNING:root:clearing cache\r\nINFO:root:(Emscripten: Running sanity checks)\r\nWARNING:root:generating system library: libc-mt.bc...\r\nWARNING:root:                                        ok\r\nWARNING:root:generating system library: pthreads.bc...\r\nWARNING:root:                                         ok\r\nWARNING:root:generating system library: dlmalloc_threadsafe.bc...\r\nWARNING:root:                                                    ok\r\nStack: Error\r\n    at assertTrue (eval at globalEval (/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/tools/js-optimizer.js:114:8), <anonymous>:59:26)\r\n    at /Users/jennifer/workspace/emsdk_portable/emscripten/incoming/tools/js-optimizer.js:7003:9\r\n    at Array.forEach (native)\r\n    at makeCall (/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/tools/js-optimizer.js:6998:15)\r\n    at getReg (/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/tools/js-optimizer.js:6381:24)\r\n    at getReg (/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/tools/js-optimizer.js:6148:27)\r\n    at getReg (/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/tools/js-optimizer.js:6135:29)\r\n    at /Users/jennifer/workspace/emsdk_portable/emscripten/incoming/tools/js-optimizer.js:7034:19\r\n    at Array.forEach (native)\r\n    at walkStatements (/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/tools/js-optimizer.js:7032:13)\r\n\r\n>undefined:60\r\n    throw msg;\r\n    ^\r\n>Assertion failed: undefined\r\nTraceback (most recent call last):\r\n  File \"/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/tools/emterpretify.py\", line 824, in <module>\r\n    shared.Building.js_optimizer(infile, ['emterpretify'], extra_info={ 'emterpretedFuncs': list(emterpreted_funcs), 'externalEmterpretedFuncs': list(external_emterpreted_funcs), 'opcodes': OPCODES, 'ropcodes': ROPCODES, 'ASYNC': ASYNC, 'PROFILING': PROFILING, 'ASSERTIONS': ASSERTIONS }, output_filename=temp, just_concat=True)\r\n  File \"/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/tools/shared.py\", line 1656, in js_optimizer\r\n    ret = js_optimizer.run(filename, passes, NODE_JS, debug, extra_info, just_split, just_concat)\r\n  File \"/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/tools/js_optimizer.py\", line 539, in run\r\n    return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, source_map, extra_info, just_split, just_concat))\r\n  File \"/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/tools/tempfiles.py\", line 64, in run_and_clean\r\n    return func()\r\n  File \"/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/tools/js_optimizer.py\", line 539, in <lambda>\r\n    return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, source_map, extra_info, just_split, just_concat))\r\n  File \"/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/tools/js_optimizer.py\", line 449, in run_on_js\r\n    filenames = [run_on_chunk(command) for command in commands]\r\n  File \"/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/tools/js_optimizer.py\", line 279, in run_on_chunk\r\n    assert proc.returncode == 0, 'Error in optimizer (return code ' + str(proc.returncode) + '): ' + output\r\nAssertionError: Error in optimizer (return code 1): function _malloc($bytes) {\r\n $bytes = $bytes | 0;\r\n var $$1 = 0, $$lcssa = 0, ...\r\n\r\nwith a traceback:\r\n> Traceback (most recent call last):\r\n  File \"/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/em++\", line 13, in <module>\r\n    emcc.run()\r\n  File \"/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/emcc.py\", line 1701, in run\r\n    JSOptimizer.flush()\r\n  File \"/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/emcc.py\", line 1544, in flush\r\n    run_passes(chunks[0], title, just_split=False, just_concat=False)\r\n  File \"/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/emcc.py\", line 1517, in run_passes\r\n    final = shared.Building.js_optimizer(final, passes, debug_level >= 4, JSOptimizer.extra_info, just_split=just_split, just_concat=just_concat)\r\n  File \"/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/tools/shared.py\", line 1656, in js_optimizer\r\n    ret = js_optimizer.run(filename, passes, NODE_JS, debug, extra_info, just_split, just_concat)\r\n  File \"/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/tools/js_optimizer.py\", line 539, in run\r\n    return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, source_map, extra_info, just_split, just_concat))\r\n  File \"/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/tools/tempfiles.py\", line 64, in run_and_clean\r\n    return func()\r\n  File \"/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/tools/js_optimizer.py\", line 539, in <lambda>\r\n    return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, source_map, extra_info, just_split, just_concat))\r\n  File \"/Users/jennifer/workspace/emsdk_portable/emscripten/incoming/tools/js_optimizer.py\", line 297, in run_on_js\r\n    js = open(filename).read()\r\nIOError: [Errno 2] No such file or directory: '/var/folders/xh/_txhctk92kb2ycj44h09zjq80000gn/T/tmpC4IhtatmpoKbGRm.jsfunc_0.js.jo.js.jo.js.em.js'\r\n\r\nAm I using EMTERPRETIFY wrong? Without EMTERPRETIFY=1 it doesn't throw this error, but it is my understanding that for EMTERPRETIFY_ASYNC (which I need for my rendering loops later) to work I need to have EMTERPRETIFY. Thank you for your time!\r\n"},"comment":{"url":"https://api.github.com/repos/kripken/emscripten/issues/comments/170975085","html_url":"https://github.com/kripken/emscripten/issues/4018#issuecomment-170975085","issue_url":"https://api.github.com/repos/kripken/emscripten/issues/4018","id":170975085,"user":{"login":"kripken","id":173661,"avatar_url":"https://avatars.githubusercontent.com/u/173661?v=3","gravatar_id":"","url":"https://api.github.com/users/kripken","html_url":"https://github.com/kripken","followers_url":"https://api.github.com/users/kripken/followers","following_url":"https://api.github.com/users/kripken/following{/other_user}","gists_url":"https://api.github.com/users/kripken/gists{/gist_id}","starred_url":"https://api.github.com/users/kripken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kripken/subscriptions","organizations_url":"https://api.github.com/users/kripken/orgs","repos_url":"https://api.github.com/users/kripken/repos","events_url":"https://api.github.com/users/kripken/events{/privacy}","received_events_url":"https://api.github.com/users/kripken/received_events","type":"User","site_admin":false},"created_at":"2016-01-12T16:59:38Z","updated_at":"2016-01-12T16:59:38Z","body":"Maybe a longshot, but https://github.com/kripken/emscripten-fastcomp/pull/131 might help here, it makes the Atomics code more \"regular\" for asm.js. Could be worth trying after that lands."}}