Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1761

Throw during resolve causes unrelated error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 2.2.0
    • 2.1.1
    • General
    • None
    • macOS
    • 5af4f376f (master)

    Description

      If an error happens during resolve e.g. when a dependency is not found or an exception is thrown from inside of a Probe we get this error on macOS:

      There are no SDKs available for this platform in the Xcode installation.

      There isn't an actual issue with the SDKs as once the problem in the qbs files is fixed everything builds just fine. The real error is not printed at all in our large project which makes this difficult to diagnose.

      Here's a minimal test product that triggers the error:

      Product {
          Depends {
              name: "Qt"
              submodules: [
                  "core",
                  "doesnotexist"
              ]
          }
      } 

      This is the output:

      Build graph does not yet exist for configuration 'default'. Starting from scratch.
      Resolving project for configuration default
      Setting up Qt at '/Users/lbuckel/Qt/5.15.15/macos/bin/qmake'...
      Qt was set up successfully.
      ERROR: /Users/lbuckel/Desktop/test.qbs:1:1 Error while handling product 'test':
      /Users/lbuckel/Desktop/test.qbs:2:2 Dependency 'Qt.doesnotexist' not found for product 'test'.
      There are no SDKs available for this platform in the Xcode installation.
      /opt/homebrew/Cellar/qbs/2.1.1/share/qbs/modules/xcode/xcode.qbs:162  

      Note that this has the 'Dependency not found' error but our bigger project does not print it and I haven't been able to find out why.
      In any case, the last error is the aforementioned SDK error which is somehow caused by the first one.

      I get the same issue when throwing an error inside of a Probe's configure script.

      The Xcode and Qt versions don't matter but here I used 15 and 5.15.

      On windows there is the same issue only with a different error:

      Build graph does not yet exist for configuration 'default'. Starting from scratch.
      Resolving project for configuration default
      Setting up Qt at 'C:\Qt\5.15.9\msvc2019_64\bin\qmake.exe'...
      Qt was set up successfully.
      ERROR: C:\Users\lbuckel\Desktop\test.qbs:1:1 Error while handling product 'test':
      C:\Users\lbuckel\Desktop\test.qbs:2:2 Dependency 'Qt.doesnotexist' not found for product 'test'.
      The following properties are not set. Set them in your profile or product:
      cpp.compilerDefinesByLanguage
      cpp.compilerVersionMajor
      cpp.compilerVersionMinor
      cpp.compilerVersionPatch
      The following properties have invalid values:
      cpp.compilerVersionMajor: must be an integer >= 1, actual value: undefined
      cpp.compilerVersionMinor: must be an integer >= 0, actual value: undefined
      cpp.compilerVersionPatch: must be an integer >= 0, actual value: undefined
      C:\ProgramData\chocolatey\lib\qbs\tools\share\qbs\imports\qbs\ModUtils\utils.js:419
      C:\ProgramData\chocolatey\lib\qbs\tools\share\qbs\modules\cpp\CppModule.qbs:542
      C:\ProgramData\chocolatey\lib\qbs\tools\share\qbs\modules\cpp\CppModule.qbs:562 

      Attachments

        For Gerrit Dashboard: QBS-1761
        # Subject Branch Project Status CR V

        Activity

          People

            kandeler Christian Kandeler
            lbuckel Leon Buckel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes