Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. web assembly error
Qt 6.11 is out! See what's new in the release blog

web assembly error

Scheduled Pinned Locked Moved Solved QML and Qt Quick
6 Posts 2 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    maxwell31
    wrote on last edited by
    #1

    Hi,
    I tried to use webassembly for a small project. In my project source dir I run

    ~/work/TestWeb$ ~/Qt/5.13.0/wasm_32/bin/qmake
    Info: creating stash file /home/maxwell/work/TestWeb/.qmake.stash
    ~/work/TestWeb$ make
    

    and then get the error

    Exception in thread Thread-3:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
        self.run()
      File "/usr/lib/python2.7/threading.py", line 754, in run
        self.__target(*self.__args, **self.__kwargs)
      File "/usr/lib/python2.7/multiprocessing/pool.py", line 392, in _handle_results
        task = get()
    TypeError: __init__() takes at least 3 arguments (1 given)
    

    How can I make this work?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      maxwell31
      wrote on last edited by
      #2

      I should note that I don't think this is specific to my project. Basically I am trying to compile the QtQuick Empty Application template with the wasm toolkit which is shipped together with the Qt513 Preview

      1 Reply Last reply
      0
      • M Offline
        M Offline
        maxwell31
        wrote on last edited by
        #3

        The Ubuntu emscripten package seems to be to old. Installing emscripten from https://github.com/emscripten-core/emsdk seems to fix the above error. Now it starts compiling and crashs with the following error

        in   ret double 0x7FF4000000000000 in _ZL7qt_snanv() 
        emcc: warning: cannot represent a NaN literal '0x26f2c060' with custom bit pattern in NaN-canonicalizing JS engines (e.g. Firefox and Safari) without erasing bits!
        in   ret double 0x7FF4000000000000 in _ZL7qt_snanv.38141() 
        error: undefined symbol: _ZN10QArrayData10deallocateEPS_jj
        warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0`
        error: undefined symbol: _ZN11Preparation7changedEv
        error: undefined symbol: _ZN9SuitEntry15selectedChangedEv
        error: undefined symbol: _ZNSt3__14stoiERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPji
        error: undefined symbol: _ZNSt3__16localeC1Ev
        error: undefined symbol: _ZNSt3__16localeD1Ev
        error: undefined symbol: _ZNSt3__18ios_base4initEPv
        error: undefined symbol: _ZNSt3__18ios_base5clearEj
        error: undefined symbol: _ZNSt3__18ios_baseD2Ev
        error: undefined symbol: _Znwj
        error: undefined symbol: __atomic_fetch_add_4
        error: undefined symbol: __atomic_fetch_sub_4
        error: undefined symbol: __atomic_load_4
        error: undefined symbol: __atomic_store_4
        error: undefined symbol: _ZTINSt3__18ios_baseE
        error: undefined symbol: _ZTV10GuiHandler
        error: undefined symbol: _ZTV11Preparation
        error: undefined symbol: _ZTV16ProtocolQuestion
        error: undefined symbol: _ZTV9SuitEntry
        Error: Aborting compilation due to previous errors
        shared:ERROR: '/home/maxwell/tools/emsdk/node/8.9.1_64bit/bin/node /home/maxwell/tools/emsdk/emscripten/1.38.30/src/compiler.js /tmp/tmpK_IO2U.txt /home/maxwell/tools/emsdk/emscripten/1.38.30/src/embind/emval.js /home/maxwell/tools/emsdk/emscripten/1.38.30/src/embind/embind.js /home/maxwell/tools/emsdk/emscripten/1.38.30/src/library_pthread_stub.js' failed (1)
        Makefile:213: recipe for target 'TestWeb.js' failed
        
        1 Reply Last reply
        0
        • M Offline
          M Offline
          maxwell31
          wrote on last edited by maxwell31
          #4

          Ok, the problem seems to be that I did not set the HEADERS field in the .pro file (I am usually using cmake instead). Now it compiles

          1 Reply Last reply
          0
          • I Offline
            I Offline
            Izza
            wrote on last edited by
            #5

            Hi , i am having the same error can you please help me hpow did you update your .pro file to resolve this.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              maxwell31
              wrote on last edited by
              #6

              I simply forgot to add the following entry into the .pro file, so my header files which have macros like Q_OBJECT were not processed:

              HEADERS = guihandler.h question.h entry.h
              
              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved