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

QT6 Build Fails with Yocto Cannot find qmltyperegistrar

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 6.2.4
    • None
    • Build System: Ubuntu 21.10 x86_64
      Tried both Dunfell and honister
      meta-qt6 v6.2.4

    • Linux/Yocto

    Description

      I am trying to build a CMake Project that uses QT6 with Yocto. I have tried both Dunfell and honister. I am on  meta-qt6 v6.2.4

       

      Below is the error I am getting:

      | CMake Error at /Yocto/poky/build/tmp/work/cortexa72-poky-linux/vision-qt/1.0-r0/recipe-sysroot/usr/lib/cmake/Qt6QmlTools/Qt6QmlToolsTargets.cmake:170 (message):
      
      |   The imported target "Qt6::qmltyperegistrar" references the file
      
      |  
      |      "/Yocto/poky/build/tmp/work/cortexa72-poky-linux/vision-qt/1.0-r0/recipe-sysroot/usr/libexec/qmltyperegistrar"
      
      |  
      |   but this file does not exist.  Possible reasons include:
      
      |  
      |   * The file was deleted, renamed, or moved to another location.
      
      |  
      |   * An install or uninstall procedure did not complete successfully.
      
      |  
      |   * The installation package was faulty and contained
      
      |  
      |      "/Yocto/poky/build/tmp/work/cortexa72-poky-linux/vision-qt/1.0-r0/recipe-sysroot/usr/lib/cmake/Qt6QmlTools/Qt6QmlToolsTargets.cmake"
      
      |  
      |   but not all the files it references.
      
      
      
      

      It seems that qmltyperegistrar is either not getting installed or not in the right place but I'm not sure how. My recipe for my project is quite simple:

      DESCRIPTION = "x"
      
      LICENSE = "CLOSED"
      
      inherit qt6-cmake
      
      W = "${WORKDIR}"
      
      SRCBRANCH ??= "main"SRC_URI = " \
      	git://git@git.xxx;protocol=ssh \
      
      "SRCREV = "${AUTOREV}"
      S = "${WORKDIR}/git"
      
      PACKAGES =+ "package"
      
      PV = "1.0"
      PR = "r0"
      
      DEPENDS  += "qtdeclarative qtbase qtimageformats qtshadertools qtsvg qtvirtualkeyboard qttools"
      DEPENDS += "zeromq cppzmq openssl"
      
      

       

      Below is the CMAKE file in question which is part of a larger project. But I would expect this to be able to find qmltyperegistrar

       
      project(zmqml)

      find_package(Qt6 COMPONENTS Quick REQUIRED)

      file(GLOB_RECURSE src_files RELATIVE "${CMAKE_CURRENT_LIST_DIR}" "*.cpp")
      file(GLOB_RECURSE header_files RELATIVE "${CMAKE_CURRENT_LIST_DIR}" "*.h")

      qt_add_qml_module(zmqml
      URI zmq.Components
      VERSION 1.0
      STATIC
      SOURCES ${src_files} ${header_files}
      CLASS_NAME ZmqmlPlugin
      PLUGIN_TARGET zmqml
      NO_GENERATE_PLUGIN_SOURCE
      NO_PLUGIN_OPTIONAL)
      target_sources(zmqml PRIVATE ${src_files} ${header_files})

      target_include_directories(zmqml
      PUBLIC
      .)

      include(ExternalProject)
      include(FetchContent)
      option(BUILD_TESTS "" OFF)
      option(WITH_LIBSODIUM "" OFF)
      option(BUILD_SHARED "" OFF)
      option(ENABLE_DRAFTS "" OFF)
      option(BUILD_STATIC "" ON)
      FetchContent_Declare(
      libzmq
      URL https://github.com/zeromq/libzmq/releases/download/v4.3.4/zeromq-4.3.4.tar.gz
      URL_HASH MD5=c897d4005a3f0b8276b00b7921412379
      )
      FetchContent_MakeAvailable(libzmq)
      set(ZeroMQ_LIBRARY ${ZEROMQ_LIBRARY}-static)
      target_link_libraries(zmqml
      PUBLIC
      Qt::Core
      Qt::Quick
      ${ZeroMQ_LIBRARY})

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            richard.swanson richard swanson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes