https://bugs.kde.org/show_bug.cgi?id=500106

            Bug ID: 500106
           Summary: Breeze fails to build with Qt 6.8.2 due to double
                    definition of a CMake target during configuration
    Classification: Plasma
           Product: Breeze
           Version: git-stable-Plasma/6.3
          Platform: Microsoft Windows
                OS: Microsoft Windows
            Status: REPORTED
          Severity: major
          Priority: NOR
         Component: general
          Assignee: plasma-b...@kde.org
          Reporter: hernan.c.marti...@gmail.com
                CC: uhh...@gmail.com
  Target Milestone: ---

STEPS TO REPRODUCE
1. Using MSYS2's UCRT64 environment configure Breeze for building with CMake

OBSERVED RESULT
  -- The C compiler identification is Clang 19.1.7
  -- The CXX compiler identification is Clang 19.1.7
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: D:/M/msys64/clang64/bin/clang.exe - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: D:/M/msys64/clang64/bin/clang++.exe -
skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Looking for __GLIBC__
  -- Looking for __GLIBC__ - not found
  -- Performing Test HAVE_DATE_TIME
  -- Performing Test HAVE_DATE_TIME - Success
  -- Check if compiler accepts -pthread
  -- Check if compiler accepts -pthread - yes
  Installing in /clang64. Run C:/_/B/src/build-CLANG64/prefix.sh to set the
environment for breeze.
  -- Performing Test HAVE_STDATOMIC
  -- Performing Test HAVE_STDATOMIC - Success
  -- Found WrapAtomic: TRUE
  -- Found WrapVulkanHeaders: D:/M/msys64/clang64/include
  -- Found KF6CoreAddons:
D:/M/msys64/clang64/lib/cmake/KF6CoreAddons/KF6CoreAddonsConfig.cmake (found
version "6.10.0")
  -- Found KF6ColorScheme:
D:/M/msys64/clang64/lib/cmake/KF6ColorScheme/KF6ColorSchemeConfig.cmake (found
version "6.10.0")
  -- Found KF6Config:
D:/M/msys64/clang64/lib/cmake/KF6Config/KF6ConfigConfig.cmake (found version
"6.10.0")
  -- Found KF6GuiAddons:
D:/M/msys64/clang64/lib/cmake/KF6GuiAddons/KF6GuiAddonsConfig.cmake (found
version "6.10.0")
  -- Found Gettext: D:/M/msys64/clang64/bin/msgmerge.exe (found version
"0.23.1")
  -- Found KF6I18n: D:/M/msys64/clang64/lib/cmake/KF6I18n/KF6I18nConfig.cmake
(found version "6.10.0")
  -- Found KF6IconThemes:
D:/M/msys64/clang64/lib/cmake/KF6IconThemes/KF6IconThemesConfig.cmake (found
version "6.10.0")
  -- Found KF6WindowSystem:
D:/M/msys64/clang64/lib/cmake/KF6WindowSystem/KF6WindowSystemConfig.cmake
(found version "6.10.0")
  -- Found KF6: success (found suitable version "6.10.0", minimum required is
"6.10.0") found components: CoreAddons ColorScheme Config GuiAddons I18n
IconThemes WindowSystem
  Installing in /clang64. Run C:/_/B/src/build-CLANG64/prefix.sh to set the
environment for breeze.
  CMake Error at
D:/M/msys64/clang64/lib/cmake/Qt6EntryPointPrivate/Qt6EntryPointMinGW32Target.cmake:4
(add_library):
    add_library cannot create imported target "EntryPointMinGW32" because
    another target with the same name already exists.
  Call Stack (most recent call first):
   
D:/M/msys64/clang64/lib/cmake/Qt6EntryPointPrivate/Qt6EntryPointPrivateConfig.cmake:140
(include)
    D:/M/msys64/clang64/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76
(find_package)
    D:/M/msys64/clang64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:145
(find_dependency)
    D:/M/msys64/clang64/lib/cmake/Qt6Core/Qt6CoreDependencies.cmake:46
(_qt_internal_find_qt_dependencies)
    D:/M/msys64/clang64/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:45 (include)
    D:/M/msys64/clang64/lib/cmake/Qt6/Qt6Config.cmake:190 (find_package)
    cursors/src/kcursorgen/CMakeLists.txt:2 (find_package)


  CMake Error at
D:/M/msys64/clang64/lib/cmake/Qt6EntryPointPrivate/Qt6EntryPointMinGW32Target.cmake:6
(target_link_libraries):
    Cannot specify link libraries for target "EntryPointMinGW32" which is not
    built by this project.
  Call Stack (most recent call first):
   
D:/M/msys64/clang64/lib/cmake/Qt6EntryPointPrivate/Qt6EntryPointPrivateConfig.cmake:140
(include)
    D:/M/msys64/clang64/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76
(find_package)
    D:/M/msys64/clang64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:145
(find_dependency)
    D:/M/msys64/clang64/lib/cmake/Qt6Core/Qt6CoreDependencies.cmake:46
(_qt_internal_find_qt_dependencies)
    D:/M/msys64/clang64/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:45 (include)
    D:/M/msys64/clang64/lib/cmake/Qt6/Qt6Config.cmake:190 (find_package)
    cursors/src/kcursorgen/CMakeLists.txt:2 (find_package)


  CMake Warning at D:/M/msys64/clang64/lib/cmake/Qt6/Qt6Config.cmake:190
(find_package):
    Found package configuration file:

      D:/M/msys64/clang64/lib/cmake/Qt6Core/Qt6CoreConfig.cmake

    but it set Qt6Core_FOUND to FALSE so package "Qt6Core" is considered to be
    NOT FOUND.
  Call Stack (most recent call first):
    cursors/src/kcursorgen/CMakeLists.txt:2 (find_package)


  -- Configuring incomplete, errors occurred!
 -- The C compiler identification is Clang 19.1.7
  -- The CXX compiler identification is Clang 19.1.7
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: D:/M/msys64/clang64/bin/clang.exe - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: D:/M/msys64/clang64/bin/clang++.exe -
skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Looking for __GLIBC__
  -- Looking for __GLIBC__ - not found
  -- Performing Test HAVE_DATE_TIME
  -- Performing Test HAVE_DATE_TIME - Success
  -- Check if compiler accepts -pthread
  -- Check if compiler accepts -pthread - yes
  Installing in /clang64. Run C:/_/B/src/build-CLANG64/prefix.sh to set the
environment for breeze.
  -- Performing Test HAVE_STDATOMIC
  -- Performing Test HAVE_STDATOMIC - Success
  -- Found WrapAtomic: TRUE
  -- Found WrapVulkanHeaders: D:/M/msys64/clang64/include
  -- Found KF6CoreAddons:
D:/M/msys64/clang64/lib/cmake/KF6CoreAddons/KF6CoreAddonsConfig.cmake (found
version "6.10.0")
  -- Found KF6ColorScheme:
D:/M/msys64/clang64/lib/cmake/KF6ColorScheme/KF6ColorSchemeConfig.cmake (found
version "6.10.0")
  -- Found KF6Config:
D:/M/msys64/clang64/lib/cmake/KF6Config/KF6ConfigConfig.cmake (found version
"6.10.0")
  -- Found KF6GuiAddons:
D:/M/msys64/clang64/lib/cmake/KF6GuiAddons/KF6GuiAddonsConfig.cmake (found
version "6.10.0")
  -- Found Gettext: D:/M/msys64/clang64/bin/msgmerge.exe (found version
"0.23.1")
  -- Found KF6I18n: D:/M/msys64/clang64/lib/cmake/KF6I18n/KF6I18nConfig.cmake
(found version "6.10.0")
  -- Found KF6IconThemes:
D:/M/msys64/clang64/lib/cmake/KF6IconThemes/KF6IconThemesConfig.cmake (found
version "6.10.0")
  -- Found KF6WindowSystem:
D:/M/msys64/clang64/lib/cmake/KF6WindowSystem/KF6WindowSystemConfig.cmake
(found version "6.10.0")
  -- Found KF6: success (found suitable version "6.10.0", minimum required is
"6.10.0") found components: CoreAddons ColorScheme Config GuiAddons I18n
IconThemes WindowSystem
  Installing in /clang64. Run C:/_/B/src/build-CLANG64/prefix.sh to set the
environment for breeze.
  CMake Error at
D:/M/msys64/clang64/lib/cmake/Qt6EntryPointPrivate/Qt6EntryPointMinGW32Target.cmake:4
(add_library):
    add_library cannot create imported target "EntryPointMinGW32" because
    another target with the same name already exists.
  Call Stack (most recent call first):
   
D:/M/msys64/clang64/lib/cmake/Qt6EntryPointPrivate/Qt6EntryPointPrivateConfig.cmake:140
(include)
    D:/M/msys64/clang64/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76
(find_package)
    D:/M/msys64/clang64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:145
(find_dependency)
    D:/M/msys64/clang64/lib/cmake/Qt6Core/Qt6CoreDependencies.cmake:46
(_qt_internal_find_qt_dependencies)
    D:/M/msys64/clang64/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:45 (include)
    D:/M/msys64/clang64/lib/cmake/Qt6/Qt6Config.cmake:190 (find_package)
    cursors/src/kcursorgen/CMakeLists.txt:2 (find_package)


  CMake Error at
D:/M/msys64/clang64/lib/cmake/Qt6EntryPointPrivate/Qt6EntryPointMinGW32Target.cmake:6
(target_link_libraries):
    Cannot specify link libraries for target "EntryPointMinGW32" which is not
    built by this project.
  Call Stack (most recent call first):
   
D:/M/msys64/clang64/lib/cmake/Qt6EntryPointPrivate/Qt6EntryPointPrivateConfig.cmake:140
(include)
    D:/M/msys64/clang64/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76
(find_package)
    D:/M/msys64/clang64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:145
(find_dependency)
    D:/M/msys64/clang64/lib/cmake/Qt6Core/Qt6CoreDependencies.cmake:46
(_qt_internal_find_qt_dependencies)
    D:/M/msys64/clang64/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:45 (include)
    D:/M/msys64/clang64/lib/cmake/Qt6/Qt6Config.cmake:190 (find_package)
    cursors/src/kcursorgen/CMakeLists.txt:2 (find_package)


  CMake Warning at D:/M/msys64/clang64/lib/cmake/Qt6/Qt6Config.cmake:190
(find_package):
    Found package configuration file:

      D:/M/msys64/clang64/lib/cmake/Qt6Core/Qt6CoreConfig.cmake

    but it set Qt6Core_FOUND to FALSE so package "Qt6Core" is considered to be
    NOT FOUND.
  Call Stack (most recent call first):
    cursors/src/kcursorgen/CMakeLists.txt:2 (find_package)


  -- Configuring incomplete, errors occurred!

EXPECTED RESULT
The project is correctly configured for building.

SOFTWARE/OS VERSIONS
Windows: 11
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.2

ADDITIONAL INFORMATION
This is my suspcion:
-----------------------------------------------------------------------------------------------------
    unset(QUERY_EXECUTABLE CACHE)
endfunction()   < ----  #1 Once we get here, Qt6Core_FOUND is set to 1, but
this line clears it
if(BUILD_QT6)
    build_Qt6()
endif()

function(build_colors_and_cursors)
    # While it is technically not 100% correct to use versionless
    # KDEInstallDirs while (maybe) building for both Qt versions,
    # it doesn't really matter at the end, because colors and cursors
    # only use ICONDIR and DATADIR which both do not depend on the version
    include(KDEInstallDirs)
    add_subdirectory(colors)
    add_subdirectory(cursors) < --- #3 This looks for Qt6:Core again, with an
unset `Qt6Core_FOUND` which in turn gets to that point where
Qt6EntryPointPrivateConfig.cmake is called again.
endfunction()

build_colors_and_cursors() <----- #2 this is called

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to