Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for WebAssembly
  4. Compiling QT on ubuntu/ARM for WASM

Compiling QT on ubuntu/ARM for WASM

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
4 Posts 4 Posters 728 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.
  • D Offline
    D Offline
    dreamlax
    wrote on last edited by
    #1

    I am trying to compile QT for Webassembly. I cloned the QT source code from code.qt.io/qt/qt5.git and checked out version 5.15. I am using emcc/em++ version 2.0.13 with clang version 13.0.0.

    In build directory I ran configure as follows:

    ../qt5/configure -opensource -confirm-license -xplatform wasm-emscripten -feature-thread -nomake examples -no-dbus -no-ssl -prefix $PWD/../qt5_wasm_binaries

    followed by make.
    There are two issues: One, I see a lot of files being compiled with gcc instead of emcc. Second the build fails with the error:

    make[3]: *** No rule to make target 'qt5widgets_metatypes.json', needed by '../../lib/libQt5Widgets.a'.

    I feel I am missing some steps. Would be great to get some help on this.

    Thanks

    raven-worxR 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      By default when you clone the Qt repo, it's on the dev branch that means it's for Qt 6. Did you explicitly checkout Qt 5.15 ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • D dreamlax

        I am trying to compile QT for Webassembly. I cloned the QT source code from code.qt.io/qt/qt5.git and checked out version 5.15. I am using emcc/em++ version 2.0.13 with clang version 13.0.0.

        In build directory I ran configure as follows:

        ../qt5/configure -opensource -confirm-license -xplatform wasm-emscripten -feature-thread -nomake examples -no-dbus -no-ssl -prefix $PWD/../qt5_wasm_binaries

        followed by make.
        There are two issues: One, I see a lot of files being compiled with gcc instead of emcc. Second the build fails with the error:

        make[3]: *** No rule to make target 'qt5widgets_metatypes.json', needed by '../../lib/libQt5Widgets.a'.

        I feel I am missing some steps. Would be great to get some help on this.

        Thanks

        raven-worxR Offline
        raven-worxR Offline
        raven-worx
        Moderators
        wrote on last edited by
        #3

        @dreamlax said in Compiling QT on ubuntu/ARM for WASM:

        One, I see a lot of files being compiled with gcc instead of emcc.

        this is ok, since the host binaries (moc, rcc, etc.) are compiled with gcc.

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        1
        • lorn.potterL Offline
          lorn.potterL Offline
          lorn.potter
          wrote on last edited by
          #4

          Emscripten does not run on native arm on any OS. On Mac M1, it requires the Rosetta 2 emulation to work.

          "emsdk only officially supports x86_64 today."
          https://github.com/emscripten-core/emsdk/issues/671

          Freelance Software Engineer, Platform Maintainer QtWebAssembly, Maintainer QtSensors
          Author, Hands-On Mobile and Embedded Development with Qt 5 http://bit.ly/HandsOnMobileEmbedded

          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