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

Host tools not found when cross building Android using Debian host Qt

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.4.0 Beta4
    • Build System: CMake
    • None
    • Linux/Other display system

      I'm trying to use the qt6 shipped by Debian to build Qt for Android.

      However it fails with this error.

      Configuring submodule 'qtbase'
      -- Could NOT find md4c (missing: md4c_DIR)
      -- Could NOT find Qt6CoreTools (missing: Qt6CoreTools_DIR)
      CMake Error at qtbase/cmake/QtToolHelpers.cmake:184 (message):
        Failed to find the host tool "Qt6::moc".  It is part of the Qt6CoreTools
        package, but the package could not be found.  Make sure you have built and
        installed the host Core module, which will ensure the creation of the
        Qt6CoreTools package.
      Call Stack (most recent call first):
        qtbase/src/tools/moc/CMakeLists.txt:8 (qt_internal_add_tool)
      

      The build is configured this way:

      cd debian/build-armeabi-v7a && cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DCMAKE_INSTALL_RUNSTATEDIR=/run -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON -GNinja -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu -DCMAKE_INSTALL_PREFIX=/usr/lib/qt-android-6.4-armeabi-v7a -DBUILD_WITH_PCH=OFF -DQT_QMAKE_TARGET_MKSPEC=android-clang -DANDROID_SDK_ROOT=/builds/bastif/qt-android/android-sdk -DCMAKE_TOOLCHAIN_FILE=/builds/bastif/qt-android/r23c/android-ndk-r23c/build/cmake/android.toolchain.cmake -DQT_HOST_PATH=/usr/lib/qt6 -DQT_HOST_PATH_CMAKE_DIR=/usr/lib/x86_64-linux-gnu/cmake -DANDROID_ABI=armeabi-v7a -DQT_USE_CCACHE=ON -DCMAKE_BUILD_TYPE=Release -DWARNINGS_ARE_ERRORS=OFF -DBUILD_qtwayland=OFF -DBUILD_qtwebengine=OFF -DFEATURE_clang=ON -DFEATURE_clangcpp=ON -DTEST_libclang=ON -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON ../..
      

      You can find the install location of files in Debian here: you can note that cmake files are not in a dir ending by lib/cmake because of multi arch feature in Debian.

      https://packages.debian.org/sid/amd64/qt6-base-dev/filelist

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

            qtbuildsystem Qt Build System Team
            ban F S
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes