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

do_configure task fails in native recipe due to invalid qmake path expansion

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.8.3, 6.9.2
    • Yocto: meta-qt6 layer
    • None
    • Ubuntu 22.04 (x86_64)
    • Linux/Yocto

      While building a native tool with meta-qt6, the configuration step fails because qmake cannot be found. The issue appears to be caused by a duplicated path in the generated qmake command.

      Recipe: nymea-sdk_git.bb

      Error log excerpt:

      ERROR: nymea-sdk-native-1.12.0-gitAUTOINC+d8dcff002c-r0 do_configure: Error calling /workdir/build/tmp/work/x86_64-linux/nymea-sdk-native/1.12.0-gitAUTOINC+d8dcff002c-r0/recipe-sysroot-native/workdir/build/tmp/work/x86_64-linux/nymea-sdk-native/1.12.0-gitAUTOINC+d8dcff002c-r0/recipe-sysroot-native/usr/bin/qmake -makefile -o Makefile    CONFIG+=piconly NYMEA_VERSION=1.12.0-gitAUTOINC+d8dcff002c  /workdir/build/tmp/work/x86_64-linux/nymea-sdk-native/1.12.0-gitAUTOINC+d8dcff002c-r0/git/nymea.pro  -- 
      ERROR: nymea-sdk-native-1.12.0-gitAUTOINC+d8dcff002c-r0 do_configure: ExecutionError('/workdir/build/tmp/work/x86_64-linux/nymea-sdk-native/1.12.0-gitAUTOINC+d8dcff002c-r0/temp/run.do_configure.340276', 1, None, None)
      ERROR: Logfile of failure stored in: /workdir/build/tmp/work/x86_64-linux/nymea-sdk-native/1.12.0-gitAUTOINC+d8dcff002c-r0/temp/log.do_configure.340276
      Log data follows:
      | DEBUG: Executing python function extend_recipe_sysroot
      | NOTE: Direct dependencies are ['/workdir/source/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_populate_sysroot', 'virtual:native:/workdir/source/meta-qt6/recipes-qt/qt6/qtbase_git.bb:do_populate_sysroot']
      | NOTE: Installed into sysroot: []
      | NOTE: Skipping as already exists in sysroot: ['quilt-native', 'qtbase-native', 'patchelf-native', 'zstd-native', 'libpcre2-native', 'dbus-native', 'libjpeg-turbo-native', 'freetype-native', 'cmake-native', 'zlib-native', 'openssl-native', 'perl-native', 'sqlite3-native', 'libpng-native', 'python3-native', 'libtool-native', 'gettext-minimal-native', 'glib-2.0-native', 'xz-native', 'expat-native', 'ncurses-native', 'curl-native', 'bzip2-native', 'gdbm-native', 'make-native', 'readline-native', 'libffi-native', 'libtirpc-native', 'util-linux-libuuid-native', 'libnsl2-native', 'texinfo-dummy-native', 'util-linux-native', 'libpcre-native', 'gettext-native', 'libcap-ng-native']
      | DEBUG: Python function extend_recipe_sysroot finished
      | DEBUG: Executing shell function qmake5_base_preconfigure
      | DEBUG: Shell function qmake5_base_preconfigure finished
      | DEBUG: Executing shell function do_configure
      | NOTE: qmake prevar substitution: ' CONFIG+=piconly NYMEA_VERSION=1.12.0-gitAUTOINC+d8dcff002c'
      | ERROR: Error calling /workdir/build/tmp/work/x86_64-linux/nymea-sdk-native/1.12.0-gitAUTOINC+d8dcff002c-r0/recipe-sysroot-native/workdir/build/tmp/work/x86_64-linux/nymea-sdk-native/1.12.0-gitAUTOINC+d8dcff002c-r0/recipe-sysroot-native/usr/bin/qmake -makefile -o Makefile    CONFIG+=piconly NYMEA_VERSION=1.12.0-gitAUTOINC+d8dcff002c  /workdir/build/tmp/work/x86_64-linux/nymea-sdk-native/1.12.0-gitAUTOINC+d8dcff002c-r0/git/nymea.pro  --
      | WARNING: exit code 1 from a shell command.
      | /workdir/build/tmp/work/x86_64-linux/nymea-sdk-native/1.12.0-gitAUTOINC+d8dcff002c-r0/temp/run.do_configure.340276: 179: /workdir/build/tmp/work/x86_64-linux/nymea-sdk-native/1.12.0-gitAUTOINC+d8dcff002c-r0/recipe-sysroot-native/workdir/build/tmp/work/x86_64-linux/nymea-sdk-native/1.12.0-gitAUTOINC+d8dcff002c-r0/recipe-sysroot-native/usr/bin/qmake: not found
      NOTE: recipe nymea-sdk-native-1.12.0-gitAUTOINC+d8dcff002c-r0: task do_configure: Failed
      ERROR: Task (virtual:native:/workdir/source/meta-nymea/recipes-tools/nymea-sdk/nymea-sdk_git.bb:do_configure) failed with exit code '1' 

      Notice the duplicated path segment in the command:

      /workdir/build/tmp/work/x86_64-linux/nymea-sdk-native/1.12.0-gitAUTOINC+d8dcff002c-r0/recipe-sysroot-native/workdir/build/tmp/work/x86_64-linux/nymea-sdk-native/1.12.0-gitAUTOINC+d8dcff002c-r0/recipe-sysroot-native/usr/bin/qmake

      I added the generated /workdir/build/tmp/work/x86_64-linux/nymea-sdk-native/1.12.0-gitAUTOINC+d8dcff002c-r0/temp/run.do_configure.340276 to the ticket as a reference.

      After checking the files and tools I followed the definition to:
      https://code.qt.io/cgit/yocto/meta-qt6.git/tree/classes/qt6-qmake.bbclass#n21

      It looks like ${STAGING_DIR_NATIVE} is incorrectly included in OE_QMAKE_PATH_EXTERNAL_HOST_BINS, leading to the doubled sysroot prefix.

      The tool exists and I also can execute it correctly manually:

      /workdir/build/tmp/work/x86_64-linux/nymea-sdk-native/1.12.0-gitAUTOINC+d8dcff002c-r0/recipe-sysroot-native/usr/bin/qmake -v
      
      Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
      
      Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
      
      If this causes problems, reconfigure your locale. See the locale(1) manual
      
      for more information.
      
      QMake version 3.1
      
      Using Qt version 6.8.3 in /workdir/build/tmp/work/x86_64-linux/nymea-sdk-native/1.12.0-gitAUTOINC+d8dcff002c-r0/recipe-sysroot-native/usr/lib
       

      Is this a bug or am I doing something wrong in the recipe?

        For Gerrit Dashboard: QTBUG-140631
        # Subject Branch Project Status CR V

            sapiippo Samuli Piippo
            simon.stuerz Simon Stürz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change