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

[REG v6.0.0-beta3 -> dev] Asking configure for an unavailable feature causes obscure crash instead of informative error message

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 6.1.0 Alpha
    • 6.0.0 Beta4
    • Build System: CMake
    • $ lsb_release -d
      Description: openSUSE Leap 15.2
      $ uname -a
      Linux localhost.localdomain 5.3.18-lp152.47-default #1 SMP Thu Oct 15 16:05:25 UTC 2020 (41f7396) x86_64 x86_64 x86_64 GNU/Linux

    Description

      Found when building Qt from CI-approved commit 43291fd110 in the dev branch of qt5.git.

      When asking the old qmake-based configure to enable a feature that isn't supported by the build environment, configure outputs a somewhat informative message and terminates normally.

      $ git clone git://code.qt.io/qt/qt5.git
      ...
      $ cd qt5
      $ git checkout v6.0.0-beta3
      $ perl init-repository -f
      ...
      $ ./configure -opensource -developer-build -confirm-license -sql-mysql -directfb -sctp
      ...
        SCTP ................................... no
      ...
        DirectFB ............................... no
      ...
        MySql .................................. no
      ...
      ERROR: Feature 'sctp' was enabled, but the pre-condition 'tests.sctp' failed.
      
      ERROR: Feature 'directfb' was enabled, but the pre-condition 'libs.directfb' failed.
      
      ERROR: Feature 'sql-mysql' was enabled, but the pre-condition 'libs.mysql' failed.

      When doing the same thing with the cmake-based configure, the output falsely claims that the features are enabled then configure crashes with a message that gives the user no clue about what they did wrong or how to fix it.

      $ git clone git://code.qt.io/qt/qt5.git
      ...
      $ cd qt5
      $ git reflog
      43291fd1 (HEAD -> dev, origin/dev, origin/HEAD) HEAD@{0}: clone: from git://code.qt.io/qt/qt5.git
      $ perl init-repository -f
      ...
      $ ./configure -opensource -developer-build -confirm-license -sql-mysql -directfb -sctp
      ...
        SCTP ................................... yes
      ...
        DirectFB ............................... yes
      ...
        MySql .................................. yes
      ...
      -- Configuring incomplete, errors occurred!
      See also "/home/qt/depot/tmp/qt5/CMakeFiles/CMakeOutput.log".
      See also "/home/qt/depot/tmp/qt5/CMakeFiles/CMakeError.log".
      CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:751 (message):
        CMake exited with code 1

       

      Attachments

        Issue Links

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

          Activity

            People

              qtbuildsystem Qt Build System Team
              macadder Jason McDonald
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes