[Pkg-javascript-devel] Bug#975069: Bug#975069: emscripten: Incompatibilities with LLVM 11

Sébastien Jodogne s.jodogne at orthanc-labs.com
Wed Nov 18 19:49:27 GMT 2020


> Thanks for your bugreport - and for being the first known user of the
> emscripten package in Debian (besides my own use of it for the olm
> package).

This is really nice to see other work on WebAssembly in Debian! :-)

I think there will be other topics to be discussed, notably how to
properly package wasm applications that rely on third-party libraries
(this is the case of my project "Stone Web viewer" for medical imaging).
Using a library indeed implies taking the source code from other
packages as a build dependency. I had a brief discussion with Andreas
Tille a few months ago about a related topic:
https://lists.debian.org/debian-med/2020/05/msg00242.html

>> When building a large C++ project using the current package, the
>> WebAssembly linking might fail with error "emscripten:ERROR: emscript:
>> failure to parse metadata output from wasm-emscripten-finalize".
> 
> Which exact options passed to wasm-emscripten-finalize?

After inspection of "/usr/share/emscripten/emscripten.py", the options are:

['--detect-features', '--minimize-wasm-changes', '--dyncalls-i64',
'--global-base=1024']

You'll find the error log attached to this mail.

Note how "wasm-emscripten-finalize" produced an invalid JSON file: It
contains percents that are not properly escaped. From what I see on a
working emsdk deployment, no function starting with "__invoke" in the
"declares" section should be present.

> Please do *not* bother upstream emscripten developers with this issue.

Duly noted.

