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. HelloWorld Wasm build problem

HelloWorld Wasm build problem

Scheduled Pinned Locked Moved Solved Qt for WebAssembly
8 Posts 3 Posters 1.4k 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.
  • A Offline
    A Offline
    Amin Ya
    wrote on 3 May 2020, 15:37 last edited by Amin Ya 5 Mar 2020, 15:39
    #1

    I am trying to build a super simple project on Windows, but I get errors. I tried everything, but the error seems so vague.

    10:34:00: Running steps for project hello...
    10:34:00: Starting: "C:\Qt\5.15.0\wasm_32\bin\qmake.exe" C:\hello\hello.pro -spec wasm-emscripten "CONFIG+=debug" "CONFIG+=qml_debug"
    Info: creating stash file C:\hello\build-hello-Qt_5_15_0_WebAssembly-Debug\.qmake.stash
    10:34:02: The process "C:\Qt\5.15.0\wasm_32\bin\qmake.exe" exited normally.
    10:34:02: Starting: "C:\ProgramData\chocolatey\bin\mingw32-make.exe" -f C:/hello/build-hello-Qt_5_15_0_WebAssembly-Debug/Makefile qmake_all
    mingw32-make: Nothing to be done for 'qmake_all'.
    10:34:02: The process "C:\ProgramData\chocolatey\bin\mingw32-make.exe" exited normally.
    10:34:02: Starting: "C:\ProgramData\chocolatey\bin\mingw32-make.exe" -j8
    em++ -c -g -std=gnu++11 -s ALLOW_MEMORY_GROWTH=1 -Wall -Wextra -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I..\hello -I. -IC:\Qt\5.15.0\wasm_32\include -IC:\Qt\5.15.0\wasm_32\include\QtQuick -IC:\Qt\5.15.0\wasm_32\include\QtGui -IC:\Qt\5.15.0\wasm_32\include\QtQmlModels -IC:\Qt\5.15.0\wasm_32\include\QtQml -IC:\Qt\5.15.0\wasm_32\include\QtNetwork -IC:\Qt\5.15.0\wasm_32\include\QtCore -I. -I/.emscripten_ports/openssl/include -IC:\Qt\5.15.0\wasm_32\mkspecs\wasm-emscripten -o main.obj ..\hello\main.cpp
    em++ -c -g -std=gnu++11 -s ALLOW_MEMORY_GROWTH=1 -Wall -Wextra -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I..\hello -I. -IC:\Qt\5.15.0\wasm_32\include -IC:\Qt\5.15.0\wasm_32\include\QtQuick -IC:\Qt\5.15.0\wasm_32\include\QtGui -IC:\Qt\5.15.0\wasm_32\include\QtQmlModels -IC:\Qt\5.15.0\wasm_32\include\QtQml -IC:\Qt\5.15.0\wasm_32\include\QtNetwork -IC:\Qt\5.15.0\wasm_32\include\QtCore -I. -I/.emscripten_ports/openssl/include -IC:\Qt\5.15.0\wasm_32\mkspecs\wasm-emscripten -o hello.js_plugin_import.obj C:/hello/build-hello-Qt_5_15_0_WebAssembly-Debug/hello.js_plugin_import.cpp
    em++ -c -g -std=gnu++11 -s ALLOW_MEMORY_GROWTH=1 -Wall -Wextra -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I..\hello -I. -IC:\Qt\5.15.0\wasm_32\include -IC:\Qt\5.15.0\wasm_32\include\QtQuick -IC:\Qt\5.15.0\wasm_32\include\QtGui -IC:\Qt\5.15.0\wasm_32\include\QtQmlModels -IC:\Qt\5.15.0\wasm_32\include\QtQml -IC:\Qt\5.15.0\wasm_32\include\QtNetwork -IC:\Qt\5.15.0\wasm_32\include\QtCore -I. -I/.emscripten_ports/openssl/include -IC:\Qt\5.15.0\wasm_32\mkspecs\wasm-emscripten -o hello.js_qml_plugin_import.obj C:/hello/build-hello-Qt_5_15_0_WebAssembly-Debug/hello.js_qml_plugin_import.cpp
    C:\Qt\5.15.0\wasm_32\bin\rcc.exe -name qml ..\hello\qml.qrc -o qrc_qml.cpp
    C:\Qt\5.15.0\wasm_32\bin\qmake.exe -install sed -e s/@APPNAME@/hello/g C:/Qt/5.15.0/wasm_32/plugins/platforms/wasm_shell.html > C:/hello/build-hello-Qt_5_15_0_WebAssembly-Debug/hello.html
    copy /y C:\Qt\5.15.0\wasm_32\plugins\platforms\qtloader.js C:\hello\build-hello-Qt_5_15_0_WebAssembly-Debug
    copy /y C:\Qt\5.15.0\wasm_32\plugins\platforms\qtlogo.svg C:\hello\build-hello-Qt_5_15_0_WebAssembly-Debug
    The syntax of the command is incorrect.
    mingw32-make: *** [Makefile:420: appjs] Error 1
    mingw32-make: *** Waiting for unfinished jobs....
    The syntax of the command is incorrect.
    mingw32-make: *** [Makefile:423: appsvg] Error 1
    10:34:09: The process "C:\ProgramData\chocolatey\bin\mingw32-make.exe" exited with code 2.
    Error while building/deploying project hello (kit: Qt 5.15.0 WebAssembly)
    When executing step "Make"
    10:34:09: Elapsed time: 00:09.
    

    The code is just a Qt Quick application empty template

    import QtQuick 2.15
    import QtQuick.Window 2.15
    
    Window {
        visible: true
        width: 640
        height: 480
        title: qsTr("Hello World")
    }
    

    This is how I installed emsdk

    git clone https://github.com/emscripten-core/emsdk.git
    cd emsdk
    git pull
    ./emsdk update-tags
    ./emsdk install sdk-fastcomp-1.39.7-64bit
    ./emsdk activate sdk-fastcomp-1.39.7-64bit --global
     ./emsdk_env.bat
    
    # manually add ENVs 
    $Env:EMSDK_NODE="C:\emsdk\node\12.9.1_64bit\bin\node.exe"
    $Env:JAVA_HOME="C:\emsdk\java\8.152_64bit"
    $Env:EMSDK_PYTHON="C:\Python38"
    $Env:PATH+=";C:\emsdk;C:\emsdk\node\12.9.1_64bit\bin;C:\emsdk\java\8.152_64bit\bin;C:\emsdk\fastcomp\emscripten;"
    

    These are my configurations:
    2020-05-03 10_33_13-Qt Creator.jpg
    2020-05-03 10_33_27-Options - Qt Creator.jpg
    2020-05-03 10_33_36-Options - Qt Creator.jpg

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Amin Ya
      wrote on 5 May 2020, 10:07 last edited by Amin Ya 5 May 2020, 10:09
      #7

      I solved the problem, and the error is gone now. I had named one of my folders in the path C++ which caused all of these issues.

      This was mentioned by one of the people in the Slack group:

      The following error message (and the fact that you get two of them) suggests a problem with the copy command, For example, spaces in the paths which are not properly escaped or quoted.

      The syntax of the command is incorrect.
      
      R 1 Reply Last reply 29 Aug 2020, 08:44
      0
      • L Offline
        L Offline
        lorn.potter
        wrote on 4 May 2020, 19:23 last edited by
        #2

        5.15 binaries do not use fastcomp version.
        I usually do
        emsdk install 1.39.8

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

        A 1 Reply Last reply 5 May 2020, 03:05
        2
        • L lorn.potter
          4 May 2020, 19:23

          5.15 binaries do not use fastcomp version.
          I usually do
          emsdk install 1.39.8

          A Offline
          A Offline
          Amin Ya
          wrote on 5 May 2020, 03:05 last edited by
          #3

          @lorn-potter

          I tried the version you said, but it doesn't work. I get the same error:

          22:01:26: Running steps for project hello...
          22:01:26: Configuration unchanged, skipping qmake step.
          22:01:26: Starting: "C:\ProgramData\chocolatey\bin\mingw32-make.exe" -j8
          em++ -c -g -std=gnu++11 -s ALLOW_MEMORY_GROWTH=1 -Wall -Wextra -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I..\hello -I. -IC:\Qt\5.15.0\wasm_32\include -IC:\Qt\5.15.0\wasm_32\include\QtQuick -IC:\Qt\5.15.0\wasm_32\include\QtGui -IC:\Qt\5.15.0\wasm_32\include\QtQmlModels -IC:\Qt\5.15.0\wasm_32\include\QtQml -IC:\Qt\5.15.0\wasm_32\include\QtNetwork -IC:\Qt\5.15.0\wasm_32\include\QtCore -I. -I/.emscripten_ports/openssl/include -IC:\Qt\5.15.0\wasm_32\mkspecs\wasm-emscripten -o qrc_qml.obj qrc_qml.cpp
          C:\Qt\5.15.0\wasm_32\bin\qmake.exe -install sed -e s/@APPNAME@/hello/g C:/Qt/5.15.0/wasm_32/plugins/platforms/wasm_shell.html > C:/hello/build-hello-Qt_5_15_0_WebAssembly-Debug/hello.html
          copy /y C:\Qt\5.15.0\wasm_32\plugins\platforms\qtloader.js C:\hello\build-hello-Qt_5_15_0_WebAssembly-Debug
          copy /y C:\Qt\5.15.0\wasm_32\plugins\platforms\qtlogo.svg C:\hello\build-hello-Qt_5_15_0_WebAssembly-Debug
          The syntax of the command is incorrect.
          mingw32-make: *** [Makefile:420: appjs] Error 1
          mingw32-make: *** Waiting for unfinished jobs....
          The syntax of the command is incorrect.
          mingw32-make: *** [Makefile:423: appsvg] Error 1
          22:01:31: The process "C:\ProgramData\chocolatey\bin\mingw32-make.exe" exited with code 2.
          Error while building/deploying project hello (kit: Qt 5.15.0 WebAssembly)
          When executing step "Make"
          22:01:31: Elapsed time: 00:05.
          

          I wish the Qt installer had an option for installing a working version of the compiler.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Amin Ya
            wrote on 5 May 2020, 04:05 last edited by Amin Ya 5 May 2020, 04:05
            #4

            Trying on Qt 14.2, the errors are worse (using the same emsdk):

            In file included from C:\Qt\5.14.2\wasm_32\include\QtCore/qjsonobject.h:43:
            C:\Qt\5.14.2\wasm_32\include\QtCore/qjsonvalue.h:186:20: warning: definition of implicit copy constructor for 'QJsonValueRef' is deprecated because it has a user-declared copy assignment operator [-Wdeprecated-copy]
                QJsonValueRef &operator = (const QJsonValueRef &val);
                               ^
            C:\Qt\5.14.2\wasm_32\include\QtCore/qjsonobject.h:150:53: note: in implicit copy constructor for 'QJsonValueRef' first required here
                    inline QJsonValueRef value() const { return QJsonValueRef(o, i); }
                                                                ^
            3 warnings generated.
            3 warnings generated.
            2 warnings generated.
            23:03:10: The process "C:\ProgramData\chocolatey\bin\mingw32-make.exe" exited with code 2.
            Error while building/deploying project demo2 (kit: Qt 5.14.2 WebAssembly)
            When executing step "Make"
            23:03:10: Elapsed time: 00:09.
            
            1 Reply Last reply
            0
            • L Offline
              L Offline
              lorn.potter
              wrote on 5 May 2020, 05:09 last edited by
              #5

              Do you have sed installed?

              https://wiki.qt.io/Qt_for_WebAssembly

              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
              1
              • L Offline
                L Offline
                lorn.potter
                wrote on 5 May 2020, 07:02 last edited by
                #6

                What version of mingw32 are you using? You can use the mingw32 that is in the Qt directory.

                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
                • A Offline
                  A Offline
                  Amin Ya
                  wrote on 5 May 2020, 10:07 last edited by Amin Ya 5 May 2020, 10:09
                  #7

                  I solved the problem, and the error is gone now. I had named one of my folders in the path C++ which caused all of these issues.

                  This was mentioned by one of the people in the Slack group:

                  The following error message (and the fact that you get two of them) suggests a problem with the copy command, For example, spaces in the paths which are not properly escaped or quoted.

                  The syntax of the command is incorrect.
                  
                  R 1 Reply Last reply 29 Aug 2020, 08:44
                  0
                  • A Amin Ya
                    5 May 2020, 10:07

                    I solved the problem, and the error is gone now. I had named one of my folders in the path C++ which caused all of these issues.

                    This was mentioned by one of the people in the Slack group:

                    The following error message (and the fact that you get two of them) suggests a problem with the copy command, For example, spaces in the paths which are not properly escaped or quoted.

                    The syntax of the command is incorrect.
                    
                    R Offline
                    R Offline
                    ronaldo
                    wrote on 29 Aug 2020, 08:44 last edited by
                    #8

                    @Amin-Ya Would you please specify what exactly you are referring to when you are saying the C++ path? I seem to be having the same problem here.

                    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