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. Qt WebAssembly compiler error
Forum Updated to NodeBB v4.3 + New Features

Qt WebAssembly compiler error

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
7 Posts 4 Posters 2.9k 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.
  • Noob pilotN Offline
    Noob pilotN Offline
    Noob pilot
    wrote on last edited by Noob pilot
    #1

    Hello,
    I am trying to install Qt for WebAssembly for Linux system (Manjaro Qt 5.15.2) and i have installed Emscripten without any problem, my problem is with setting the compiler in QtCreator and I'm still new in Qt and Linux,
    Steps completed
    1- git clone https://github.com/emscripten-core/emsdk.git
    2- cd emsdk
    3- ./emsdk install 1.39.8
    4- ./emsdk activate 1.39.8
    5- source ./emsdk_env.sh
    6- add ".source ~/emsdk/emsdk_env.sh" to .bashrc
    7- emcc --version
    emcc (Emscripten gcc/clang-like replacement) 1.39.8 (commit aa5fedfe291d05ceb4753be8af2acf0478a4a9d6)
    Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
    This is free and open source software under the MIT license.
    There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    8- Open QtCreator 4.13.3
    9- Help -> About Plugins -> Device Support -> enable WebAssembly
    10- Found another article here about setting Qt for WebAssembly
    11- Downloading "qt-unified-linux-x64-3.2.1-2-online"
    12- installing WebAssembly
    10.png
    13- Open Qt creator (the one installed from the online installer not from the package manger)
    14- Repeat step 8.
    --Tools -> Kits
    1.png

    2.png

    --Qt Versions
    3.png
    4.png
    5.png
    6.png

    --Compilers
    --- No Emscripten compiler
    --- Clicking Re-Detect giving me [This toolchain is invalid] Error
    7.png

    [Edit]
    Going back to this article again i have tried compiling from terminal and I'm getting this error
    13.png

    jsulmJ 1 Reply Last reply
    0
    • Noob pilotN Noob pilot

      Hello,
      I am trying to install Qt for WebAssembly for Linux system (Manjaro Qt 5.15.2) and i have installed Emscripten without any problem, my problem is with setting the compiler in QtCreator and I'm still new in Qt and Linux,
      Steps completed
      1- git clone https://github.com/emscripten-core/emsdk.git
      2- cd emsdk
      3- ./emsdk install 1.39.8
      4- ./emsdk activate 1.39.8
      5- source ./emsdk_env.sh
      6- add ".source ~/emsdk/emsdk_env.sh" to .bashrc
      7- emcc --version
      emcc (Emscripten gcc/clang-like replacement) 1.39.8 (commit aa5fedfe291d05ceb4753be8af2acf0478a4a9d6)
      Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
      This is free and open source software under the MIT license.
      There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
      8- Open QtCreator 4.13.3
      9- Help -> About Plugins -> Device Support -> enable WebAssembly
      10- Found another article here about setting Qt for WebAssembly
      11- Downloading "qt-unified-linux-x64-3.2.1-2-online"
      12- installing WebAssembly
      10.png
      13- Open Qt creator (the one installed from the online installer not from the package manger)
      14- Repeat step 8.
      --Tools -> Kits
      1.png

      2.png

      --Qt Versions
      3.png
      4.png
      5.png
      6.png

      --Compilers
      --- No Emscripten compiler
      --- Clicking Re-Detect giving me [This toolchain is invalid] Error
      7.png

      [Edit]
      Going back to this article again i have tried compiling from terminal and I'm getting this error
      13.png

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Noob-pilot You do not have valid Emscripten compiler configuration. Add one manually with path to the compiler and set this compiler in your Kit.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • Noob pilotN Offline
        Noob pilotN Offline
        Noob pilot
        wrote on last edited by
        #3

        @jsulm Hi, thank you for replying, i did add the path manually image below
        1.png
        -emsdk/upstream/bin/clang++ for C++
        -emsdk/upstream/bin/clang for C
        Also tried (emsdk/upstream/emscripten/emcc for C and emsdk/upstream/emscripten/em++ for C++) too
        2.png
        but I'm getting [ABI Detection failed]
        3.png
        4.png
        I created a new QML project (Stack project) and this is the result i get when running the prject

        5.png

        And this is the compile output

        /bin/ld: /home/noob-pilot/Qt/5.15.2/wasm_32/plugins/platforms/libqwasm.a: error adding symbols: file format not recognized
        clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
        make: *** [Makefile:208: asw] Error 1
        10:48:25: The process "/bin/make" exited with code 2.
        Error while building/deploying project asw (kit: Qt 5.15.2 WebAssembly)
        When executing step "Make"

        jsulmJ 1 Reply Last reply
        0
        • Noob pilotN Noob pilot

          @jsulm Hi, thank you for replying, i did add the path manually image below
          1.png
          -emsdk/upstream/bin/clang++ for C++
          -emsdk/upstream/bin/clang for C
          Also tried (emsdk/upstream/emscripten/emcc for C and emsdk/upstream/emscripten/em++ for C++) too
          2.png
          but I'm getting [ABI Detection failed]
          3.png
          4.png
          I created a new QML project (Stack project) and this is the result i get when running the prject

          5.png

          And this is the compile output

          /bin/ld: /home/noob-pilot/Qt/5.15.2/wasm_32/plugins/platforms/libqwasm.a: error adding symbols: file format not recognized
          clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
          make: *** [Makefile:208: asw] Error 1
          10:48:25: The process "/bin/make" exited with code 2.
          Error while building/deploying project asw (kit: Qt 5.15.2 WebAssembly)
          When executing step "Make"

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Noob-pilot Do a complete rebuild: delete build folder, run qmake and build

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          Noob pilotN 1 Reply Last reply
          1
          • jsulmJ jsulm

            @Noob-pilot Do a complete rebuild: delete build folder, run qmake and build

            Noob pilotN Offline
            Noob pilotN Offline
            Noob pilot
            wrote on last edited by
            #5

            @jsulm here is what i did now

            • Right click on the project and clean
            • Rebuild
            • Remove the build folder
            • run qmake
              10.png

            --getting this general message

            Compiler feature detection failure!
            The command "/home/noob-pilot/emsdk/upstream/bin/clang -dumpmachine" could not be started.

            Compiler feature detection failure!
            The command "/home/noob-pilot/emsdk/upstream/bin/clang -print-search-dirs" could not be started.

            Compiler feature detection failure!
            The command "/home/noob-pilot/emsdk/upstream/bin/clang++ -dumpmachine" could not be started.

            Compiler feature detection failure!
            The command "/home/noob-pilot/emsdk/upstream/bin/clang++ -print-search-dirs" could not be started.

            Compiler feature detection failure!
            The command "/home/noob-pilot/emsdk/upstream/bin/clang -dumpmachine" could not be started.

            Compiler feature detection failure!
            The command "/home/noob-pilot/emsdk/upstream/bin/clang -print-search-dirs" could not be started.

            Compiler feature detection failure!
            The command "/home/noob-pilot/emsdk/upstream/bin/clang++ -dumpmachine" could not be started.

            Compiler feature detection failure!
            The command "/home/noob-pilot/emsdk/upstream/bin/clang++ -print-search-dirs" could not be started.

            *run the project
            getting this error again (without the warrnings this time)
            11.png

            F 1 Reply Last reply
            0
            • Noob pilotN Noob pilot

              @jsulm here is what i did now

              • Right click on the project and clean
              • Rebuild
              • Remove the build folder
              • run qmake
                10.png

              --getting this general message

              Compiler feature detection failure!
              The command "/home/noob-pilot/emsdk/upstream/bin/clang -dumpmachine" could not be started.

              Compiler feature detection failure!
              The command "/home/noob-pilot/emsdk/upstream/bin/clang -print-search-dirs" could not be started.

              Compiler feature detection failure!
              The command "/home/noob-pilot/emsdk/upstream/bin/clang++ -dumpmachine" could not be started.

              Compiler feature detection failure!
              The command "/home/noob-pilot/emsdk/upstream/bin/clang++ -print-search-dirs" could not be started.

              Compiler feature detection failure!
              The command "/home/noob-pilot/emsdk/upstream/bin/clang -dumpmachine" could not be started.

              Compiler feature detection failure!
              The command "/home/noob-pilot/emsdk/upstream/bin/clang -print-search-dirs" could not be started.

              Compiler feature detection failure!
              The command "/home/noob-pilot/emsdk/upstream/bin/clang++ -dumpmachine" could not be started.

              Compiler feature detection failure!
              The command "/home/noob-pilot/emsdk/upstream/bin/clang++ -print-search-dirs" could not be started.

              *run the project
              getting this error again (without the warrnings this time)
              11.png

              F Offline
              F Offline
              FabienGk
              wrote on last edited by
              #6

              @Noob-pilot Hello,

              I know it is quite old, but I have the same issue.
              Did you solve it eventually?

              Thank you

              1 Reply Last reply
              0
              • D Offline
                D Offline
                DavidRp
                wrote on last edited by
                #7

                I also know this is quite old, but the correct QT docs are hard to find when you approach it from the error first -> search later stance.
                TL;DR You need to add your emsdk path to Options >> Devices >> Webassembly tab, before trying to configure any kind of Kit for Webassembly. This here describes it with pictures to guide you along:
                https://doc-snapshots.qt.io/qtcreator-master/creator-setup-webassembly.html

                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