Kind Regards,
Sébastien-
-------------- next part --------------
[1/1] Linking CXX executable RtViewerWasm
FAILED: RtViewerWasm 
: && /usr/bin/em++ -s WASM=1 -s FETCH=1 -Wno-implicit-function-declaration -s WASM=1 -std=c++11 -Wno-deprecated-declarations -DNDEBUG -O2 -s DISABLE_EXCEPTION_CATCHING=0 -O2   -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]' -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s ASSERTIONS=1 -s DISABLE_EXCEPTION_CATCHING=0 -s ALLOW_MEMORY_GROWTH=1 -s TOTAL_MEMORY=268435456 -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1 CMakeFiles/RtViewerWasm.dir/RtViewer/RtViewerWasm.cpp.obj CMakeFiles/RtViewerWasm.dir/home/jodogne/wasm/orthanc-stone/Applications/Samples/Common/RtViewerApp.cpp.obj CMakeFiles/RtViewerWasm.dir/home/jodogne/wasm/orthanc-stone/Applications/Samples/Common/RtViewerView.cpp.obj -o RtViewerWasm  libOrthancStone.a && :
emscripten:ERROR: emscript: failure to parse metadata output from wasm-emscripten-finalize. raw output is: 
{
  "asmConsts": {
    "1189": ["const customEvent = document.createEvent(\"CustomEvent\"); customEvent.initCustomEvent(\"WasmModuleInitialized\", false, false, undefined); window.dispatchEvent(customEvent);", ["iii"], [""]],
    "72353": ["{ document.getElementById(UTF8ToString($0)).oncontextmenu = function(event) { event.preventDefault(); } }", ["iii"], [""]]
  },
  "staticBump": 736104,
  "tableSize": 2085,
  "initializers": [
    "__wasm_call_ctors"
  ],
  "declares": [
    "emscripten_set_wheel_callback_on_thread",
    "__cxa_allocate_exception",
    "__cxa_throw",
    "emscripten_asm_const_int",
    "__cxa_atexit",
    "emscripten_console_error",
    "emscripten_console_warn",
    "emscripten_console_log",
    "emscripten_longjmp_jmpbuf",
    "__invoke_%"class.Orthanc::Internals::JpegErrorManager"*_%"class.Orthanc::Internals::JpegErrorManager"*",
    "emscripten_longjmp",
    "setTempRet0",
    "getTempRet0",
    "__invoke_void_%struct.jpeg_decompress_struct*",
    "__invoke_void_%struct.jpeg_decompress_struct*_i32_i32",
    "__invoke_void_%struct.jpeg_decompress_struct*_i8*_i32",
    "__invoke_i32_%struct.jpeg_decompress_struct*_i32",
    "__invoke_i32_%struct.jpeg_decompress_struct*",
    "__invoke_%"class.Orthanc::OrthancException"*_%"class.Orthanc::OrthancException"*_i32",
    "__invoke_i8**_%struct.jpeg_common_struct*_i32_i32_i32",
    "__invoke_void_%"class.std::__2::basic_string"*_i32_i8",
    "__invoke_void_%"class.Orthanc::ImageAccessor"*_i32_i32_i32_i32_i8*",
    "__invoke_i32_%struct.jpeg_decompress_struct*_i8**_i32",
    "__invoke_void_i8*",
    "__invoke_void_%"class.std::__2::basic_string"*_i8*_%"class.std::__2::basic_string"*",
    "__invoke_%"class.Orthanc::OrthancException"*_%"class.Orthanc::OrthancException"*_i32_%"class.std::__2::basic_string"*_i1",
    "__invoke_i32_i8*_i32_i32",
    "__invoke_%"struct.Orthanc::PngReader::PngRabi"*_%"struct.Orthanc::PngReader::PngRabi"*",
    "__invoke_[1x%struct.__jmp_buf_tag]*_%struct.png_struct_def*_void(%struct.__jmp_buf_tag*.i32)*_i32",
    "__invoke_void_%"struct.Orthanc::PngReader::PngRabi"*",
    "__invoke_void_%struct.png_struct_def*_i8*_void(%struct.png_struct_def*.i8*.i32)*",
    "__invoke_void_%"class.Orthanc::PngReader"*_%"struct.Orthanc::PngReader::PngRabi"*",
    "__invoke_void_%struct.png_struct_def**_%struct.png_info_def**_%struct.png_info_def**",
    "exit",
    "__invoke_void_%struct.png_struct_def*_i8*_i8*(%struct.png_struct_def*.i32)*_void(%struct.png_struct_def*.i8*)*",
    "__invoke_void_%struct.png_struct_def*_i8*_void(%struct.png_struct_def*.i8*)*_void(%struct.png_struct_def*.i8*)*",
    "__invoke_i32_%struct.png_struct_def*_i8*",
    "__invoke_i8*_%struct.png_struct_def*_i32",
    "__invoke_void_%struct.png_struct_def*_i8*",
    "abort",
    "emscripten_set_timeout",
    "emscripten_get_element_css_size",
    "emscripten_set_canvas_element_size",
    "emscripten_request_animation_frame",
    "emscripten_set_resize_callback_on_thread",
    "emscripten_set_mousedown_callback_on_thread",
    "emscripten_set_mousemove_callback_on_thread",
    "emscripten_set_mouseup_callback_on_thread",
    "emscripten_webgl_init_context_attributes",
    "emscripten_webgl_create_context",
    "emscripten_is_webgl_context_lost",
    "emscripten_webgl_make_context_current",
    "emscripten_webgl_destroy_context",
    "glGenTextures",
    "glDeleteTextures",
    "glPixelStorei",
    "glActiveTexture",
    "glBindTexture",
    "glTexImage2D",
    "glTexParameteri",
    "glUniform1i",
    "glCreateProgram",
    "glDeleteProgram",
    "glUseProgram",
    "glCreateShader",
    "glShaderSource",
    "glCompileShader",
    "glGetShaderiv",
    "glGetShaderInfoLog",
    "glDeleteShader",
    "glAttachShader",
    "glLinkProgram",
    "glValidateProgram",
    "glGetUniformLocation",
    "glGetAttribLocation",
    "glUniformMatrix4fv",
    "glBindBuffer",
    "glEnableVertexAttribArray",
    "glVertexAttribPointer",
    "glDisableVertexAttribArray",
    "glGenBuffers",
    "glBufferData",
    "glDeleteBuffers",
    "glDrawArrays",
    "glEnable",
    "glBlendFunc",
    "glDisable",
    "glUniform1f",
    "__invoke_void_%struct.FT_ValidatorRec_*_i8*_i8*_i32",
    "__invoke_i32_i8*_%struct.FT_ValidatorRec_*",
    "__invoke_i32_%struct.FT_CMap_ClassRec_*_i8*_%struct.FT_CharMapRec_*_%struct.FT_CMapRec_**",
    "__invoke_i32_%struct.FT_Outline_*_%struct.FT_Outline_Funcs_*_i8*",
    "__invoke_void_%struct.gray_TWorker_*",
    "glUniform3f",
    "glViewport",
    "glClearColor",
    "glClear",
    "emscripten_is_main_browser_thread",
    "emscripten_start_fetch",
    "_emscripten_fetch_get_response_headers_length",
    "_emscripten_fetch_get_response_headers",
    "_emscripten_fetch_free",
    "__sys_fcntl64",
    "__sys_ioctl",
    "fd_read",
    "fd_write",
    "fd_close",
    "__sys_open",
    "environ_sizes_get",
    "environ_get",
    "__invoke_void_%"class.std::__2::ios_base"*_i32",
    "__cxa_find_matching_catch_3",
    "__invoke_void",
    "__cxa_find_matching_catch_2",
    "__resumeException",
    "__invoke_i32*_i32*_i32*_i32",
    "__invoke_%"class.std::__2::ctype"*_%"class.std::__2::locale"*",
    "__invoke_%"class.std::__2::basic_streambuf"*_%"class.std::__2::basic_ios"*",
    "__invoke_%"class.std::__2::basic_ostream<char.std::__2::char_traits<char>>::sentry"*_%"class.std::__2::basic_ostream<char.std::__2::char_traits<char>>::sentry"*_%"class.std::__2::basic_ostream"*",
    "__invoke_i32_%"class.std::__2::basic_streambuf"*",
    "__invoke_void_%"class.std::__2::basic_ios"*_i32",
    "__cxa_begin_catch",
    "__invoke_void_%"class.std::__2::ios_base"*",
    "__cxa_end_catch",
    "__invoke_i32_%"class.std::__2::basic_ios"*",
    "__cxa_rethrow",
    "__invoke_%"class.std::__2::num_get"*_%"class.std::__2::locale"*",
    "__invoke_%"class.std::__2::basic_streambuf"*_%"class.std::__2::num_get"*_%"class.std::__2::basic_streambuf"*_%"class.std::__2::basic_streambuf"*_%"class.std::__2::ios_base"*_i32*_double*",
    "__invoke_i32*_i32*_i32*",
    "__invoke_%"class.std::__2::basic_ostream<wchar_t.std::__2::char_traits<wchar_t>>::sentry"*_%"class.std::__2::basic_ostream<wchar_t.std::__2::char_traits<wchar_t>>::sentry"*_%"class.std::__2::basic_ostream.1"*",
    "__invoke_i32_%"class.std::__2::basic_streambuf.3"*",
    "__invoke_void_%"class.std::__2::basic_ios.0"*_i32",
    "__invoke_i1_%"class.std::__2::basic_ios"*",
    "__cxa_uncaught_exceptions",
    "__invoke_%"class.std::__2::num_put"*_%"class.std::__2::locale"*",
    "__invoke_i8_%"class.std::__2::basic_ios"*",
    "__invoke_%"class.std::__2::basic_streambuf"*_%"class.std::__2::num_put"*_%"class.std::__2::basic_streambuf"*_%"class.std::__2::ios_base"*_i8_i32",
    "__invoke_%"class.std::__2::basic_streambuf"*_%"class.std::__2::num_put"*_%"class.std::__2::basic_streambuf"*_%"class.std::__2::ios_base"*_i8_double",
    "__invoke_%"class.std::__2::basic_streambuf"*_%"class.std::__2::num_put"*_%"class.std::__2::basic_streambuf"*_%"class.std::__2::ios_base"*_i8_i8*",
    "__invoke_i1_%"class.std::__2::istreambuf_iterator"*_%"class.std::__2::istreambuf_iterator"*",
    "__invoke_i8_%"class.std::__2::istreambuf_iterator"*",
    "__invoke_%"class.std::__2::ostreambuf_iterator"*_%"class.std::__2::ostreambuf_iterator"*_i8",
    "__invoke_%"class.std::__2::istreambuf_iterator"*_%"class.std::__2::istreambuf_iterator"*",
    "__invoke_%"class.std::__2::ios_base::failure"*_%"class.std::__2::ios_base::failure"*_i8*_%"class.std::__2::error_code"*",
    "__invoke_void_i8*_i8*_i8*",
    "__cxa_free_exception",
    "__invoke_i8_%"class.std::__2::ctype"*_i8",
    "__invoke_void_%"class.std::__2::__stdinbuf"*_%"class.std::__2::locale"*",
    "__invoke_void_%"class.std::__2::basic_ios"*_%"class.std::__2::basic_streambuf"*",
    "__invoke_void_%"class.std::__2::__stdinbuf.5"*_%"class.std::__2::locale"*",
    "__invoke_void_%"class.std::__2::basic_ios.1"*_%"class.std::__2::basic_streambuf.6"*",
    "__invoke_%"class.std::__2::codecvt"*_%"class.std::__2::locale"*",
    "__invoke_%"class.std::__2::codecvt.7"*_%"class.std::__2::locale"*",
    "__invoke_%"class.std::__2::basic_ostream"*_%"class.std::__2::basic_ostream"*",
    "__invoke_%"class.std::__2::basic_ostream.2"*_%"class.std::__2::basic_ostream.2"*",
    "__invoke_%"class.std::__2::DoIOSInit"*_%"class.std::__2::DoIOSInit"*",
    "__invoke_%"class.std::__2::numpunct"*_%"class.std::__2::locale"*",
    "__invoke_void_%"class.std::__2::basic_string"*_%"class.std::__2::numpunct"*",
    "__invoke_%"class.std::__2::basic_string"*_%"class.std::__2::istreambuf_iterator"*_%"class.std::__2::basic_streambuf"*_%"class.std::__2::basic_string"*_%"class.std::__2::basic_string"*_%"class.std::__2::ctype"*_i32*_i1",
    "__invoke_void_%"class.std::__2::basic_string"*_i32",
    "__invoke_i32_i8_i32_i8*_i8**_i32*_i8_%"class.std::__2::basic_string"*_i32*_i32**_i8*",
    "__invoke_i32_i8*_i8*_i32*_i32",
    "__invoke_void_%"class.std::__2::basic_string"*_i32*_i32*_i32*",
    "__invoke_i16_i8*_i8*_i32*_i32",
    "__invoke_i32_i8_i8*_i8*_i8*_i8**_i8_i8_%"class.std::__2::basic_string"*_i32*_i32**_i32*_i8*",
    "__invoke_float_i8*_i8*_i32*",
    "__invoke_double_i8*_i8*_i32*",
    "__invoke_fp128_i8*_i8*_i32*",
    "__invoke_void_%"class.std::__2::locale"*_%"class.std::__2::ios_base"*",
    "__invoke_i8*_%"class.std::__2::ctype"*_i8*_i8*_i8*",
    "__invoke_%struct.__locale_struct*",
    "__invoke_i32_i8*_%struct.__locale_struct*_i8*_...",
    "__invoke_%"class.std::__2::__compressed_pair"*_%"class.std::__2::__compressed_pair"*_%"struct.std::__2::__default_init_tag"*_%"struct.std::__2::__default_init_tag"*",
    "__invoke_%struct.__locale_struct*_i32_i8*_%struct.__locale_struct*",
    "__invoke_%"class.std::__2::ctype.19"*_%"class.std::__2::locale"*",
    "__invoke_%"class.std::__2::numpunct.20"*_%"class.std::__2::locale"*",
    "__invoke_void_%"class.std::__2::basic_string.2"*_%"class.std::__2::numpunct.20"*",
    "__invoke_%"class.std::__2::basic_string.2"*_%"class.std::__2::istreambuf_iterator.17"*_%"class.std::__2::basic_streambuf.14"*_%"class.std::__2::basic_string.2"*_%"class.std::__2::basic_string.2"*_%"class.std::__2::ctype.19"*_i32*_i1",
    "__invoke_i1_%"class.std::__2::istreambuf_iterator.17"*_%"class.std::__2::istreambuf_iterator.17"*",
    "__invoke_i32_%"class.std::__2::istreambuf_iterator.17"*",
    "__invoke_i32_%"class.std::__2::ctype.19"*_i32",
    "__invoke_%"class.std::__2::istreambuf_iterator.17"*_%"class.std::__2::istreambuf_iterator.17"*",
    "__invoke_i32_i32_i32_i8*_i8**_i32*_i32_%"class.std::__2::basic_string"*_i32*_i32**_i32*",
    "__invoke_i32_i32_i8*_i8*_i8*_i8**_i32_i32_%"class.std::__2::basic_string"*_i32*_i32**_i32*_i32*",
    "__invoke_i8*_%"class.std::__2::ctype.19"*_i8*_i8*_i32*",
    "__invoke_i8_%"class.std::__2::numpunct"*",
    "__invoke_i32_%"class.std::__2::numpunct.20"*",
    "__invoke_void_%"class.std::__2::basic_string"*_%"class.std::__2::numpunct.20"*",
    "__invoke_void_i8*_i8*_i8*_i8*_i8**_i8**_%"class.std::__2::locale"*",
    "__invoke_void_i8*_i8*",
    "__invoke_i32_i8**_%struct.__locale_struct*_i8*_...",
    "__invoke_%"class.std::__2::basic_streambuf"*_%"class.std::__2::basic_streambuf"*_i8*_i8*_i8*_%"class.std::__2::ios_base"*_i8",
    "__invoke_%"class.std::__2::__compressed_pair.22"*_%"class.std::__2::__compressed_pair.22"*_i8**_void(i8*)**",
    "__invoke_i32_i8**_i8*_i8*",
    "__invoke_i32_i32_%struct.__locale_struct*",
    "__invoke_%"class.std::__2::ostreambuf_iterator.27"*_%"class.std::__2::ostreambuf_iterator.27"*_i32",
    "__invoke_void_i8*_i8*_i8*_i32*_i32**_i32**_%"class.std::__2::locale"*",
    "__invoke_i32_%"class.std::__2::ctype.19"*_i8",
    "__invoke_void_i32*_i32*",
    "__invoke_i32_%"class.std::__2::basic_streambuf.14"*_i32*_i32",
    "__invoke_%"class.std::__2::basic_streambuf.14"*_%"class.std::__2::basic_streambuf.14"*_i32*_i32*_i32*_%"class.std::__2::ios_base"*_i32",
    "__invoke_%"class.std::__2::__compressed_pair.30"*_%"class.std::__2::__compressed_pair.30"*_i32**_void(i8*)**",
    "strftime_l",
    "__invoke_%"class.std::__2::__compressed_pair.3"*_%"class.std::__2::__compressed_pair.3"*_%"struct.std::__2::__default_init_tag"*_%"struct.std::__2::__default_init_tag"*",
    "__invoke_i1_%"class.std::__2::istreambuf_iterator"*_%"class.std::__2::basic_streambuf"*_i1_%"class.std::__2::locale"*_i32_i32*_i8*_%"class.std::__2::ctype"*_%"class.std::__2::unique_ptr"*_i8**_i8*",
    "__invoke_void_i1_%"class.std::__2::locale"*_%"struct.std::__2::money_base::pattern"*_i8*_i8*_%"class.std::__2::basic_string"*_%"class.std::__2::basic_string"*_%"class.std::__2::basic_string"*_%"class.std::__2::basic_string"*_i32*",
    "__invoke_void_%"class.std::__2::istreambuf_iterator<char.std::__2::char_traits<char>>::__proxy"*_%"class.std::__2::istreambuf_iterator"*_i32",
    "__invoke_void_%"class.std::__2::basic_string"*_i8",
    "__invoke_i1_i8*_i8*_i8*",
    "__invoke_void_%"class.std::__2::unique_ptr"*_i8**_i8**",
    "__invoke_void_%"class.std::__2::unique_ptr.41"*_i32**_i32**",
    "__invoke_%"class.std::runtime_error"*_%"class.std::runtime_error"*_i8*",
    "__invoke_%"class.std::__2::basic_string"*_%"class.std::__2::basic_string"*_i8*_i8*",
    "__invoke_%"class.std::__2::__compressed_pair.42"*_%"class.std::__2::__compressed_pair.42"*_i32**_void(i8*)**",
    "__invoke_i1_%"class.std::__2::istreambuf_iterator.17"*_%"class.std::__2::basic_streambuf.14"*_i1_%"class.std::__2::locale"*_i32_i32*_i8*_%"class.std::__2::ctype.19"*_%"class.std::__2::unique_ptr.29"*_i32**_i32*",
    "__invoke_void_i1_%"class.std::__2::locale"*_%"struct.std::__2::money_base::pattern"*_i32*_i32*_%"class.std::__2::basic_string"*_%"class.std::__2::basic_string.2"*_%"class.std::__2::basic_string.2"*_%"class.std::__2::basic_string.2"*_i32*",
    "__invoke_i1_%"class.std::__2::ctype.19"*_i16_i32",
    "__invoke_void_%"class.std::__2::istreambuf_iterator<wchar_t.std::__2::char_traits<wchar_t>>::__proxy"*_%"class.std::__2::istreambuf_iterator.17"*_i32",
    "__invoke_void_%"class.std::__2::basic_string.2"*_i32",
    "__invoke_i1_i32*_i32*_i32*",
    "__invoke_void_%"class.std::__2::unique_ptr.29"*_i32**_i32**",
    "__invoke_%"class.std::__2::basic_string.2"*_%"class.std::__2::basic_string.2"*_i32*_i32*",
    "__invoke_void_i1_i1_%"class.std::__2::locale"*_%"struct.std::__2::money_base::pattern"*_i8*_i8*_%"class.std::__2::basic_string"*_%"class.std::__2::basic_string"*_%"class.std::__2::basic_string"*_i32*",
    "__invoke_void_i8*_i8**_i8**_i32_i8*_i8*_%"class.std::__2::ctype"*_i1_%"struct.std::__2::money_base::pattern"*_i8_i8_%"class.std::__2::basic_string"*_%"class.std::__2::basic_string"*_%"class.std::__2::basic_string"*_i32",
    "__invoke_void_i1_i1_%"class.std::__2::locale"*_%"struct.std::__2::money_base::pattern"*_i32*_i32*_%"class.std::__2::basic_string"*_%"class.std::__2::basic_string.2"*_%"class.std::__2::basic_string.2"*_i32*",
    "__invoke_void_i32*_i32**_i32**_i32_i32*_i32*_%"class.std::__2::ctype.19"*_i1_%"struct.std::__2::money_base::pattern"*_i32_i32_%"class.std::__2::basic_string"*_%"class.std::__2::basic_string.2"*_%"class.std::__2::basic_string.2"*_i32",
    "__invoke_%"class.std::__2::basic_string"*_%"class.std::__2::basic_string"*",
    "__invoke_%"class.std::__2::basic_string"*_%"struct.std::__2::__narrow_to_utf8"*_%"class.std::__2::basic_string"*_i8*_i8*",
    "__invoke_i8*_i8*_i32_i32_i8*",
    "__invoke_%"class.std::__2::basic_string"*_%"struct.std::__2::__widen_from_utf8"*_%"class.std::__2::basic_string"*_i8*_i8*",
    "__invoke_%"struct.std::__2::__narrow_to_utf8.53"*_%"struct.std::__2::__narrow_to_utf8.53"*",
    "__invoke_%"class.std::__2::basic_string"*_%"struct.std::__2::__narrow_to_utf8.53"*_%"class.std::__2::basic_string"*_i32*_i32*",
    "__invoke_%"struct.std::__2::__widen_from_utf8.54"*_%"struct.std::__2::__widen_from_utf8.54"*",
    "__invoke_%"class.std::__2::basic_string.2"*_%"class.std::__2::basic_string.2"*",
    "__invoke_%"class.std::__2::basic_string.2"*_%"struct.std::__2::__widen_from_utf8.54"*_%"class.std::__2::basic_string.2"*_i8*_i8*",
    "__invoke_%"class.std::__2::vector"*_%"class.std::__2::vector"*_i32",
    "__invoke_%"class.std::__2::basic_string"*_%"class.std::__2::basic_string"*_i8*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::collate"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::collate.1"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::ctype"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::ctype.19"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::codecvt.56"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::codecvt.58"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::codecvt.60"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::codecvt"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::numpunct"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::numpunct.20"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::num_get"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::num_get.15"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::num_put"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::num_put.25"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::moneypunct"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::moneypunct.35"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::moneypunct.36"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::moneypunct.37"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::money_get"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::money_get.45"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::money_put"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::money_put.49"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::time_get"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::time_get.32"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::time_put"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::time_put.34"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::messages"*",
    "__invoke_void_%"class.std::__2::locale::__imp"*_%"class.std::__2::messages.52"*",
    "__invoke_void_%"class.std::__2::vector"*_i32",
    "__invoke_%"class.std::__2::basic_string"*_%"class.std::__2::basic_string"*_%"class.std::__2::basic_string"*",
    "__invoke_%"class.std::__2::locale"*",
    "__invoke_void_%"class.std::__2::basic_string"*_%"class.std::__2::locale"*",
    "__invoke_i8*_i32_i8*",
    "__invoke_%"class.std::runtime_error"*_%"class.std::runtime_error"*_%"class.std::__2::basic_string"*",
    "__invoke_void_%struct.__locale_struct*",
    "__invoke_i16**",
    "__invoke_i32**",
    "__invoke_i32_i8*_i32**_i32_i32_%struct.__mbstate_t*",
    "__invoke_i32_i8*_i32_%struct.__mbstate_t*",
    "__invoke_i32_i32*_i8**_i32_i32_%struct.__mbstate_t*",
    "__invoke_i32_i32*_i8*_i32_%struct.__mbstate_t*",
    "__invoke_i32_i32*_i8*_i32_%struct.__locale_struct*",
    "__invoke_i32_%struct.__locale_struct*",
    "__invoke_i32_i32*_i8*_i32",
    "__invoke_i32",
    "__invoke_%"class.std::__2::basic_string.2"*_%"class.std::__2::basic_string.2"*_i32*",
    "__invoke_i32_i32*_i8**_i32_%struct.__mbstate_t*",
    "__invoke_%struct.__locale_struct*_%struct.__locale_struct*",
    "__invoke_void_i8*_i32_i32",
    "__invoke_%"class.std::__2::__compressed_pair.11"*_%"class.std::__2::__compressed_pair.11"*_i8**_%"struct.std::__2::__default_init_tag"*",
    "__invoke_void_%"class.std::__2::__sso_allocator"*_%"class.std::__2::locale::facet"**",
    "__invoke_void_%"class.std::__2::__sso_allocator"*_%"class.std::__2::locale::facet"**_i32",
    "__invoke_%"class.std::__2::__time_put"*_%"class.std::__2::__time_put"*",
    "__invoke_void_%"struct.std::__2::__split_buffer"*_i32",
    "__invoke_void_%"class.std::__2::vector"*_%"struct.std::__2::__split_buffer"*",
    "__invoke_i32_%"class.std::__2::basic_string"*_i32_i32_i8*_i32",
    "__invoke_%"class.std::__2::__compressed_pair.93"*_%"class.std::__2::__compressed_pair.93"*_i8**_void(i8*)**",
    "__invoke_%"class.std::__2::basic_string"*_%"class.std::__2::basic_string"*_i8*_i32",
    "__invoke_%"class.std::__2::basic_string.2"*_%"class.std::__2::basic_string.2"*_i32*_i32",
    "__invoke_i32_%struct.pthread_mutex_t*",
    "__invoke_i32_%struct.pthread_cond_t*",
    "__invoke_%"class.std::__2::__libcpp_refstring"*_%"class.std::__2::__libcpp_refstring"*_i8*",
    "__invoke_%"class.std::out_of_range"*_%"class.std::out_of_range"*_i8*",
    "__invoke_i8*_%"class.std::__2::allocator"*_i32",
    "__invoke_i32*_i32*_i32_i32",
    "__invoke_void_%"class.std::__2::basic_string"*_i8*_i32_i32",
    "__invoke_%"class.std::__2::__compressed_pair"*_%"class.std::__2::__compressed_pair"*_%"struct.std::__2::__default_init_tag"*_%"class.std::__2::allocator"*",
    "__invoke_void_%"class.std::__2::basic_string"*_%"class.std::__2::error_code"*_%"class.std::__2::basic_string"*",
    "__invoke_%"struct.__cxxabiv1::__cxa_eh_globals"*",
    "__invoke_void_i8*_...",
    "emscripten_resize_heap",
    "emscripten_memcpy_big",
    "fd_seek",
    "__invoke_%"class.std::__2::basic_streambuf"*_%"class.std::__2::num_put"*_%"class.std::__2::basic_streambuf"*_%"class.std::__2::ios_base"*_i8_i64",
    "__invoke_i64_i8*_i8*_i32*_i32"
  ],
  "externs": [
  ],
  "exports": [
    "__wasm_call_ctors",
    "main",
    "Initialize",
    "SetArgument",
    "free",
    "malloc",
    "testSetjmp",
    "saveSetjmp",
    "__errno_location",
    "fflush",
    "realloc",
    "htonl",
    "ntohs",
    "htons",
    "_get_tzname",
    "_get_daylight",
    "_get_timezone",
    "stackSave",
    "stackRestore",
    "stackAlloc",
    "setThrew",
    "dynCall_viijii",
    "dynCall_ji",
    "dynCall_viiiji",
    "dynCall_jiji",
    "dynCall_iiiiij",
    "dynCall_jiiii",
    "dynCall_iiiiijj",
    "dynCall_iiiiiijj"
  ],
  "namedGlobals": {
    "__data_end" : "737128"
  },
  "invokeFuncs": [
  ],
  "mainReadsParams": 1,
  "features": [
  ]
}

Traceback (most recent call last):
  File "/usr/share/emscripten/em++.py", line 14, in <module>
    sys.exit(emcc.run(sys.argv))
  File "/usr/share/emscripten/emcc.py", line 2183, in run
    emscripten.run(tmp_wasm, final_js, memfile)
  File "/usr/share/emscripten/emscripten.py", line 971, in run
    return temp_files.run_and_clean(lambda: emscript(
  File "/usr/share/emscripten/tools/tempfiles.py", line 105, in run_and_clean
    return func()
  File "/usr/share/emscripten/emscripten.py", line 971, in <lambda>
    return temp_files.run_and_clean(lambda: emscript(
  File "/usr/share/emscripten/emscripten.py", line 388, in emscript
    metadata = finalize_wasm(infile, memfile, DEBUG)
  File "/usr/share/emscripten/emscripten.py", line 573, in finalize_wasm
    return load_metadata_wasm(stdout, DEBUG)
  File "/usr/share/emscripten/emscripten.py", line 876, in load_metadata_wasm
    metadata_json = json.loads(metadata_raw)
  File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.8/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 21 column 17 (char 771)
ninja: build stopped: subcommand failed.


More information about the Pkg-javascript-devel mailing list