Skip to content

test_binaryen fails on incoming branch + prebuilt SDK 1.37.21 #5634

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
saschanaz opened this issue Oct 6, 2017 · 6 comments
Closed

test_binaryen fails on incoming branch + prebuilt SDK 1.37.21 #5634

saschanaz opened this issue Oct 6, 2017 · 6 comments
Labels

Comments

@saschanaz
Copy link
Collaborator

sudo apt install python-pip && pip install --upgrade pip && pip install lit unexpectedly causes test_binaryen fail:

$ python2 tests/runner.py test_binaryene1.37.21_6
WARNING:root:use EM_ALL_ENGINES=1 in the env to run against all JS engines, which is slower but provides more coverage
Test suites:
['test_core']
Running test_core: (1 tests)
test_binaryen (test_core.default) ... (checking sanity from test runner)
INFO:root:(Emscripten: Running sanity checks)
WARNING:root:BINARYEN_ASYNC_COMPILATION requested, but disabled because of user options. This will reduce performance and compatibility (some browsers limit synchronous compilation), see https://github.com/kripken/emscripten/wiki/WebAssembly#codegen-effects
Unknown option '--trap-mode'
Traceback (most recent call last):
  File "/home/saschanaz/emscripten/emcc", line 13, in <module>
    emcc.run()
  File "/home/saschanaz/emscripten/emcc.py", line 1812, in run
    wasm_text_target, misc_temp_files, optimizer)
  File "/home/saschanaz/emscripten/emcc.py", line 2279, in do_binaryen
    subprocess.check_call(cmd)
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/saschanaz/emsdk-portable/clang/e1.37.21_64bit/binaryen/bin/asm2wasm', '/tmp/emscripten_test_default_DIDCd4/src.cpp.o.temp.asm.js', '--total-memory=16777216', '--trap-mode=allow', '--mem-init=/tmp/emscripten_test_default_DIDCd4/src.cpp.o.js.mem', '--mem-base=1024', '--wasm-only', '-o', '/tmp/emscripten_test_default_DIDCd4/src.cpp.o.wasm']' returned non-zero exit status 1
ERROR

======================================================================
ERROR: test_binaryen (test_core.default)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/saschanaz/emscripten/tests/test_core.py", line 27, in decorated
    return func(self)
  File "/home/saschanaz/emscripten/tests/test_core.py", line 7378, in test_binaryen
    self.do_run(open(path_from_root('tests', 'hello_world.c')).read(), 'hello, world!')
  File "/home/saschanaz/emscripten/tests/runner.py", line 653, in do_run
    build_ll_hook=build_ll_hook, extra_emscripten_args=extra_emscripten_args, post_build=post_build)
  File "/home/saschanaz/emscripten/tests/runner.py", line 362, in build
    output = subprocess.check_call(args, stderr=self.stderr_redirect if not DEBUG else None)
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['/usr/bin/python2', '/home/saschanaz/emscripten/emcc', '-Wno-dynamic-class-memaccess', '-Wno-format', '-Wno-format-extra-args', '-Wno-format-security', '-Wno-pointer-bool-conversion', '-Wno-unused-volatile-lvalue', '-Wno-c++11-compat-deprecated-writable-strings', '-Wno-invalid-pp-token', '-s', 'GL_DEBUG=0', '-s', 'EXCEPTION_CATCHING_WHITELIST=[]', '-s', 'INCLUDE_FULL_LIBRARY=0', '-s', 'BINARYEN=0', '-s', 'TEXTDECODER=1', '-s', 'FINALIZE_ASM_JS=1', '-s', 'BINARYEN_ROOT=""', '-s', 'SPLIT_MEMORY=0', '-s', 'WEBGL2_BACKWARDS_COMPATIBILITY_EMULATION=0', '-s', 'LIBRARY_DEBUG=0', '-s', 'USE_CLOSURE_COMPILER=0', '-s', 'USE_SDL_IMAGE=1', '-s', 'SDL2_IMAGE_FORMATS=[]', '-s', 'INLINING_LIMIT=0', '-s', 'MODULARIZE=0', '-s', 'ASMFS=0', '-s', 'NO_FILESYSTEM=0', '-s', 'SYSTEM_JS_LIBRARIES=[]', '-s', 'FETCH_DEBUG=0', '-s', 'BINARYEN_TRAP_MODE="allow"', '-s', 'ERROR_ON_MISSING_LIBRARIES=0', '-s', 'SOCKET_WEBRTC=0', '-s', 'FUNCTION_POINTER_ALIGNMENT=2', '-s', 'EVAL_CTORS=0', '-s', 'USE_PTHREADS=0', '-s', 'USE_OGG=0', '-s', 'ABORTING_MALLOC=1', '-s', 'EXPORT_NAME="Module"', '-s', 'AGGRESSIVE_VARIABLE_ELIMINATION=0', '-s', 'SIMPLIFY_IFS=1', '-s', 'ALIASING_FUNCTION_POINTERS=0', '-s', 'EMULATED_FUNCTION_POINTERS=0', '-s', 'EMSCRIPTEN_VERSION=""', '-s', 'OPENAL_DEBUG=0', '-s', 'NO_EXIT_RUNTIME=0', '-s', 'RELOCATABLE=0', '-s', 'RUNTIME_LINKED_LIBS=[]', '-s', 'PRECISE_F32=0', '-s', 'DEBUG_TAGS_SHOWING=[]', '-s', 'SAFE_HEAP_LOG=0', '-s', 'PROXY_TO_WORKER_FILENAME=""', '-s', 'LIBRARY_DEPS_TO_AUTOEXPORT=["memcpy"]', '-s', 'ASSERTIONS=1', '-s', 'QUANTUM_SIZE=4', '-s', 'PRECISE_I64_MATH=1', '-s', 'SEPARATE_ASM=0', '-s', 'GLOBAL_BASE=-1', '-s', 'STACK_OVERFLOW_CHECK=0', '-s', 'FORCE_FILESYSTEM=0', '-s', 'LZ4=0', '-s', 'ASM_JS=2', '-s', 'WARN_UNALIGNED=0', '-s', 'WASM_BINARY_FILE=""', '-s', 'ASMJS_CODE_FILE=""', '-s', 'EMULATE_FUNCTION_POINTER_CASTS=0', '-s', 'BINARYEN_PASSES=""', '-s', 'BINARYEN_SCRIPTS=""', '-s', 'TOTAL_STACK=5242880', '-s', 'TRACE_WEBGL_CALLS=0', '-s', 'RESERVED_FUNCTION_POINTERS=0', '-s', 'EXCEPTION_DEBUG=0', '-s', 'GL_PREINITIALIZED_CONTEXT=0', '-s', 'SWAPPABLE_ASM_MODULE=0', '-s', 'SHELL_FILE=0', '-s', 'GL_ASSERTIONS=0', '-s', 'BOOTSTRAPPING_STRUCT_INFO=0', '-s', 'MEM_INIT_METHOD=0', '-s', 'GL_TESTING=0', '-s', 'DETERMINISTIC=0', '-s', 'SAFE_HEAP=0', '-s', 'DEAD_FUNCTIONS=[]', '-s', 'USE_LIBPNG=0', '-s', 'GL_FFP_ONLY=0', '-s', 'EMSCRIPTEN_TRACING=0', '-s', 'OPT_LEVEL=0', '-s', 'MEMFS_APPEND_TO_TYPED_ARRAYS=0', '-s', 'NO_DYNAMIC_EXECUTION=0', '-s', 'BUILD_AS_WORKER=0', '-s', 'EXPORT_ALL=0', '-s', 'EMTERPRETIFY_ADVISE=0', '-s', 'VERBOSE=0', '-s', 'DISABLE_EXCEPTION_CATCHING=0', '-s', 'PTHREADS_PROFILING=0', '-s', 'EMTERPRETIFY_WHITELIST=[]', '-s', 'SKIP_STACK_IN_SMALL=1', '-s', 'STRICT=0', '-s', 'PROFILING_FUNCS=0', '-s', 'SOURCE_MAP_BASE=""', '-s', 'EMTERPRETIFY_ASYNC=0', '-s', 'FULL_ES2=0', '-s', 'FULL_ES3=0', '-s', 'OFFSCREENCANVAS_SUPPORT=0', '-s', 'USE_WEBGL2=0', '-s', 'ELIMINATE_DUPLICATE_FUNCTIONS_DUMP_EQUIVALENT_FUNCTIONS=0', '-s', 'SIMD=0', '-s', 'PROXY_TO_WORKER=0', '-s', 'UNALIGNED_MEMORY=0', '-s', 'PROXY_TO_PTHREAD=0', '-s', 'FORCE_ALIGNED_MEMORY=0', '-s', 'EXTRA_EXPORTED_RUNTIME_METHODS=[]', '-s', 'FETCH=0', '-s', 'ASYNCIFY=0', '-s', 'TOTAL_MEMORY=16777216', '-s', 'USE_COCOS2D=0', '-s', 'USE_SDL_NET=1', '-s', 'SOCKET_DEBUG=0', '-s', 'ELIMINATE_DUPLICATE_FUNCTIONS_PASSES=5', '-s', 'EXPLICIT_ZEXT=0', '-s', 'STACK_START=-1', '-s', 'HEADLESS=0', '-s', 'USE_SDL=1', '-s', 'USE_VORBIS=0', '-s', 'MAIN_MODULE=0', '-s', 'ASYNCIFY_WHITELIST=["qsort", "trinkle", "__toread", "__uflow", "__fwritex", "MUSL_vfprintf"]', '-s', 'SAFE_SPLIT_MEMORY=0', '-s', 'WEBSOCKET_URL="ws:#"', '-s', 'EMTERPRETIFY=0', '-s', 'DEBUG_LEVEL=0', '-s', 'SMALL_XHR_CHUNKS=0', '-s', 'USE_GLFW=2', '-s', 'WARN_ON_UNDEFINED_SYMBOLS=1', '-s', 'CYBERDWARF=0', '-s', 'ORIGINAL_EXPORTED_FUNCTIONS=[]', '-s', 'ONLY_MY_CODE=0', '-s', 'BINARYEN_MEM_MAX=-1', '-s', 'DEMANGLE_SUPPORT=0', '-s', 'RUNNING_JS_OPTS=0', '-s', 'WEBSOCKET_SUBPROTOCOL="binary"', '-s', 'INVOKE_RUN=1', '-s', 'PTHREAD_HINT_NUM_CORES=4', '-s', 'BINARYEN_ASYNC_COMPILATION=1', '-s', 'PTHREAD_POOL_SIZE=0', '-s', 'DEFAULT_LIBRARY_FUNCS_TO_INCLUDE=["memcpy", "memset", "malloc", "free"]', '-s', 'WASM=0', '-s', 'EXPORT_FUNCTION_TABLES=0', '-s', 'SIDE_MODULE=0', '-s', 'USE_SDL_TTF=1', '-s', 'GL_MAX_TEMP_BUFFER_SIZE=2097152', '-s', 'FS_LOG=0', '-s', 'STB_IMAGE=0', '-s', 'EXPORT_BINDINGS=0', '-s', 'RUNTIME_LOGGING=0', '-s', 'ELIMINATE_DUPLICATE_FUNCTIONS=0', '-s', 'NODEJS_CATCH_EXIT=1', '-s', 'SYSCALL_DEBUG=0', '-s', 'PGO=0', '-s', 'IN_TEST_HARNESS=0', '-s', 'BUILD_AS_SHARED_LIB=0', '-s', 'EMTERPRETIFY_BLACKLIST=[]', '-s', 'LEGALIZE_JS_FFI=1', '-s', 'USE_FREETYPE=0', '-s', 'DOUBLE_MODE=1', '-s', 'BUNDLED_CD_DEBUG_FILE=""', '-s', 'MAX_GLOBAL_ALIGN=-1', '-s', 'EMTERPRETIFY_FILE=""', '-s', 'LEGACY_GL_EMULATION=0', '-s', 'RETAIN_COMPILER_SETTINGS=0', '-s', 'EXPORTED_FUNCTIONS=["_main"]', '-s', 'EXPORTED_RUNTIME_METHODS=["FS_createFolder", "FS_createPath", "FS_createDataFile", "FS_createPreloadedFile", "FS_createLazyFile", "FS_createLink", "FS_createDevice", "FS_unlink", "Runtime", "ccall", "cwrap", "setValue", "getValue", "ALLOC_NORMAL", "ALLOC_STACK", "ALLOC_STATIC", "ALLOC_DYNAMIC", "ALLOC_NONE", "allocate", "getMemory", "Pointer_stringify", "AsciiToString", "stringToAscii", "UTF8ArrayToString", "UTF8ToString", "stringToUTF8Array", "stringToUTF8", "lengthBytesUTF8", "stackTrace", "addOnPreRun", "addOnInit", "addOnPreMain", "addOnExit", "addOnPostRun", "intArrayFromString", "intArrayToString", "writeStringToMemory", "writeArrayToMemory", "writeAsciiToMemory", "addRunDependency", "removeRunDependency"]', '-s', 'ALLOW_MEMORY_GROWTH=0', '-s', 'USE_BULLET=0', '-s', 'CASE_INSENSITIVE_FS=0', '-s', 'USE_ZLIB=0', '-s', 'WASM_TEXT_FILE=""', '-s', 'GL_UNSAFE_OPTS=1', '-s', 'BENCHMARK=0', '-s', 'BINARYEN_METHOD="native-wasm"', '-s', 'LINKABLE=0', '-s', 'WASM_BACKEND=0', '-s', 'ASYNCIFY_FUNCTIONS=["emscripten_sleep", "emscripten_wget", "emscripten_yield"]', '-s', 'ERROR_ON_UNDEFINED_SYMBOLS=0', '-s', 'BINARYEN_IGNORE_IMPLICIT_TRAPS=0', '-s', 'OUTLINING_LIMIT=0', '-s', 'ASM_JS=2', '-s', 'BINARYEN=1', '-s', 'BINARYEN_METHOD="interpret-binary"', '-I', '/tmp/emscripten_test_default_DIDCd4', '-I', '/tmp/emscripten_test_default_DIDCd4/include', '/tmp/emscripten_test_default_DIDCd4/src.cpp', '-o', '/tmp/emscripten_test_default_DIDCd4/src.cpp.o.js']' returned non-zero exit status 1

----------------------------------------------------------------------
Ran 1 test in 3.357s

FAILED (errors=1)

Any clue about why --trap-mode suddenly becomes unknown?

@saschanaz
Copy link
Collaborator Author

The mode is added by recent pull request #5620 and the SDK just didn't support it yet.

@kripken
Copy link
Member

kripken commented Oct 6, 2017

Does it work after updating the SDK? If not, maybe something went wrong in the update.

@saschanaz
Copy link
Collaborator Author

No new SDK update after 1.37.21 yet, so no.

@kripken kripken reopened this Oct 8, 2017
@kripken
Copy link
Member

kripken commented Oct 8, 2017

Hmm, that's not good, maybe I don't understand how the emsdk pulls in binaryen updates. I tagged a 1.37.22 now.

@juj, do binaryen updates need an emscripten version bump in order to take effect? It ignores the binaryen version in tools/ports/binaryen.py?

@saschanaz
Copy link
Collaborator Author

saschanaz commented Oct 8, 2017

emsdk install latest gets prebuilt asm2wasm binary, probably it matters.

PS: Incoming branch + binary SDK are not always guaranteed to work well together, this is why I closed this issue. The original post didn't explain the environment, sorry.

@saschanaz saschanaz changed the title test_binaryen fails after installing lit test_binaryen fails on prebuilt SDK 1.37.21 Oct 8, 2017
@saschanaz saschanaz changed the title test_binaryen fails on prebuilt SDK 1.37.21 test_binaryen fails on incoming branch + prebuilt SDK 1.37.21 Oct 8, 2017
@stale
Copy link

stale bot commented Sep 19, 2019

This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.

@stale stale bot added the wontfix label Sep 19, 2019
@stale stale bot closed this as completed Sep 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants