Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-120050

Configuring a CMake-based Qt WASM project fails if emsdk path has spaces

    XMLWordPrintable

Details

    • Linux/X11, WebAssembly
    • 6b09b5153 (dev), 9dbc0673c (6.7), c3c461d8e (6.6)

    Description

      My emsdk is installed in a directory whose name contains spaces

      /home/alportal/em sdk/

      Configuring a CMake-based Qt WASM project based project using that emsdk installation fails:

      Configuration error
      [cmake] Running /usr/bin/cmake -S /home/alportal/dev/qtcreator-bug-snippets/QTCREATORBUG-25030/qtwidgets -B /home/alportal/dev/qtcreator-bug-snippets/QTCREATORBUG-25030/build-qtwidgets-WebAssembly_Qt_6_5_1_single_threaded-Debug -DCMAKE_GENERATOR:STRING=Ninja -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=/home/alportal/dev/qtcreator-bug-snippets/QTCREATORBUG-25030/build-qtwidgets-WebAssembly_Qt_6_5_1_single_threaded-Debug/.qtc/package-manager/auto-setup.cmake -DQT_QMAKE_EXECUTABLE:FILEPATH=/home/alportal/Qt/6.5.1/wasm_singlethread/bin/qmake -DCMAKE_PREFIX_PATH:PATH=/home/alportal/Qt/6.5.1/wasm_singlethread '-DCMAKE_C_COMPILER:FILEPATH=/home/alportal/em sdk/upstream/emscripten/emcc' '-DCMAKE_CXX_COMPILER:FILEPATH=/home/alportal/em sdk/upstream/emscripten/em++' -DCMAKE_TOOLCHAIN_FILE:FILEPATH=/home/alportal/Qt/6.5.1/wasm_singlethread/lib/cmake/Qt6/qt.toolchain.cmake -DCMAKE_CXX_FLAGS_INIT:STRING=-DQT_QML_DEBUG in /home/alportal/dev/qtcreator-bug-snippets/QTCREATORBUG-25030/build-qtwidgets-WebAssembly_Qt_6_5_1_single_threaded-Debug.
      [cmake] -- Using Qt bundled ZLIB.
      [cmake] -- Found WrapZLIB: TRUE  
      [cmake] -- Performing Test HAVE_STDATOMIC
      [cmake] -- Performing Test HAVE_STDATOMIC - Success
      [cmake] -- Found WrapAtomic: TRUE  
      [cmake] -- Using Qt bundled PCRE2.
      [cmake] -- Found WrapPCRE2: TRUE  
      [cmake] -- Performing Test HAVE_GETTIME
      [cmake] -- Performing Test HAVE_GETTIME - Success
      [cmake] -- Found WrapRt: TRUE  
      [cmake] -- Found GLESv2: ON  
      [cmake] -- Performing Test HAVE_EGL
      [cmake] -- Performing Test HAVE_EGL - Success
      [cmake] -- Found EGL: /home/alportal/em sdk/upstream/emscripten/cache/sysroot/include (found version "1.5") 
      [cmake] -- Using Qt bundled PNG.
      [cmake] -- Found WrapPNG: TRUE  
      [cmake] -- Using Qt bundled Harfbuzz.
      [cmake] -- Found WrapHarfbuzz: TRUE  
      [cmake] -- Using Qt bundled Freetype.
      [cmake] -- Found WrapFreetype: TRUE  
      [cmake] -- Using Qt bundled Jpeg.
      [cmake] -- Found WrapJpeg: TRUE  
      [cmake] CMake Error at /home/alportal/Qt/6.5.1/wasm_singlethread/lib/cmake/Qt6/QtPublicWasmToolchainHelpers.cmake:43 (message):
      [cmake]   Couldn't determine Emscripten version from running /home/alportal/em\
      [cmake]   sdk/upstream/emscripten/emcc --version.  Error:
      [cmake] Call Stack (most recent call first):
      [cmake]   /home/alportal/Qt/6.5.1/wasm_singlethread/lib/cmake/Qt6/QtPublicWasmToolchainHelpers.cmake:95 (__qt_internal_query_emsdk_version)
      [cmake]   /home/alportal/Qt/6.5.1/wasm_singlethread/lib/cmake/Qt6Core/Qt6WasmMacros.cmake:7 (_qt_test_emscripten_version)
      [cmake]   /home/alportal/Qt/6.5.1/wasm_singlethread/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:642 (_qt_internal_wasm_add_target_helpers)
      [cmake]   /home/alportal/Qt/6.5.1/wasm_singlethread/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:709 (_qt_internal_finalize_executable)
      [cmake]   /home/alportal/Qt/6.5.1/wasm_singlethread/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:749 (qt6_finalize_target)
      [cmake]   CMakeLists.txt:63 (qt_finalize_executable)
      [cmake] 
      [cmake] 
      [cmake] -- Configuring incomplete, errors occurred!
      [cmake] 
      [cmake] CMake process exited with exit code 1.
      [cmake] 
      [cmake] Elapsed time: 00:04.
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qtbuildsystem Qt Build System Team
              portale Alessandro Portale
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There is 1 open Gerrit change