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. build Qt 6.3.0 to generate WebAssembly library framework.
Forum Updated to NodeBB v4.3 + New Features

build Qt 6.3.0 to generate WebAssembly library framework.

Scheduled Pinned Locked Moved Solved Qt for WebAssembly
4 Posts 2 Posters 1.2k Views 1 Watching
  • 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.
  • RenioR Offline
    RenioR Offline
    Renio
    wrote on last edited by Renio
    #1

    I try to build Qt 6.3.0 to generate WebAssembly library framework.
    I followed the instruction illustradet in
    [https://doc.qt.io/qt-6/wasm.html](link url)
    and in a powershell I executed this command:

    ./configure -qt-host-path C:\Qt\6.3.0\Src  -no-warnings-are-errors -platform wasm-emscripten -prefix %CD%\qtbase
    

    and I obtain this error:

    Configuring 'qtbase'
    -- Warning: Did not find file Compiler/-ASM
    CMake Error at qtbase/cmake/QtBaseConfigureTests.cmake:27 (message):
      Failed to build architecture extraction project.  Build output:
    
       Change Dir: C:/Qt/6.3.0/Src/qtbase/config.tests/arch
    
    
    
      Run Build Command(s):C:/Qt/Tools/Ninja/ninja.exe && [1/2] Building CXX
      object CMakeFiles/architecture_test.dir/arch.cpp.o
    
      FAILED: CMakeFiles/architecture_test.dir/arch.cpp.o
    
      C:\Repository\emsdk_fra\emsdk\upstream\emscripten\em++.bat /DWIN32
      /D_WINDOWS /GR -g -O2 -msimd128 -msse -msse2 -std=gnu++17 -MD -MT
      CMakeFiles/architecture_test.dir/arch.cpp.o -MF
      CMakeFiles\architecture_test.dir\arch.cpp.o.d -o
      CMakeFiles/architecture_test.dir/arch.cpp.o -c
      C:/Qt/6.3.0/Src/qtbase/config.tests/arch/arch.cpp
    
      em++: error: /DWIN32: No such file or directory ("/DWIN32" was expected to
      be an input file, based on the commandline arguments provided)
    
      ninja: build stopped: subcommand failed.
    Call Stack (most recent call first):
    -- Configuring incomplete, errors occurred!
      qtbase/cmake/QtBaseConfigureTests.cmake:173 (qt_run_config_test_architecture)
      qtbase/cmake/QtBaseConfigureTests.cmake:186 (qt_run_qtbase_config_tests)
      qtbase/CMakeLists.txt:119 (include)
    
    See also "C:/Qt/6.3.0/Src/CMakeFiles/CMakeOutput.log".
    See also "C:/Qt/6.3.0/Src/CMakeFiles/CMakeError.log".
    CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:963 (message):
      CMake exited with code 1.
    

    The step executed immediatly before, was to configure the vc environment across this command:

    C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build> .\vcvarsall.bat x64
    

    I tryed to use this command

    configure -no-warnings-are-errors -xplatform wasm-emscripten -platform win32-g++ -nomake examples -prefix %CD%\qtbase
    

    how indicated on

    https://wiki.qt.io/Qt_for_WebAssembly
    

    I don't have installed the asm compiler because isn't necessary for my job.
    Can someone explain where I wrong?

    I use:
    Windows10 64 bit
    cmake version 3.21.1
    ninja version 1.10.2
    perl v5.32.1 built for MSWin32-x64-multi-thread
    Python 3.9.5

    [edit]
    I founded this topic.
    https://forum.qt.io/topic/136045/build-qt6-3-wasm-from-source-configure-error
    I had changed the qt path, and my process goes a little step toward, but obtain the same error!

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

      @Renio said in build Qt 6.3.0 to generate WebAssembly library framework.:

      qt-host-path

      qt-host-path is meant to be the path to the Qt binary installation for the host platform. so qt-host-path C:\Qt\6.3.0\mingw_64 or C:\Qt\6.3.0\msvc2019_64

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

      RenioR 1 Reply Last reply
      1
      • lorn.potterL lorn.potter

        @Renio said in build Qt 6.3.0 to generate WebAssembly library framework.:

        qt-host-path

        qt-host-path is meant to be the path to the Qt binary installation for the host platform. so qt-host-path C:\Qt\6.3.0\mingw_64 or C:\Qt\6.3.0\msvc2019_64

        RenioR Offline
        RenioR Offline
        Renio
        wrote on last edited by
        #3

        @lorn-potter Thanks for your suggestion, but I obtain this error

        ./configure.bat -qt-host-path c:\Qt\6.3.0\mingw_64 -no-warnings-are-errors -platform wasm-emscripten -prefix c:\Qt\6.3.0\Src\qtbase
        'C:/Qt/Tools/CMake_64/bin/cmake.exe' '-DQT_HOST_PATH=c:/Qt/6.3.0/mingw_64' '-DWARNINGS_ARE_ERRORS=OFF' '-DCMAKE_INSTALL_PREFIX=c:/Qt/6.3.0/Src/qtbase' '-DQT_QMAKE_TARGET_MKSPEC=wasm-emscripten' '-G' 'Ninja' 'C:/Qt/6.3.0/Src/qtbase'
        -- Reusing cached Emscripten 3.1.6 toolchain file detected at C:/Repository/emsdk_fra/emsdk//upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
        CMake Error at cmake/QtBaseConfigureTests.cmake:27 (message):
          Failed to build architecture extraction project.  Build output:
        
           Change Dir: C:/Qt/6.3.0/Src/qtbase/config.tests/arch
        
        
        
          Run Build Command(s):C:/Qt/Tools/Ninja/ninja.exe && [1/2] Building CXX
          object CMakeFiles\architecture_test.dir\arch.cpp.obj
        
          FAILED: CMakeFiles/architecture_test.dir/arch.cpp.obj
        
        
          C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.300\bin\Hostx64\x64\cl.exe
          /nologo /TP /DWIN32 /D_WINDOWS /GR /Zi /RTC1 -MDd -O2 -msimd128 -msse
          -msse2 -std:c++17 /showIncludes
          /FoCMakeFiles\architecture_test.dir\arch.cpp.obj
          /FdCMakeFiles\architecture_test.dir\ /FS -c
          C:\Qt\6.3.0\Src\qtbase\config.tests\arch\arch.cpp
        
          cl : error della riga di comando D8016 : le opzioni della riga di comando
          '/RTC1' e '/O2' non sono compatibili
        
          ninja: build stopped: subcommand failed.
        
        
        
        Call Stack (most recent call first):
          cmake/QtBaseConfigureTests.cmake:173 (qt_run_config_test_architecture)
          cmake/QtBaseConfigureTests.cmake:186 (qt_run_qtbase_config_tests)
          CMakeLists.txt:119 (include)
        
        -- Configuring incomplete, errors occurred!
        
        See also "C:/Qt/6.3.0/Src/qtbase/CMakeFiles/CMakeOutput.log".
        See also "C:/Qt/6.3.0/Src/qtbase/CMakeFiles/CMakeError.log".
        CMake Error at cmake/QtProcessConfigureArgs.cmake:963 (message):
          CMake exited with code 1.
        
        RenioR 1 Reply Last reply
        0
        • RenioR Renio

          @lorn-potter Thanks for your suggestion, but I obtain this error

          ./configure.bat -qt-host-path c:\Qt\6.3.0\mingw_64 -no-warnings-are-errors -platform wasm-emscripten -prefix c:\Qt\6.3.0\Src\qtbase
          'C:/Qt/Tools/CMake_64/bin/cmake.exe' '-DQT_HOST_PATH=c:/Qt/6.3.0/mingw_64' '-DWARNINGS_ARE_ERRORS=OFF' '-DCMAKE_INSTALL_PREFIX=c:/Qt/6.3.0/Src/qtbase' '-DQT_QMAKE_TARGET_MKSPEC=wasm-emscripten' '-G' 'Ninja' 'C:/Qt/6.3.0/Src/qtbase'
          -- Reusing cached Emscripten 3.1.6 toolchain file detected at C:/Repository/emsdk_fra/emsdk//upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
          CMake Error at cmake/QtBaseConfigureTests.cmake:27 (message):
            Failed to build architecture extraction project.  Build output:
          
             Change Dir: C:/Qt/6.3.0/Src/qtbase/config.tests/arch
          
          
          
            Run Build Command(s):C:/Qt/Tools/Ninja/ninja.exe && [1/2] Building CXX
            object CMakeFiles\architecture_test.dir\arch.cpp.obj
          
            FAILED: CMakeFiles/architecture_test.dir/arch.cpp.obj
          
          
            C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.300\bin\Hostx64\x64\cl.exe
            /nologo /TP /DWIN32 /D_WINDOWS /GR /Zi /RTC1 -MDd -O2 -msimd128 -msse
            -msse2 -std:c++17 /showIncludes
            /FoCMakeFiles\architecture_test.dir\arch.cpp.obj
            /FdCMakeFiles\architecture_test.dir\ /FS -c
            C:\Qt\6.3.0\Src\qtbase\config.tests\arch\arch.cpp
          
            cl : error della riga di comando D8016 : le opzioni della riga di comando
            '/RTC1' e '/O2' non sono compatibili
          
            ninja: build stopped: subcommand failed.
          
          
          
          Call Stack (most recent call first):
            cmake/QtBaseConfigureTests.cmake:173 (qt_run_config_test_architecture)
            cmake/QtBaseConfigureTests.cmake:186 (qt_run_qtbase_config_tests)
            CMakeLists.txt:119 (include)
          
          -- Configuring incomplete, errors occurred!
          
          See also "C:/Qt/6.3.0/Src/qtbase/CMakeFiles/CMakeOutput.log".
          See also "C:/Qt/6.3.0/Src/qtbase/CMakeFiles/CMakeError.log".
          CMake Error at cmake/QtProcessConfigureArgs.cmake:963 (message):
            CMake exited with code 1.
          
          RenioR Offline
          RenioR Offline
          Renio
          wrote on last edited by
          #4

          I solved! starting from a clean situation:
          I removed the source code using the Qt MaintenanceTool.
          I erased the dirty file contained in Src directory.
          I added the source code using the Qt MaintenanceTool.
          Now in a powershell in windows I ran this command

          .\configure.bat -qt-host-path C:\Qt\6.3.0\mingw_64\  -no-warnings-are-errors -platform wasm-emscripten -prefix %CD%\qtbase
          

          and followed the instruction in this post.

          [https://forum.qt.io/topic/136045/build-qt6-3-wasm-from-source-configure-error](link url)
          

          I appliated the patch indicated in this post.

          [https://bugreports.qt.io/browse/QTBUG-103498](link url)
          

          I ran the compile command

          cmake --build . --parallel.
          

          The last step, I most execute the installation of the wasm library patched, but I don have idea how

          1 Reply Last reply
          0
          • C cebuger referenced this topic on

          • Login

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