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. System cannot find specified file when building Web Assembly project in Qt

System cannot find specified file when building Web Assembly project in Qt

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
11 Posts 3 Posters 553 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.
  • L Offline
    L Offline
    Ledge
    wrote on 24 Jan 2025, 01:05 last edited by
    #1

    I'd like to use my QT application on the web but I'm running into this error when building it. Both the qtloader.js and WebAssembly_Qt_6_8_1_single_threaded-Debug folder are located in my system and match the path specified in the error message below, so I'm not sure why the error message says these files can't be found. What could be the issue here and how could it be fixed?


    Windows 11

    QT Web Assembly 6.8.1

    emsdk 4.0.1


    Error:
    
    process_begin: CreateProcess(NULL, cp -f /C/Qt/6.8.1/wasm_singlethread/plugins/platforms/qtloader.js /C/EFMM/a8-edu-app-atlantic-spigot-main/EscapeFromMorseMansion/build/WebAssembly_Qt_6_8_1_single_threaded-Debug, ...) failed.
    
    make (e=2): The system cannot find the file specified.
    
    mingw32-make: *** [Makefile:1085: appjs] Error 2
    
    mingw32-make: *** Waiting for unfinished jobs....
    
    13:22:28: The process "C:\Qt\Tools\mingw1310_64\bin\mingw32-make.exe" exited with code 2.
    13:22:28: Error while building/deploying project EscapeFromMorseMansion (kit: WebAssembly Qt 6.8.1 (single-threaded))
    13:22:28: When executing step "Make"
    
    ---
    Full Compile Output:
    
    13:22:28: Running steps for project EscapeFromMorseMansion...
    13:22:28: Configuration unchanged, skipping qmake step.
    13:22:28: Starting: "C:\Qt\Tools\mingw1310_64\bin\mingw32-make.exe" -j16
    sed -e s/@APPNAME@/EscapeFromMorseMansion/g -e s/@APPEXPORTNAME@/EscapeFromMorseMansion_entry/g -e s/@PRELOAD@//g C:/Qt/6.8.1/wasm_singlethread/plugins/platforms/wasm_shell.html > C:/EFMM/a8-edu-app-atlantic-spigot-main/EscapeFromMorseMansion/build/WebAssembly_Qt_6_8_1_single_threaded-Debug/EscapeFromMorseMansion.html
    cp -f /C/Qt/6.8.1/wasm_singlethread/plugins/platforms/qtloader.js /C/EFMM/a8-edu-app-atlantic-spigot-main/EscapeFromMorseMansion/build/WebAssembly_Qt_6_8_1_single_threaded-Debug
    process_begin: CreateProcess(NULL, cp -f /C/Qt/6.8.1/wasm_singlethread/plugins/platforms/qtloader.js /C/EFMM/a8-edu-app-atlantic-spigot-main/EscapeFromMorseMansion/build/WebAssembly_Qt_6_8_1_single_threaded-Debug, ...) failed.
    make (e=2): The system cannot find the file specified.
    mingw32-make: *** [Makefile:1085: appjs] Error 2
    mingw32-make: *** Waiting for unfinished jobs....
    13:22:28: The process "C:\Qt\Tools\mingw1310_64\bin\mingw32-make.exe" exited with code 2.
    13:22:28: Error while building/deploying project EscapeFromMorseMansion (kit: WebAssembly Qt 6.8.1 (single-threaded))
    13:22:28: When executing step "Make"
    13:22:28: Elapsed time: 00:00.
    
    1 Reply Last reply
    0
    • G Offline
      G Offline
      Gilboonet
      wrote on 24 Jan 2025, 07:29 last edited by
      #2

      Hello, the doc here states that Qt 6.8 needs emsdk 3.1.56, or is it by purpose that you use 4.0.1 ?

      L 1 Reply Last reply 24 Jan 2025, 17:30
      1
      • G Gilboonet
        24 Jan 2025, 07:29

        Hello, the doc here states that Qt 6.8 needs emsdk 3.1.56, or is it by purpose that you use 4.0.1 ?

        L Offline
        L Offline
        Ledge
        wrote on 24 Jan 2025, 17:30 last edited by Ledge
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • G Offline
          G Offline
          Gilboonet
          wrote on 24 Jan 2025, 17:56 last edited by
          #4

          @Ledge to compile to Wasm I never needed to reconfigure Qt Creator by building it from source which is a heavy process. Why are you using Ming32 ? Maybe should you use MingW64 ?

          L 2 Replies Last reply 24 Jan 2025, 18:45
          0
          • G Gilboonet
            24 Jan 2025, 17:56

            @Ledge to compile to Wasm I never needed to reconfigure Qt Creator by building it from source which is a heavy process. Why are you using Ming32 ? Maybe should you use MingW64 ?

            L Offline
            L Offline
            Ledge
            wrote on 24 Jan 2025, 18:45 last edited by
            #5

            @Gilboonet I'm not sure. Is this a a step in building wasm that I missed?

            1 Reply Last reply
            0
            • G Gilboonet
              24 Jan 2025, 17:56

              @Ledge to compile to Wasm I never needed to reconfigure Qt Creator by building it from source which is a heavy process. Why are you using Ming32 ? Maybe should you use MingW64 ?

              L Offline
              L Offline
              Ledge
              wrote on 24 Jan 2025, 19:02 last edited by
              #6

              @Gilboonet MingW64 is set when running the app on desktop, however, it appears it defaulted to mingw32 for my wasm build, as shown in the set location for make under "Build Steps" in the Projects panel:

              Make: mingw32-make.exe -j16 in C:\EFMM\a8-edu-app-atlantic-spigot-main\EscapeFromMorseMansion\build\WebAssembly_Qt_6_8_1_single_threaded-Debug

              G 1 Reply Last reply 24 Jan 2025, 19:11
              0
              • L Ledge
                24 Jan 2025, 19:02

                @Gilboonet MingW64 is set when running the app on desktop, however, it appears it defaulted to mingw32 for my wasm build, as shown in the set location for make under "Build Steps" in the Projects panel:

                Make: mingw32-make.exe -j16 in C:\EFMM\a8-edu-app-atlantic-spigot-main\EscapeFromMorseMansion\build\WebAssembly_Qt_6_8_1_single_threaded-Debug

                G Offline
                G Offline
                Gilboonet
                wrote on 24 Jan 2025, 19:11 last edited by
                #7

                @Ledge You can take a look at your kit configuration and see if it is as the doc states. There are those notes :

                On Windows, make sure you have Mingw-w64 in your PATH and configure with the following:
                
                configure -qt-host-path C:\Path\to\Qt -no-warnings-are-errors -platform wasm-emscripten -prefix %CD%\qtbase
                
                Note: When using vanilla CMake (as opposed to qt-cmake on Linux or qt-cmake.bat on Windows) remember to specify a toolchain file with "-DCMAKE_TOOLCHAIN_FILE", as for any other cross-platform build. For details see here: Getting started with CMake.
                
                L 1 Reply Last reply 24 Jan 2025, 22:26
                0
                • G Gilboonet
                  24 Jan 2025, 19:11

                  @Ledge You can take a look at your kit configuration and see if it is as the doc states. There are those notes :

                  On Windows, make sure you have Mingw-w64 in your PATH and configure with the following:
                  
                  configure -qt-host-path C:\Path\to\Qt -no-warnings-are-errors -platform wasm-emscripten -prefix %CD%\qtbase
                  
                  Note: When using vanilla CMake (as opposed to qt-cmake on Linux or qt-cmake.bat on Windows) remember to specify a toolchain file with "-DCMAKE_TOOLCHAIN_FILE", as for any other cross-platform build. For details see here: Getting started with CMake.
                  
                  L Offline
                  L Offline
                  Ledge
                  wrote on 24 Jan 2025, 22:26 last edited by Ledge
                  #8

                  @Gilboonet I followed those steps you mentioned, requiring me to build the app on the command line and scrap what I was doing in the GUI. Now this command below to build from the command line has led to me to this error, which makes me believe I need to build from source since my qt maintenance tool already says I have multimedia downloaded. Any idea of how to resolve this error or am I following the wrong path? Do I need to change variable values to set QT6 to be found? Thank you for your time.

                  Command:

                  /c/Qt/6.8.1/wasm_singlethread/bin/qt-cmake.bat . -DQT_CHAINLOAD_TOOLCHAIN_FILE= /c/Qt/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake

                  Error:

                  CMake Error at CMakeLists.txt:212 (find_package):
                  Found package configuration file:

                  C:/Qt/6.8.1/wasm_singlethread/lib/cmake/Qt6/Qt6Config.cmake
                  

                  but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
                  FOUND. Reason given by package:

                  Failed to find required Qt component "Multimedia".

                  Expected Config file at
                  "C:/Qt/6.8.1/wasm_singlethread/lib/cmake/Qt6Multimedia/Qt6MultimediaConfig.cmake"
                  exists

                  G 1 Reply Last reply 25 Jan 2025, 08:58
                  0
                  • L Ledge
                    24 Jan 2025, 22:26

                    @Gilboonet I followed those steps you mentioned, requiring me to build the app on the command line and scrap what I was doing in the GUI. Now this command below to build from the command line has led to me to this error, which makes me believe I need to build from source since my qt maintenance tool already says I have multimedia downloaded. Any idea of how to resolve this error or am I following the wrong path? Do I need to change variable values to set QT6 to be found? Thank you for your time.

                    Command:

                    /c/Qt/6.8.1/wasm_singlethread/bin/qt-cmake.bat . -DQT_CHAINLOAD_TOOLCHAIN_FILE= /c/Qt/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake

                    Error:

                    CMake Error at CMakeLists.txt:212 (find_package):
                    Found package configuration file:

                    C:/Qt/6.8.1/wasm_singlethread/lib/cmake/Qt6/Qt6Config.cmake
                    

                    but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
                    FOUND. Reason given by package:

                    Failed to find required Qt component "Multimedia".

                    Expected Config file at
                    "C:/Qt/6.8.1/wasm_singlethread/lib/cmake/Qt6Multimedia/Qt6MultimediaConfig.cmake"
                    exists

                    G Offline
                    G Offline
                    Gilboonet
                    wrote on 25 Jan 2025, 08:58 last edited by Gilboonet
                    #9

                    @Ledge Multimedia is not on the supported Qt modules list (see here), so I'm afraid this error cannot be resolved, maybe will it be added on next update.

                    L 1 Reply Last reply 28 Jan 2025, 22:30
                    1
                    • G Gilboonet
                      25 Jan 2025, 08:58

                      @Ledge Multimedia is not on the supported Qt modules list (see here), so I'm afraid this error cannot be resolved, maybe will it be added on next update.

                      L Offline
                      L Offline
                      lorn.potter
                      wrote on 28 Jan 2025, 22:30 last edited by
                      #10

                      @Gilboonet multimedia is not officially supported, but it is available for WebAssembly.

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

                      G 1 Reply Last reply 30 Jan 2025, 10:00
                      0
                      • L lorn.potter
                        28 Jan 2025, 22:30

                        @Gilboonet multimedia is not officially supported, but it is available for WebAssembly.

                        G Offline
                        G Offline
                        Gilboonet
                        wrote on 30 Jan 2025, 10:00 last edited by
                        #11

                        @lorn-potter Thank you, I think the OP needs help from someone who already built a Wasm project with Multimedia as he didn't manage to have his project built, on the pinned discussion almost all links are dead or out of date which doesn't help much.

                        1 Reply Last reply
                        0

                        7/11

                        24 Jan 2025, 19:11

                        • Login

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