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

Configuring SQL driver with CMake fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 6.8.1
    • Build System: CMake
    • None
    • x64
    • Windows

    Description

      After upgrading from Qt 6.8.0 to 6.8.1, when I try to configure and build the MySQL plugin following the official documentation, CMake fails and reports "No SBOM project name was set".

      I'm using cmd, called with args:

      /A /Q /K C:\Qt\6.8.1\msvc2022_64\bin\qtenv2.bat 

      After I use the command:

      "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" 

      and next, as the documentation says:

      qt-cmake -G Ninja C:\Qt\6.8.1\Src\qtbase\src\plugins\sqldrivers -DCMAKE_INSTALL_PREFIX=C:\Qt\6.8.1\msvc2022_64 -DMySQL_ROOT="C:\Program Files\MySQL\MySQL Server 8.0" 

      and CMake reports the error:

      CMake Error at C:/Qt/6.8.1/msvc2022_64/lib/cmake/Qt6/QtPublicSbomHelpers.cmake:2552 (message):
        No SBOM project name was set.
      Call Stack (most recent call first):
        C:/Qt/6.8.1/msvc2022_64/lib/cmake/Qt6/QtPublicSbomHelpers.cmake:2542 (_qt_internal_sbom_get_root_project_name_lower_case)
        C:/Qt/6.8.1/msvc2022_64/lib/cmake/Qt6/QtPublicSbomHelpers.cmake:2636 (_qt_internal_sbom_get_root_project_name_for_spdx_id)
        C:/Qt/6.8.1/msvc2022_64/lib/cmake/Qt6/QtPublicSbomHelpers.cmake:2603 (_qt_internal_sbom_generate_target_package_spdx_id)
        C:/Qt/6.8.1/msvc2022_64/lib/cmake/Qt6/QtPublicSbomHelpers.cmake:1926 (_qt_internal_sbom_record_target_spdx_id)
        C:/Qt/6.8.1/msvc2022_64/lib/cmake/Qt6/QtPluginHelpers.cmake:446 (_qt_internal_extend_sbom)
        mysql/CMakeLists.txt:8 (qt_internal_add_plugin) 

      I also tried avoiding specifying the MySQL_ROOT definition and the error was the same

      Attachments

        1. Screenshot.jpg
          232 kB
          Lorenzo Aldrighetti

        Issue Links

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

          Activity

            People

              qtbuildsystem Qt Build System Team
              lorenzoaldrighetti Lorenzo Aldrighetti
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes