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. Configuring 6.2 for WebAssembly debugging
Forum Updated to NodeBB v4.3 + New Features

Configuring 6.2 for WebAssembly debugging

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
6 Posts 2 Posters 1.8k 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.
  • K Offline
    K Offline
    Kill-Animals
    wrote on 27 Jun 2021, 17:02 last edited by
    #1

    Following https://doc-snapshots.qt.io/qt6-dev/wasm.html

    Which prescribes:

    ./configure -qt-host-path /path/to/Qt/6.2.0/platform -xplatform wasm-emscripten -prefix $PWD/qtbase
    

    and

    Source maps for stepping through code, can be created by reconfiguring Qt with the --device-option QT_WASM_SOURCE_MAP=1, and building a debug build.
    

    Lead to this:

    ./configure -qt-host-path /home/anon/Library/qt6.2 -xplatform wasm-emscripten -debug -prefix $PWD/qtbase -device-option QT_WASM_SOURCE_MAP=1
    

    Which produced this, and a similar error on 6.1

    + mkdir -p qtbase
    + cd qtbase
    + exec /home/anon/Library/qt6.2wasm/qtbase/configure -top-level -qt-host-path /home/anon/Library/qt6.2 -xplatform wasm-emscripten -debug -prefix /home/anon/Library/qt6.2wasm/qtbase -device-option QT_WASM_SOURCE_MAP=1
    '/usr/local/bin/cmake' '-DQT_HOST_PATH=/home/anon/Library/qt6.2' '-DCMAKE_INSTALL_PREFIX=/home/anon/Library/qt6.2wasm/qtbase' '-DQT_QMAKE_TARGET_MKSPEC=wasm-emscripten' '-DCMAKE_BUILD_TYPE=Debug' '-DQT_QMAKE_DEVICE_OPTIONS=QT_WASM_SOURCE_MAP=1' '-G' 'Ninja' '/home/anon/Library/qt6.2wasm'
    Checking dependencies of 'qtbase'
    Checking dependencies of 'qtshadertools'
    Checking dependencies of 'qtsvg'
    Checking dependencies of 'qtdeclarative'
    Checking dependencies of 'qt3d'
    Checking dependencies of 'qt5compat'
    Checking dependencies of 'qtactiveqt'
    Checking dependencies of 'qtimageformats'
    Checking dependencies of 'qtquickcontrols2'
    Checking dependencies of 'qtmultimedia'
    Checking dependencies of 'qtcharts'
    Checking dependencies of 'qtcoap'
    Checking dependencies of 'qtconnectivity'
    Checking dependencies of 'qtdatavis3d'
    Checking dependencies of 'qttools'
    Checking dependencies of 'qtdoc'
    Checking dependencies of 'qtserialport'
    Checking dependencies of 'qtlocation'
    Checking dependencies of 'qtlottie'
    Checking dependencies of 'qtmqtt'
    Checking dependencies of 'qtnetworkauth'
    Checking dependencies of 'qtopcua'
    Checking dependencies of 'qtqa'
    Checking dependencies of 'qtquicktimeline'
    Checking dependencies of 'qtquick3d'
    Checking dependencies of 'qtremoteobjects'
    Checking dependencies of 'qtscxml'
    Checking dependencies of 'qtsensors'
    Checking dependencies of 'qtserialbus'
    Checking dependencies of 'qttranslations'
    Checking dependencies of 'qtvirtualkeyboard'
    Checking dependencies of 'qtwayland'
    Checking dependencies of 'qtwebsockets'
    Checking dependencies of 'qtwebchannel'
    Checking dependencies of 'qtwebengine'
    Checking dependencies of 'qtwebview'
    Configuring 'qtbase'
    CMake Error at qtbase/cmake/QtSetup.cmake:179 (find_package):
      Could not find a package configuration file provided by "Qt6HostInfo" with
      any of the following names:
    
        Qt6HostInfoConfig.cmake
        qt6hostinfo-config.cmake
    
      Add the installation prefix of "Qt6HostInfo" to CMAKE_PREFIX_PATH or set
      "Qt6HostInfo_DIR" to a directory containing one of the above files.  If
      "Qt6HostInfo" provides a separate development package or SDK, be sure it
      has been installed.
    Call Stack (most recent call first):
      qtbase/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake:229 (include)
      qtbase/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake:372 (qt_build_internals_set_up_private_api)
      qtbase/CMakeLists.txt:74 (qt_build_repo_begin)
    
    
    -- Configuring incomplete, errors occurred!
    See also "/home/anon/Library/qt6.2wasm/CMakeFiles/CMakeOutput.log".
    CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:937 (message):
      CMake exited with code 1.
    

    When looking for the file, a Readme states:

    If this directory is empty, you probably forgot to compile the Qt library.
    

    I am not sure what to do.

    1 Reply Last reply
    1
    • K Offline
      K Offline
      Kill-Animals
      wrote on 27 Jun 2021, 20:15 last edited by
      #2

      I figured out what was wrong. I needed this command instead:

      ./configure -qt-host-path /home/anon/Library/qt6.2/qtbase -xplatform wasm-emscripten -debug -prefix $PWD/qtbase -device-option QT_WASM_SOURCE_MAP=1
      
      1 Reply Last reply
      0
      • K Offline
        K Offline
        Kill-Animals
        wrote on 29 Jun 2021, 01:59 last edited by
        #3

        Okay it compiles, but it ends up with the wrong ABI.

        1 Reply Last reply
        0
        • L Offline
          L Offline
          lorn.potter
          wrote on 29 Jun 2021, 19:26 last edited by
          #4

          Did you build the qt6.2 host libraries?

          You might need to also specify the emscripten toolchain file path
          -DCMAKE_TOOLCHAIN_FILE='$HOME'/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake'

          Or where ever it is

          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
          • K Offline
            K Offline
            Kill-Animals
            wrote on 9 Jul 2021, 11:41 last edited by
            #5

            Did you build the qt6.2 host libraries?

            I do not believe so, but I'm not sure what the host libraries are supposed to be.

            -DCMAKE_TOOLCHAIN_FILE='$HOME'/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake'

            I'll give it another shot.

            1 Reply Last reply
            0
            • K Offline
              K Offline
              Kill-Animals
              wrote on 12 Jul 2021, 05:44 last edited by
              #6

              It did not work. I used this line to configure:

              ./configure -DCMAKE_TOOLCHAIN_FILE='$HOME'/Library/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -qt-host-path /home/anon/Library/qt6.2/qtbase -xplatform wasm-emscripten -debug -prefix $PWD/qtbase -device-option QT_WASM_SOURCE_MAP=1
              

              When I upload the Qt version into QtCreator, the ABI is always

              x86-linux-generic-elf-64bit
              

              Instead of

              asmjs-unknown-unknown-emscripten-32bit
              

              Preventing any build.

              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