Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-105922

Can't compile examples with Emscripten 3.1.18

    XMLWordPrintable

Details

    • WebAssembly
    • b515fa56a3 (qt/qtbase/dev) b515fa56a3 (qt/tqtc-qtbase/dev) 78a0203ffa (qt/qtbase/6.4) 78a0203ffa (qt/tqtc-qtbase/6.4)

    Description

      Building any example using Qt 6.4 + Emscripten 3.1.18 fails with the following error:

      wasm-ld: warning: function signature mismatch: time
      >>> defined as (i32) -> i32 in /home/gagi/Qt/6.4.0/wasm_32/lib/libQt6Core.a(qlocaltime.cpp.o)
      >>> defined as (i32) -> i64 in /home/gagi/work/tools/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/libc-debug.a(emscripten_time.o)
      wasm-ld: warning: function signature mismatch: mktime
      >>> defined as (i32) -> i32 in /home/gagi/Qt/6.4.0/wasm_32/lib/libQt6Core.a(qglobal.cpp.o)
      >>> defined as (i32) -> i64 in /home/gagi/work/tools/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/libc-debug.a(emscripten_time.o)
      error: undefined symbol: _ZNKSt3__220__vector_base_commonILb1EE20__throw_length_errorEv (referenced by top-level compiled C/C++ code)
      warning: Link with `-sLLD_REPORT_UNDEFINED` to get more information on undefined symbols
      warning: To disable errors for undefined symbols use `-sERROR_ON_UNDEFINED_SYMBOLS=0`
      warning: __ZNKSt3__220__vector_base_commonILb1EE20__throw_length_errorEv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
      error: undefined symbol: _ZNKSt3__220__vector_base_commonILb1EE20__throw_out_of_rangeEv (referenced by top-level compiled C/C++ code)
      warning: __ZNKSt3__220__vector_base_commonILb1EE20__throw_out_of_rangeEv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
      error: undefined symbol: _ZNKSt3__221__basic_string_commonILb1EE20__throw_length_errorEv (referenced by top-level compiled C/C++ code)
      warning: __ZNKSt3__221__basic_string_commonILb1EE20__throw_length_errorEv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
      error: undefined symbol: _ZNKSt3__221__basic_string_commonILb1EE20__throw_out_of_rangeEv (referenced by top-level compiled C/C++ code)
      warning: __ZNKSt3__221__basic_string_commonILb1EE20__throw_out_of_rangeEv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
      Error: Aborting compilation due to previous errors
      em++: error: '/home/gagi/work/tools/emsdk/node/14.18.2_64bit/bin/node /home/gagi/work/tools/emsdk/upstream/emscripten/src/compiler.js /tmp/gagi/tmp0ozbsxtd.json' failed (returned 1)
      

      Going back to emscripten 3.1.10 everything works fine.

      It would be great to have a check for the correct emscripten version in CMake.

      Attachments

        For Gerrit Dashboard: QTBUG-105922
        # Subject Branch Project Status CR V

        Activity

          People

            lpotter Lorn Potter
            gagi Dominik Holland
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes