Bug 456289 - Build error from git with QT6
Summary: Build error from git with QT6
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Compilation (show other bugs)
Version: 8.2.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-03 17:56 UTC by maderios
Modified: 2023-09-07 12:17 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.2.0


Attachments
CMake Error: The INTERFACE_QT_MAJOR_VERSION property of "Qt5::Core" does not agree... (44.25 KB, text/plain)
2022-07-05 20:01 UTC, maderios
Details
build-dk-error (46.44 KB, text/plain)
2022-07-07 16:34 UTC, maderios
Details

Note You need to log in before you can comment on or make changes to this bug.
Description maderios 2022-07-03 17:56:26 UTC
Hi
I don't know if it's real bug

-- The CXX compiler identification is GNU 12.1.0

-- The C compiler identification is GNU 12.1.0

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Check for working CXX compiler: /usr/lib/ccache/bin/c++ - skipped

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Check for working C compiler: /usr/lib/ccache/bin/cc - skipped

-- Detecting C compile features

-- Detecting C compile features - done

-- ----------------------------------------------------------------------------------

-- Starting CMake configuration for digikam
-- Installing in the same prefix as Qt, adopting their path scheme.
-- Setting build type to 'Debug' as none was specified.
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - found

-- Performing Test _OFFT_IS_64BIT

-- Performing Test _OFFT_IS_64BIT - Success

-- Performing Test HAVE_DATE_TIME
-- Performing Test HAVE_DATE_TIME - Success
-- Application translations directory is missing. Compilation of application translations is disabled...
-- You can use DIGIKAMSC_CHECKOUT_PO option to extract GUI i18n files from git repositories.
-- Main one documentation directory is missing. Compilation of documentation is disabled...
-- Documentation translations directory is missing.
-- You can use DIGIKAMSC_CHECKOUT_DOC option to extract doc i18n files from git repositories.
-- Top level compilation configuration for digikam

-- digikam will be compiled....................... YES
-- Extract application translations files......... NO
-- Extract documentation translations files....... NO
-- Translations will be compiled.................. NO
-- Handbooks will be compiled..................... NO
-- Tests code will be compiled.................... NO
-- Check dependencies for digikam version 8.0.0-git
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Suitable Qt6 >= 6.2.3 detected...
-- Found Threads: TRUE  
-- Found OpenGL: /usr/lib/libOpenGL.so   
-- Found WrapOpenGL: TRUE  
-- Found XKB: /usr/lib/libxkbcommon.so (found suitable version "1.4.1", minimum required is "0.5.0") 
-- Found WrapVulkanHeaders: /usr/include  

[31mCMake Error at /usr/lib64/cmake/Qt6Qml/Qt6QmlMacros.cmake:2092 (message):

  qt_generate_foreign_qml_types() is only available in Qt 6.

Call Stack (most recent call first):

  /usr/lib64/cmake/Qt6Qml/Qt6QmlConfig.cmake:125 (include)

  /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)

  /usr/lib64/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)

  /usr/lib64/cmake/Qt6Quick/Qt6QuickDependencies.cmake:96 (_qt_internal_find_dependencies)

  /usr/lib64/cmake/Qt6Quick/Qt6QuickConfig.cmake:50 (include)

  /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)

  /usr/lib64/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)

  /usr/lib64/cmake/Qt6WebEngineCore/Qt6WebEngineCoreDependencies.cmake:96 (_qt_internal_find_dependencies)

  /usr/lib64/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfig.cmake:50 (include)

  /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)

  /usr/lib64/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)

  /usr/lib64/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsDependencies.cmake:96 (_qt_internal_find_dependencies)

  /usr/lib64/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake:50 (include)

  /usr/lib64/cmake/Qt6/Qt6Config.cmake:223 (find_package)

  core/cmake/rules/RulesQtFramework.cmake:22 (find_package)

  core/CMakeLists.txt:43 (include)

[33mCMake Warning at /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):

  Found package configuration file:



    /usr/lib64/cmake/Qt6Quick/Qt6QuickConfig.cmake



  but it set Qt6Quick_FOUND to FALSE so package "Qt6Quick" is considered to

  be NOT FOUND.

Call Stack (most recent call first):

  /usr/lib64/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)

  /usr/lib64/cmake/Qt6WebEngineCore/Qt6WebEngineCoreDependencies.cmake:96 (_qt_internal_find_dependencies)

  /usr/lib64/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfig.cmake:50 (include)

  /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)

  /usr/lib64/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)

  /usr/lib64/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsDependencies.cmake:96 (_qt_internal_find_dependencies)

  /usr/lib64/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake:50 (include)

  /usr/lib64/cmake/Qt6/Qt6Config.cmake:223 (find_package)

  core/cmake/rules/RulesQtFramework.cmake:22 (find_package)

  core/CMakeLists.txt:43 (include)



[33mCMake Warning at /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):

  Found package configuration file:



    /usr/lib64/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfig.cmake



  but it set Qt6WebEngineCore_FOUND to FALSE so package "Qt6WebEngineCore" is

  considered to be NOT FOUND.

Call Stack (most recent call first):

  /usr/lib64/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)

  /usr/lib64/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsDependencies.cmake:96 (_qt_internal_find_dependencies)

  /usr/lib64/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake:50 (include)

  /usr/lib64/cmake/Qt6/Qt6Config.cmake:223 (find_package)

  core/cmake/rules/RulesQtFramework.cmake:22 (find_package)

  core/CMakeLists.txt:43 (include)

[33mCMake Warning at /usr/lib64/cmake/Qt6/Qt6Config.cmake:223 (find_package):

  Found package configuration file:
/usr/lib64/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake

but it set Qt6WebEngineWidgets_FOUND to FALSE so package
"Qt6WebEngineWidgets" is considered to be NOT FOUND.
Call Stack (most recent call first):
  core/cmake/rules/RulesQtFramework.cmake:22 (find_package)
 core/CMakeLists.txt:43 (include)

-- Configuring incomplete, errors occurred!
Comment 1 caulier.gilles 2022-07-03 17:59:57 UTC
It's simple: Qt6::WebEngineWidgets devel package is missing on your computer...
Comment 2 maderios 2022-07-03 20:36:16 UTC
(In reply to caulier.gilles from comment #1)
> It's simple: Qt6::WebEngineWidgets devel package is missing on your
> computer...

I can't find package with "WebEngineWidgets" and WebEngineWebkit" anywhere... 
All Arch QT6 beta packages are installed on my computer ('kde-unstable' Arch repository).  
May you tell me which package containing "WebEngineWidgets" and WebEngineWebkit" is/are installed on your computer?
I guess it comes from here https://doc.qt.io/qt-6/qtwidgets-index.html
Thanks
Comment 3 Maik Qualmann 2022-07-03 20:50:59 UTC
Your missing devel package has nothing to do with Qt Widgets, it has to do with QWebEngine. Just as an example, here under openSUSE the package is called "qt6-webenginewidgets-devel"

Maik
Comment 4 maderios 2022-07-03 21:12:19 UTC
(In reply to Maik Qualmann from comment #3)
> Your missing devel package has nothing to do with Qt Widgets, it has to do
> with QWebEngine. Just as an example, here under openSUSE the package is
> called "qt6-webenginewidgets-devel"
> 
> Maik
qt6-webengine 6.4 is already installed on my system
See package content here. I don't understand why it's not found at compilation...
https://archlinux.org/packages/kde-unstable/x86_64/qt6-webengine/
usr/lib/cmake/Qt6WebEngineWidgets/
usr/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsAdditionalTargetInfo.cmake
usr/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake
usr/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfigVersion.cmake
usr/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfigVersionImpl.cmake
usr/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsDependencies.cmake
usr/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsTargets-relwithdebinfo.cmake
usr/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsTargets.cmake
usr/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsVersionlessTargets.cmake

usr/lib/libQt6WebEngineWidgets.prl
usr/lib/libQt6WebEngineWidgets.so
usr/lib/libQt6WebEngineWidgets.so.6
usr/lib/libQt6WebEngineWidgets.so.6.4.0

usr/lib/metatypes/qt6webenginewidgets_relwithdebinfo_metatypes.json
Comment 5 Maik Qualmann 2022-07-04 05:57:34 UTC
Are there any Qt5 QWebEngine developer packages still installed?

Maik
Comment 6 maderios 2022-07-04 08:26:35 UTC
(In reply to Maik Qualmann from comment #5)
> Are there any Qt5 QWebEngine developer packages still installed?
> 
> Maik
Yes, qt5-webengine 5.15.10-2 Arch package is installed. I can't uninstall it because it breakes dependencies for other softwares, Calibre,Sigil, etc...
Comment 7 Maik Qualmann 2022-07-04 09:28:01 UTC
You are confusing packages with developer packages, of course libraries from Qt5 can be installed. Just no "devel" packages. Arch will surely have a separation between packages and developer packages.

Maik
Comment 8 maderios 2022-07-04 10:18:11 UTC
(In reply to Maik Qualmann from comment #7)
> You are confusing packages with developer packages, of course libraries from
> Qt5 can be installed. Just no "devel" packages. Arch will surely have a
> separation between packages and developer packages.
There is no "devel" separate packages in Arch like in Debian or other distro. I used in the past many other distro, we had to be careful to install "devel" separate packages to build. Happily, this this is no longer the case with Arch. 
Three qt webengine versions in official Arch repositories:
https://archlinux.org/packages/extra/x86_64/qt5-webengine/
https://archlinux.org/packages/extra/x86_64/qt6-webengine/
https://archlinux.org/packages/kde-unstable/x86_64/qt6-webengine/
Comment 9 Maik Qualmann 2022-07-04 10:34:16 UTC
The Qt6Quick package is initially reported as not found, is it there?

Maik
Comment 10 maderios 2022-07-04 12:14:27 UTC
(In reply to Maik Qualmann from comment #9)
> The Qt6Quick package is initially reported as not found, is it there?
> 
> Maik

Yesterday, I installed all official qt6 packages (not beta)  i could, so, i think it's installed now but with other name than 'Qt6Quick'
Installed packages on my PC with 'qt6 quick keyword':
extra/qt6-declarative 6.3.1-1 (qt6) [installed]
    Classes for QML and JavaScript languages
extra/qt6-quick3d 6.3.1-1 (qt6) [installed]
    Qt module and API for defining 3D content in Qt Quick
extra/qt6-quicktimeline 6.3.1-1 (qt6) [installed]
    Qt module for keyframe-based timeline construction
extra/qt6-shadertools 6.3.1-1 (qt6) [installed]
    Provides functionality for the shader pipeline that allows Qt Quick to operate on Vulkan, Metal, and Direct3D, in addition to OpenGL

#####
New compilation try today

-- The CXX compiler identification is GNU 12.1.0
-- The C compiler identification is GNU 12.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/ccache/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib/ccache/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- ----------------------------------------------------------------------------------
-- Starting CMake configuration for digikam
-- 
-- Installing in the same prefix as Qt, adopting their path scheme.
-- Setting build type to 'Debug' as none was specified.
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - found
-- Performing Test _OFFT_IS_64BIT
-- Performing Test _OFFT_IS_64BIT - Success
-- Performing Test HAVE_DATE_TIME
-- Performing Test HAVE_DATE_TIME - Success
-- Application translations directory is missing. Compilation of application translations is disabled...
-- You can use DIGIKAMSC_CHECKOUT_PO option to extract GUI i18n files from git repositories.
-- Main one documentation directory is missing. Compilation of documentation is disabled...
-- Documentation translations directory is missing.
-- You can use DIGIKAMSC_CHECKOUT_DOC option to extract doc i18n files from git repositories.
-- ----------------------------------------------------------------------------------
-- Top level compilation configuration for digikam
-- 
-- digikam will be compiled....................... YES
-- Extract application translations files......... NO
-- Extract documentation translations files....... NO
-- Translations will be compiled.................. NO
-- Handbooks will be compiled..................... NO
-- Tests code will be compiled.................... NO
-- ----------------------------------------------------------------------------------
-- Check dependencies for digikam version 8.0.0-git
-- 
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Suitable Qt6 >= 6.2.3 detected...
-- Found Threads: TRUE  
-- Found OpenGL: /usr/lib/libOpenGL.so   
-- Found WrapOpenGL: TRUE  
-- Found XKB: /usr/lib/libxkbcommon.so (found suitable version "1.4.1", minimum required is "0.5.0") 
-- Found WrapVulkanHeaders: /usr/include  
-- Could NOT find Qt6WebKitWidgets (missing: Qt6WebKitWidgets_DIR)
[31mCMake Error at core/cmake/rules/RulesQtFramework.cmake:30 (find_package):
  Found package configuration file:

    /usr/lib64/cmake/Qt6/Qt6Config.cmake

  but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
  FOUND.  Reason given by package:

  Failed to find Qt component "WebKitWidgets".

  Expected Config file at
  "/usr/lib64/cmake/Qt6WebKitWidgets/Qt6WebKitWidgetsConfig.cmake" does NOT
  exist
Comment 11 Maik Qualmann 2022-07-04 12:34:38 UTC
You must compile digiKam Qt6 with QWebEngine, not QWebKit.

Maik
Comment 12 maderios 2022-07-04 13:13:15 UTC


(In reply to Maik Qualmann from comment #11)
> You must compile digiKam Qt6 with QWebEngine, not QWebKit.
> 

In my script now:
    -DENABLE_QWEBENGINE=ON
    -DENABLE_QWEBKIT=OFF

It doesn't find 'Qt6WebEngineWidgets' but after checking, i see it's installed on my computer. 
I think it happens because I have 2 qwebengine versions, qt6 and qt5, installed in same time on my PC
Maybe, there's a way to choose only qt6 version before building, i don't know...

-- The CXX compiler identification is GNU 12.1.0
-- The C compiler identification is GNU 12.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/ccache/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib/ccache/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- ----------------------------------------------------------------------------------
-- Starting CMake configuration for digikam
-- 
-- Installing in the same prefix as Qt, adopting their path scheme.
-- Setting build type to 'Debug' as none was specified.
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - found
-- Performing Test _OFFT_IS_64BIT
-- Performing Test _OFFT_IS_64BIT - Success
-- Performing Test HAVE_DATE_TIME
-- Performing Test HAVE_DATE_TIME - Success
-- Application translations directory is missing. Compilation of application translations is disabled...
-- You can use DIGIKAMSC_CHECKOUT_PO option to extract GUI i18n files from git repositories.
-- Main one documentation directory is missing. Compilation of documentation is disabled...
-- Documentation translations directory is missing.
-- You can use DIGIKAMSC_CHECKOUT_DOC option to extract doc i18n files from git repositories.
-- ----------------------------------------------------------------------------------
-- Top level compilation configuration for digikam
-- 
-- digikam will be compiled....................... YES
-- Extract application translations files......... NO
-- Extract documentation translations files....... NO
-- Translations will be compiled.................. NO
-- Handbooks will be compiled..................... NO
-- Tests code will be compiled.................... NO
-- ----------------------------------------------------------------------------------
-- Check dependencies for digikam version 8.0.0-git
-- 
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Suitable Qt6 >= 6.2.3 detected...
-- Found Threads: TRUE  
-- Found OpenGL: /usr/lib/libOpenGL.so   
-- Found WrapOpenGL: TRUE  
-- Found XKB: /usr/lib/libxkbcommon.so (found suitable version "1.4.1", minimum required is "0.5.0") 
-- Found WrapVulkanHeaders: /usr/include  
[31mCMake Error at /usr/lib64/cmake/Qt6Qml/Qt6QmlMacros.cmake:2092 (message):
  qt_generate_foreign_qml_types() is only available in Qt 6.
Call Stack (most recent call first):
  /usr/lib64/cmake/Qt6Qml/Qt6QmlConfig.cmake:125 (include)
  /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
  /usr/lib64/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)
  /usr/lib64/cmake/Qt6Quick/Qt6QuickDependencies.cmake:96 (_qt_internal_find_dependencies)
  /usr/lib64/cmake/Qt6Quick/Qt6QuickConfig.cmake:50 (include)
  /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
  /usr/lib64/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)
  /usr/lib64/cmake/Qt6WebEngineCore/Qt6WebEngineCoreDependencies.cmake:96 (_qt_internal_find_dependencies)
  /usr/lib64/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfig.cmake:50 (include)
  /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
  /usr/lib64/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)
  /usr/lib64/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsDependencies.cmake:96 (_qt_internal_find_dependencies)
  /usr/lib64/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake:50 (include)
  /usr/lib64/cmake/Qt6/Qt6Config.cmake:223 (find_package)
  core/cmake/rules/RulesQtFramework.cmake:22 (find_package)
  core/CMakeLists.txt:43 (include)

[0m
[33mCMake Warning at /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
  Found package configuration file:

    /usr/lib64/cmake/Qt6Quick/Qt6QuickConfig.cmake

  but it set Qt6Quick_FOUND to FALSE so package "Qt6Quick" is considered to
  be NOT FOUND.
Call Stack (most recent call first):
  /usr/lib64/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)
  /usr/lib64/cmake/Qt6WebEngineCore/Qt6WebEngineCoreDependencies.cmake:96 (_qt_internal_find_dependencies)
  /usr/lib64/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfig.cmake:50 (include)
  /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
  /usr/lib64/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)
  /usr/lib64/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsDependencies.cmake:96 (_qt_internal_find_dependencies)
  /usr/lib64/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake:50 (include)
  /usr/lib64/cmake/Qt6/Qt6Config.cmake:223 (find_package)
  core/cmake/rules/RulesQtFramework.cmake:22 (find_package)
  core/CMakeLists.txt:43 (include)

[0m
[33mCMake Warning at /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
  Found package configuration file:

    /usr/lib64/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfig.cmake

  but it set Qt6WebEngineCore_FOUND to FALSE so package "Qt6WebEngineCore" is
  considered to be NOT FOUND.
Call Stack (most recent call first):
  /usr/lib64/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)
  /usr/lib64/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsDependencies.cmake:96 (_qt_internal_find_dependencies)
  /usr/lib64/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake:50 (include)
  /usr/lib64/cmake/Qt6/Qt6Config.cmake:223 (find_package)
  core/cmake/rules/RulesQtFramework.cmake:22 (find_package)
  core/CMakeLists.txt:43 (include)

CMake Warning at /usr/lib64/cmake/Qt6/Qt6Config.cmake:223 (find_package):
  Found package configuration file:

    /usr/lib64/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake

  but it set Qt6WebEngineWidgets_FOUND to FALSE so package
  "Qt6WebEngineWidgets" is considered to be NOT FOUND.
Call Stack (most recent call first):
  core/cmake/rules/RulesQtFramework.cmake:22 (find_package)
  core/CMakeLists.txt:43 (include)
-- Configuring incomplete, errors occurred!
Comment 13 maderios 2022-07-05 12:48:44 UTC
Files on my computer:
 locate Qt6WebEngineWidgets
/usr/lib/libQt6WebEngineWidgets.prl
/usr/lib/libQt6WebEngineWidgets.so
/usr/lib/libQt6WebEngineWidgets.so.6
/usr/lib/libQt6WebEngineWidgets.so.6.3.1
/usr/lib/cmake/Qt6WebEngineWidgets
/usr/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsAdditionalTargetInfo.cmake
/usr/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake
/usr/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfigVersion.cmake
/usr/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfigVersionImpl.cmake
/usr/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsDependencies.cmake
/usr/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsTargets-relwithdebinfo.cmake
/usr/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsTargets.cmake
/usr/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsVersionlessTargets.cmake
/usr/lib/pkgconfig/Qt6WebEngineWidgets.pc
Comment 14 Maik Qualmann 2022-07-05 12:55:57 UTC
/usr/lib64/cmake/Qt6Quick/Qt6QuickConfig.cmake
but it set Qt6Quick_FOUND to FALSE so package "Qt6Quick" is considered to be NOT FOUND.

/usr/lib64/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfig.cmake
but it set Qt6WebEngineCore_FOUND to FALSE so package "Qt6WebEngineCore" is considered to be NOT FOUND.

/usr/lib64/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake
but it set Qt6WebEngineWidgets_FOUND to FALSE so package "Qt6WebEngineWidgets" is considered to be NOT FOUND.

Maik
Comment 15 caulier.gilles 2022-07-05 12:56:29 UTC
header files for developement purpose are missing.

So a devel package must be installed

Gilles Caulier
Comment 16 Maik Qualmann 2022-07-05 12:58:49 UTC
Arch Linux actually has no "devel" packages, all include files and cmake files are in the normal packages.

Maik
Comment 17 maderios 2022-07-05 13:51:11 UTC
(In reply to Maik Qualmann from comment #14)
> /usr/lib64/cmake/Qt6Quick/Qt6QuickConfig.cmake
> but it set Qt6Quick_FOUND to FALSE so package "Qt6Quick" is considered to be
> NOT FOUND.
> 
> /usr/lib64/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfig.cmake
> but it set Qt6WebEngineCore_FOUND to FALSE so package "Qt6WebEngineCore" is
> considered to be NOT FOUND.
> 
> /usr/lib64/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake
> but it set Qt6WebEngineWidgets_FOUND to FALSE so package
> "Qt6WebEngineWidgets" is considered to be NOT FOUND.
> 
> Maik

Yes but these  files are on my computer:

locate Qt6QuickConfig.cmake
/usr/lib/cmake/Qt6Quick/Qt6QuickConfig.cmake

locate Qt6WebEngineCore
/usr/lib/libQt6WebEngineCore.prl
/usr/lib/libQt6WebEngineCore.so
/usr/lib/libQt6WebEngineCore.so.6
/usr/lib/libQt6WebEngineCore.so.6.3.1
/usr/lib/cmake/Qt6WebEngineCore
/usr/lib/cmake/Qt6WebEngineCoreTools
/usr/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreAdditionalTargetInfo.cmake
/usr/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfig.cmake
/usr/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfigVersion.cmake
/usr/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfigVersionImpl.cmake
/usr/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreDependencies.cmake
/usr/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreMacros.cmake
/usr/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreTargets-relwithdebinfo.cmake
/usr/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreTargets.cmake
/usr/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreVersionlessTargets.cmake
/usr/lib/cmake/Qt6WebEngineCoreTools/Qt6WebEngineCoreToolsAdditionalTargetInfo.cmake
/usr/lib/cmake/Qt6WebEngineCoreTools/Qt6WebEngineCoreToolsConfig.cmake
/usr/lib/cmake/Qt6WebEngineCoreTools/Qt6WebEngineCoreToolsConfigVersion.cmake
/usr/lib/cmake/Qt6WebEngineCoreTools/Qt6WebEngineCoreToolsConfigVersionImpl.cmake
/usr/lib/cmake/Qt6WebEngineCoreTools/Qt6WebEngineCoreToolsDependencies.cmake
/usr/lib/cmake/Qt6WebEngineCoreTools/Qt6WebEngineCoreToolsTargets-relwithdebinfo.cmake
/usr/lib/cmake/Qt6WebEngineCoreTools/Qt6WebEngineCoreToolsTargets.cmake
/usr/lib/cmake/Qt6WebEngineCoreTools/Qt6WebEngineCoreToolsVersionlessTargets.cmake
/usr/lib/pkgconfig/Qt6WebEngineCore.pc

locate Qt6WebEngineWidgetsConfig.cmake
/usr/lib/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake
Comment 18 Maik Qualmann 2022-07-05 14:42:58 UTC
This is just a guess now, I think the Arch Qt6WebEngine packages are buggy. Cmake searches in /usr/lib64. However, the packages are installed in /usr/lib.

Maik
Comment 19 Maik Qualmann 2022-07-05 15:05:19 UTC
But you have already created a clean build and deleted the build directory beforehand?

Maik
Comment 20 maderios 2022-07-05 15:59:47 UTC
I launch compilation with 'makepkg -cC'  option to clean before as i do each time I build. 
By caution,  I just deleted build directory like you ask, it changes nothing, i get same error :

CMake Warning at /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
  Found package configuration file:

    /usr/lib64/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfig.cmake

  but it set Qt6WebEngineCore_FOUND to FALSE so package "Qt6WebEngineCore" is
  considered to be NOT FOUND.
Call Stack (most recent call first):
  /usr/lib64/cmake/Qt6/QtPublicDependencyHelpers.cmake:14 (find_dependency)
  /usr/lib64/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsDependencies.cmake:96 (_qt_internal_find_dependencies)
  /usr/lib64/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake:50 (include)
  /usr/lib64/cmake/Qt6/Qt6Config.cmake:223 (find_package)
  core/cmake/rules/RulesQtFramework.cmake:22 (find_package)
  core/CMakeLists.txt:43 (include)


CMake Warning at /usr/lib64/cmake/Qt6/Qt6Config.cmake:223 (find_package):
  Found package configuration file:

    /usr/lib64/cmake/Qt6WebEngineWidgets/Qt6WebEngineWidgetsConfig.cmake

  but it set Qt6WebEngineWidgets_FOUND to FALSE so package
  "Qt6WebEngineWidgets" is considered to be NOT FOUND.
Call Stack (most recent call first):
  core/cmake/rules/RulesQtFramework.cmake:22 (find_package)
  core/CMakeLists.txt:43 (include)
Comment 21 Antonio Rojas 2022-07-05 16:41:14 UTC
You're looking at the wrong place. You need to look at the cmake *error*, not the cmake *warnings*

CMake Error at /usr/lib64/cmake/Qt6Qml/Qt6QmlMacros.cmake:2092 (message):
  qt_generate_foreign_qml_types() is only available in Qt 6.

Pass -DQT_MAJOR_VERSION=6 to cmake.
Comment 22 maderios 2022-07-05 20:01:06 UTC
Created attachment 150425 [details]
CMake Error: The INTERFACE_QT_MAJOR_VERSION property of "Qt5::Core" does not agree...
Comment 23 maderios 2022-07-05 20:03:02 UTC
(In reply to Antonio Rojas from comment #21)
> You're looking at the wrong place. You need to look at the cmake *error*,
> not the cmake *warnings*
> 
> CMake Error at /usr/lib64/cmake/Qt6Qml/Qt6QmlMacros.cmake:2092 (message):
>   qt_generate_foreign_qml_types() is only available in Qt 6.
> 
> Pass -DQT_MAJOR_VERSION=6 to cmake.

I passed ' -DQT_MAJOR_VERSION=6 to cmake' but i get many errors, see attachment
Comment 24 maderios 2022-07-07 08:41:41 UTC
The problem comes from QT5 is found before QT6
CMake Error: The INTERFACE_QT_MAJOR_VERSION property of "Qt5::Core" does
not agree with the value of QT_MAJOR_VERSION already determined
for "app".
I find similar issue here 
https://bugreports.qt.io/browse/QTBUG-97097
Comment 25 caulier.gilles 2022-07-07 08:48:26 UTC
Here i compile digiKam with Qt6 with a VM where Qt5 is not installed at all. I don't use Plasma desktop but XFCE.

Linux is Mageia 8 where i compile the whole necessary for the AppImage, this include last Qt6 version 6.3.1 and KF5 framework 5.95.

No problem to configure digiKam with Cmake.
Best

Gilles Caulier
Comment 26 maderios 2022-07-07 09:12:17 UTC
Issue happens because, like in all distributions,  there is two QT version installed in same time on computer, QT5 and QT6. I know removing QT5 should solve this issue but I need to keep it because many packages depend on QT5 on my computer. 
On the other hand, i know building Digikam with QT6 is experimental...
Comment 27 caulier.gilles 2022-07-07 09:24:27 UTC
The mix between Qt5 and Qt6 is possible if :

1/ Qt5 devel packages are not installed (only binary and data files)
2/ Qt6 devel packages are installed (and of course binaries and data)

With Arch Linux, if i understand well, there is no separated package because binaries, data, and devel files are always installed...

So you must to find a way to uninstall Qt5 devel files under Arch Linux...

Gilles
Comment 28 maderios 2022-07-07 09:59:45 UTC
(In reply to caulier.gilles from comment #27)
> The mix between Qt5 and Qt6 is possible if :
> 
> 1/ Qt5 devel packages are not installed (only binary and data files)
> 2/ Qt6 devel packages are installed (and of course binaries and data)
> 
> With Arch Linux, if i understand well, there is no separated package because
> binaries, data, and devel files are always installed...
> 
> So you must to find a way to uninstall Qt5 devel files under Arch Linux...
> 
> Gilles

This not the solution because it doesn't respect  Arch rules.  
In Arch Linux, mkvtoolnix-gui is successfully built with QT6 (with QT5 installed in same time) but it doesn't use cmake
https://archlinux.org/packages/extra/x86_64/mkvtoolnix-gui/
The build script:
https://github.com/archlinux/svntogit-packages/blob/packages/mkvtoolnix/trunk/PKGBUILD
Comment 29 maderios 2022-07-07 13:26:09 UTC
It's not Cmake problem: I just built avidemux-qt6-git successfully. No problem with Cmake and two QT versions 5 and 6  installed on my Arch system
https://aur.archlinux.org/packages/avidemux-qt6-git
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=avidemux-git
Comment 30 Maik Qualmann 2022-07-07 13:50:14 UTC
Do you use parts of our bootstrap.linux script? I see it correctly that there are no /usr/lib64 exists under Arch with an X86_64 architecture?
I see again and again in your messages /usr/lib64. We have a coding in the bootstrap.linux script to /usr/lib64 if we find X86_64.

Maik
Comment 31 caulier.gilles 2022-07-07 13:54:19 UTC
Git commit 09ab7ba9725eae391212469fed692429fc780385 by Gilles Caulier.
Committed on 07/07/2022 at 13:52.
Pushed by cgilles into branch 'master'.

force Qt6 detection with BUILD_WITH_QT6 cmake flag used at configuration time
if Qt6 is not found, report and error and stop the configuration.
Do not mix Qt5 and Qt6 detection.

M  +8    -8    core/cmake/rules/RulesFindQtCore.cmake

https://invent.kde.org/graphics/digikam/commit/09ab7ba9725eae391212469fed692429fc780385
Comment 32 caulier.gilles 2022-07-07 14:04:01 UTC
Git commit 10260226fcf94469630dd63a6d0bd8aa443d1448 by Gilles Caulier.
Committed on 07/07/2022 at 14:03.
Pushed by cgilles into branch 'master'.

Document BUILD_WITH_QT6 cmake option

M  +1    -0    Mainpage.dox
M  +1    -0    core/cmake/rules/RulesOptionDefinitions.cmake

https://invent.kde.org/graphics/digikam/commit/10260226fcf94469630dd63a6d0bd8aa443d1448
Comment 33 caulier.gilles 2022-07-07 14:40:23 UTC
Maderios,

With my last commits to build with Qt6 you must force to ON the BUILD_WITH_QT6 cmake flag at configuration time.
If Qt6 is found Qt5 is never checked.
If Qt6 is not found, configuration will stop with an error.

Gilles
Comment 34 maderios 2022-07-07 16:00:50 UTC
(The option '-DQT_MAJOR_VERSION=6'  give same previous errors  so i dropped it)

After your commit, QT6 is not detected 
Beginning:
-- Suitable Qt5 >= 5.14.0 detected ($QT_VERSION)..

Error at the end:
-- Doxygen is found.......................... TRUE
-- Graphviz Dot is found..................... YES
-- To build API documentation use 'make doc'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/fre/ARCH-AUR/digikam-qt6-git/src/build
/home/fre/ARCH-AUR/digikam-qt6-git/PKGBUILD: line 26: -DBUILD_WITH_QT6=ON: command not found

Options in my script:
build() {
    cmake  -B build -S ${_pkgname} \
    -DBUILD_WITH_QT6=ON  \
    -DQT_MAJOR_VERSION=6 \
    -DBUILD_TESTING=OFF \
    -DBUILD_WITH_CCACHE=ON \
    -DENABLE_KFILEMETADATASUPPORT=ON \
    -DENABLE_MEDIAPLAYER=ON \
    -DENABLE_DBUS=ON \
    -DENABLE_AKONADICONTACTSUPPORT=OFF \
    -DENABLE_MYSQLSUPPORT=ON \
    -DENABLE_APPSTYLES=ON \
    -DENABLE_QWEBENGINE=ON \
    -DENABLE_APPSTYLES=ON
    
     cmake --build build
Comment 35 maderios 2022-07-07 16:10:37 UTC
Mistake, i forgot to delete line ' -DQT_MAJOR_VERSION=6'  
After deleting it, QT6 is detected but compilation stops  with many errors like below
-- Found Threads: TRUE  
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE  
-- Suitable Qt6 >= 6.2.3 detected ($QT_VERSION)...


-- Configuring done
CMake Error: The INTERFACE_QT_MAJOR_VERSION property of "Qt5::Core" does
not agree with the value of QT_MAJOR_VERSION already determined
for "app".
Comment 36 caulier.gilles 2022-07-07 16:11:18 UTC
Impossible. The Qt6 only must be checked on your system. Qt5 is dropped at all.
Clean cmake cache for the project and try again.

Gilles
Comment 37 maderios 2022-07-07 16:34:18 UTC
Created attachment 150472 [details]
build-dk-error

Same errors after deleting cmake cache, see attached file 
Qt6 is well detected, not Qt5
but 6.2.3 QT version ! (6.3.1 is installed....)
Comment 38 maderios 2022-07-08 06:56:40 UTC
I'm wondering why it detects Qt6 6.2.3 when 6.3.1 is installed on my system  :
 
>  Suitable Qt6 >= 6.2.3 detected ($QT_VERSION)...
Comment 39 caulier.gilles 2022-07-08 07:21:51 UTC
No. Qt 6.2.3 is not the qt version detected, it's the minimal version usable.
The Qt version detected is not yet displayed properly.

Gilles
Comment 40 maderios 2022-07-08 07:46:30 UTC
Yes, i should see it says "suitable" Qt6"
Now i get same errors: Qt6 is well detected but compilation stops here
-- Doxygen is found.......................... TRUE
-- Graphviz Dot is found..................... YES
-- To build API documentation use 'make doc'
-- Configuring done
CMake Error: The INTERFACE_QT_MAJOR_VERSION property of "Qt5::Core" does
not agree with the value of QT_MAJOR_VERSION already determined
for "digikamcore".
etc............
Comment 41 caulier.gilles 2022-07-08 08:07:00 UTC
Git commit ef3574ff62023609ea15aea5d0947697c01dfd3f by Gilles Caulier.
Committed on 08/07/2022 at 08:06.
Pushed by cgilles into branch 'master'.

print right Qt version detected by camke at configuration stage.

M  +3    -1    core/cmake/rules/RulesFindQtCore.cmake

https://invent.kde.org/graphics/digikam/commit/ef3574ff62023609ea15aea5d0947697c01dfd3f
Comment 42 maderios 2022-07-08 08:10:34 UTC
It works
-- Suitable Qt6 >= 6.2.3 detected: '6.3.1'.
Comment 43 caulier.gilles 2022-07-08 08:11:09 UTC
I think the problematic mixing version detection is explained here :

https://doc.qt.io/qt-6/cmake-qt5-and-qt6-compatibility.html

... especially the QT_DEFAULT_MAJOR_VERSION variable to set before to call cmake find_package()

Gilles
Comment 44 caulier.gilles 2022-07-08 08:13:14 UTC
Git commit ee704007658a9b76bada17d046c1f6d7751e6950 by Gilles Caulier.
Committed on 08/07/2022 at 08:12.
Pushed by cgilles into branch 'master'.

setup env variable for right Qt version to detect before to call cmake::find_package() when mixing Qt is present.

M  +2    -0    core/cmake/rules/RulesFindQtCore.cmake

https://invent.kde.org/graphics/digikam/commit/ee704007658a9b76bada17d046c1f6d7751e6950
Comment 45 maderios 2022-07-08 08:33:27 UTC
Same errors:
-- Doxygen is found.......................... TRUE
-- Graphviz Dot is found..................... YES
-- To build API documentation use 'make doc'
-- Configuring done
CMake Error: The INTERFACE_QT_MAJOR_VERSION property of "Qt5::Core" does
not agree with the value of QT_MAJOR_VERSION already determined
for "digikamcore".
CMake Error: The INTERFACE_QT_MAJOR_VERSION property of "Qt5::Core" does
not agree with the value of QT_MAJOR_VERSION already determined
for "digikamdatabase

etc.................
Comment 46 Antonio Rojas 2022-07-08 08:36:05 UTC
Are you trying to build digikam with Qt6 using KDE frameworks built with Qt5? Because I don't see how that could possibly work...
Comment 47 maderios 2022-07-08 09:20:10 UTC
(In reply to Antonio Rojas from comment #46)
> Are you trying to build digikam with Qt6 using KDE frameworks built with
> Qt5? Because I don't see how that could possibly work...
It should work now with Arch Linux. I see  KF5  >= 5.91.0 needed for Qt6 version here:
https://www.digikam.org/api/index.html#externaldeps
Comment 48 Antonio Rojas 2022-07-08 09:26:55 UTC
Arch Linux, and every other distro, only provides Frameworks compiled with Qt5. There are no official packages of Frameworks built with Qt6 yet, you have to compile it yourself.
Comment 49 maderios 2022-07-08 10:32:18 UTC
I think that if digikam git building works with qt6 using Mageia 8, it should work with arch too, experimental way. It's not a distro question
Comment 50 Maik Qualmann 2022-07-08 10:37:04 UTC
However, Gilles compiles the KDE framework himself with Qt6. You cannot build Qt6-digiKam against to a Qt5-KDE framwork.

Maik
Comment 51 maderios 2022-07-08 10:40:52 UTC
(In reply to Maik Qualmann from comment #50)
> However, Gilles compiles the KDE framework himself with Qt6. You cannot
> build Qt6-digiKam against to a Qt5-KDE framwork.
> 
> Maik

Thanks for this information
Comment 52 maderios 2022-07-08 10:44:18 UTC
Waiting KF6... :)
Comment 53 caulier.gilles 2022-07-08 10:46:59 UTC
yes i build KF5 framework with Qt6 (KF6). The right version to compile is the last one 5.95.

My full configuration is here :

https://invent.kde.org/graphics/digikam/-/blob/master/project/bundles/appimage/config.sh

Gilles
Comment 54 maderios 2022-07-12 15:36:41 UTC
(In reply to caulier.gilles from comment #25)
> Here i compile digiKam with Qt6 with a VM where Qt5 is not installed at all.
> I don't use Plasma desktop but XFCE.
I'm thinking about compiling Digikam with a VM. 
Which VM do you use?
Comment 55 caulier.gilles 2022-07-12 15:38:25 UTC
VirtualBox, running on MacOS or Windows or Linux hosts

Gilles Caulier
Comment 56 maderios 2022-07-12 16:06:03 UTC
Thanks!
Comment 57 Yue Liu 2023-03-25 20:04:39 UTC
I just ran into Qt6 compilation issue as well. I'm compiling digikam master HEAD against the latest kf6-qt6 packages from kde-neon/unstable. This is after KF6 has branched so not sure if that requires changes on digikam side.

I had to replace all the `KF5` names in cmake files to `KF6`, not sure if this is really needed, or an ECM packaging issue in kde-neon, or I just forgot to install some KF5 compatibility packages.

Then found I have to add additional Qt libraries such as `StateMachine` and `Core5Compat`.

Then need to replace "I18N_NOOP2" with "kxi18nc"

Then ran into multiple compilation errors related to ambiguous type conversions:

```

/home/yue/dev/digikam/git/core/libs/widgets/text/dplaintextedit.cpp: In member function 'virtual void Digikam::DPlainTextEdit::keyPressEvent(QKeyEvent*)':
/home/yue/dev/digikam/git/core/libs/widgets/text/dplaintextedit.cpp:229:17: error: conversion from 'int' to 'QChar' is ambiguous
  229 |             if (key == d->ignoredMask[i])
      |                 ^~~
In file included from /usr/include/x86_64-linux-gnu/qt6/QtCore/qstring.h:14,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/QString:1,
                 from /home/yue/dev/digikam/git/core/libs/widgets/text/dtextedit.h:20,
                 from /home/yue/dev/digikam/git/core/libs/widgets/text/dtextedit_p.h:18,
                 from /home/yue/dev/digikam/git/core/libs/widgets/text/dplaintextedit.cpp:15:


/home/yue/dev/digikam/git/core/libs/widgets/text/dplaintextedit.cpp:238:17: error: conversion from 'int' to 'QChar' is ambiguous
  238 |             if (key != d->acceptedMask[i])
      |                 ^~~
In file included from /usr/include/x86_64-linux-gnu/qt6/QtCore/qstring.h:14,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/QString:1,
                 from /home/yue/dev/digikam/git/core/libs/widgets/text/dtextedit.h:20,
                 from /home/yue/dev/digikam/git/core/libs/widgets/text/dtextedit_p.h:18,
                 from /home/yue/dev/digikam/git/core/libs/widgets/text/dplaintextedit.cpp:15:


/home/yue/dev/digikam/git/core/libs/widgets/text/localizeselector.cpp:332:32: error: conversion from 'Digikam::DOnlineTranslator::TranslationError' to 'QChar' is ambiguous
  332 |         error = trengine->error();
      |                 ~~~~~~~~~~~~~~~^~
In file included from /usr/include/x86_64-linux-gnu/qt6/QtCore/qstring.h:14,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/qobject.h:11,
                 from /usr/include/x86_64-linux-gnu/qt6/QtWidgets/qwidget.h:9,
                 from /usr/include/x86_64-linux-gnu/qt6/QtWidgets/QWidget:1,
                 from /home/yue/dev/digikam/git/core/libs/widgets/text/localizeselector.h:20,
                 from /home/yue/dev/digikam/git/core/libs/widgets/text/localizeselector.cpp:15:
```

If digikam was compiled with Qt6 successfully with a previous Qt6 and previous KF5-qt6 build, I don't think these compilation errors need to be fixed right now, there must be some compatibility flag to allow the old code to compile. I'm I missing anything from the CMAKE configuration?

I'm setting this environment variable to find ECM packaged in kde-neon:
```
ECM_DIR=/usr/kf6/share/ECM
```
and using this Cmake config:
```
cmake -G "Ninja" .. \
      -DCMAKE_BUILD_TYPE=RelWithDebInfo \
      -DCMAKE_INSTALL_PREFIX=../usr \
      -DBUILD_TESTING=ON \
      -DBUILD_WITH_CCACHE=ON \
      -DBUILD_WITH_QT6=ON \
      -DDIGIKAMSC_COMPILE_PO=OFF \
      -DDIGIKAMSC_COMPILE_DIGIKAM=ON \
      -DENABLE_KFILEMETADATASUPPORT=OFF \
      -DENABLE_AKONADICONTACTSUPPORT=OFF \
      -DENABLE_MYSQLSUPPORT=OFF \
      -DENABLE_INTERNALMYSQL=OFF \
      -DENABLE_MEDIAPLAYER=OFF \
      -DENABLE_DBUS=ON \
      -DENABLE_APPSTYLES=ON \
      -DENABLE_QWEBENGINE=ON \
      -DQT_MAJOR_VERSION=6

```
Comment 58 caulier.gilles 2023-03-28 12:35:44 UTC
MR #207 is merged in git/master.

Please check if this file still valid...

Gilles
Comment 59 caulier.gilles 2023-05-03 12:25:46 UTC
@maderios 

This entry still valid using current code from git/master

Gilles Caulier
Comment 60 caulier.gilles 2023-09-04 04:06:29 UTC
Git commit a1f05cc51a29cb2a5824b76fc0bde0dd8813aa35 by Gilles Caulier.
Committed on 04/09/2023 at 06:04.
Pushed by cgilles into branch 'master'.

Fix QT5/KF6 dectection at configuration time.
Still compatible with QT5/KF5 of course.
Related: bug 468658

M  +16   -16   core/app/DigikamCoreTarget.cmake
M  +4    -4    core/app/DigikamDatabaseTarget.cmake
M  +1    -1    core/app/DigikamExportAPI.cmake
M  +10   -10   core/app/DigikamGuiTarget.cmake
M  +8    -8    core/app/DigikamTarget.cmake
M  +19   -19   core/cmake/macros/MacroDPlugins.cmake

https://invent.kde.org/graphics/digikam/-/commit/a1f05cc51a29cb2a5824b76fc0bde0dd8813aa35
Comment 61 caulier.gilles 2023-09-04 05:35:34 UTC
Git commit ac0c0ae63dffd5faf10ac93f16d81268bb5dc721 by Gilles Caulier.
Committed on 04/09/2023 at 07:34.
Pushed by cgilles into branch 'master'.

Qt6/Kf6++ CCBUGS: 456289,468658

M  +26   -2    core/libs/notificationmanager/dnotificationwrapper.cpp
M  +1    -1    core/libs/notificationmanager/dnotificationwrapper.h

https://invent.kde.org/graphics/digikam/-/commit/ac0c0ae63dffd5faf10ac93f16d81268bb5dc721
Comment 62 caulier.gilles 2023-09-05 03:07:02 UTC
Git commit 2596fd9e7a4685f916b18443386e396364f52eb7 by Gilles Caulier.
Committed on 05/09/2023 at 05:04.
Pushed by cgilles into branch 'master'.

fix cast type
fix conding style
init internal values
constify when possible
Related: bug 468658

M  +9    -1    core/libs/dimg/filters/icc/iccsettings.cpp
M  +1    -1    core/libs/dimg/filters/icc/iccsettings.h
M  +1    -1    core/libs/dimg/filters/icc/iccsettings_p.cpp
M  +6    -6    core/libs/dimg/filters/icc/iccsettings_p.h
M  +12   -7    core/libs/dimg/filters/icc/iccsettings_p_qt5.cpp
M  +31   -25   core/libs/dimg/filters/icc/iccsettings_p_qt6.cpp

https://invent.kde.org/graphics/digikam/-/commit/2596fd9e7a4685f916b18443386e396364f52eb7
Comment 63 caulier.gilles 2023-09-05 14:41:24 UTC
Git commit cf792f32c6b511d1b354487ede1c7db529326f2e by Gilles Caulier.
Committed on 05/09/2023 at 16:39.
Pushed by cgilles into branch 'master'.

compile with Qt 6.4
Related: bug 468658

M  +1    -1    core/utilities/geolocation/geomapwrapper/CMakeLists.txt
M  +1    -1    core/utilities/geolocation/geomapwrapper/gpsiteminfo.cpp
M  +1    -1    core/utilities/geolocation/geomapwrapper/gpsiteminfo.h
M  +2    -2    core/utilities/geolocation/geomapwrapper/gpsiteminfosorter.cpp
M  +1    -1    core/utilities/geolocation/geomapwrapper/gpsiteminfosorter.h

https://invent.kde.org/graphics/digikam/-/commit/cf792f32c6b511d1b354487ede1c7db529326f2e
Comment 64 caulier.gilles 2023-09-05 14:45:49 UTC
Maik :

If libmarble (qt5) is installed, it's detected at configuration time and of course Qt5 and Qt6 projects cannot mixed at all:

gilles@KU23:/mnt/data/Devel/8.x/build/core/utilities/geolocation/geoiface$ make
[  0%] Automatic MOC for target core_geoiface_obj
[  0%] Built target core_geoiface_obj_autogen
[  0%] Building CXX object core/utilities/geolocation/geoiface/CMakeFiles/core_geoiface_obj.dir/core_geoiface_obj_autogen/mocs_compilation.cpp.o
[  0%] Building CXX object core/utilities/geolocation/geoiface/CMakeFiles/core_geoiface_obj.dir/backends/backend-rg.cpp.o
[  0%] Building CXX object core/utilities/geolocation/geoiface/CMakeFiles/core_geoiface_obj.dir/backends/backend-geonames-rg.cpp.o
[  0%] Building CXX object core/utilities/geolocation/geoiface/CMakeFiles/core_geoiface_obj.dir/backends/backend-geonamesUS-rg.cpp.o
[  0%] Building CXX object core/utilities/geolocation/geoiface/CMakeFiles/core_geoiface_obj.dir/backends/backend-osm-rg.cpp.o
[  0%] Building CXX object core/utilities/geolocation/geoiface/CMakeFiles/core_geoiface_obj.dir/backends/mapbackend.cpp.o
[  0%] Building CXX object core/utilities/geolocation/geoiface/CMakeFiles/core_geoiface_obj.dir/backends/backendmarble.cpp.o
In file included from /mnt/data/Devel/8.x/core/utilities/geolocation/geoiface/backends/backendmarble.cpp:38:
/usr/include/marble/MarbleDirs.h:15:7: error: using typedef-name ‘using QStringList = class QList<QString>’ after ‘class’
   15 | class QStringList;
      |       ^~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/qt6/QtCore/qtypeinfo.h:6,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/qglobal.h:1397,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/qcontainertools_impl.h:14,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/qhash.h:8,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/qabstractitemmodel.h:8,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/QModelIndex:1,
                 from /mnt/data/Devel/8.x/core/utilities/geolocation/geoiface/backends/mapbackend.h:22,
                 from /mnt/data/Devel/8.x/core/utilities/geolocation/geoiface/backends/backendmarble.h:22,
                 from /mnt/data/Devel/8.x/core/utilities/geolocation/geoiface/backends/backendmarble.cpp:17:
/usr/include/x86_64-linux-gnu/qt6/QtCore/qcontainerfwd.h:28:7: note: ‘using QStringList = class QList<QString>’ has a previous declaration here
   28 | using QStringList = QList<QString>;
      |       ^~~~~~~~~~~
In file included from /usr/include/marble/RenderPluginInterface.h:11,
                 from /usr/include/marble/RenderPlugin.h:16,
                 from /usr/include/marble/AbstractFloatItem.h:13,
                 from /mnt/data/Devel/8.x/core/utilities/geolocation/geoiface/backends/backendmarble.cpp:41:
/usr/include/marble/LayerInterface.h:14:7: error: using typedef-name ‘using QStringList = class QList<QString>’ after ‘class’
   14 | class QStringList;
      |       ^~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qcontainerfwd.h:28:7: note: ‘using QStringList = class QList<QString>’ has a previous declaration here
   28 | using QStringList = QList<QString>;
      |       ^~~~~~~~~~~
/usr/include/marble/RenderPluginInterface.h:13:7: error: using typedef-name ‘using QStringList = class QList<QString>’ after ‘class’
   13 | class QStringList;
      |       ^~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qcontainerfwd.h:28:7: note: ‘using QStringList = class QList<QString>’ has a previous declaration here
   28 | using QStringList = QList<QString>;
      |       ^~~~~~~~~~~
In file included from /mnt/data/Devel/8.x/core/utilities/geolocation/geoiface/backends/backendmarble.cpp:43:
/usr/include/marble/MapThemeManager.h:17:7: error: using typedef-name ‘using QStringList = class QList<QString>’ after ‘class’
   17 | class QStringList;
      |       ^~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qcontainerfwd.h:28:7: note: ‘using QStringList = class QList<QString>’ has a previous declaration here
   28 | using QStringList = QList<QString>;
      |       ^~~~~~~~~~~
/mnt/data/Devel/8.x/core/utilities/geolocation/geoiface/backends/backendmarble.cpp: In member function ‘void Digikam::BackendMarble::createActions()’:
/mnt/data/Devel/8.x/core/utilities/geolocation/geoiface/backends/backendmarble.cpp:343:51: error: invalid use of incomplete type ‘class QActionGroup’
  343 |     d->actionGroupMapTheme = new QActionGroup(this);
...

Marble support in case of Qt6 must be disabled until the Qt6 version will be available.

Gilles
Comment 65 caulier.gilles 2023-09-05 14:54:49 UTC
Git commit 4ed95d8db35d6ddd83f29956038d4a2b81e50da6 by Gilles Caulier.
Committed on 05/09/2023 at 16:53.
Pushed by cgilles into branch 'master'.

disable libmarble detection if qt6. Marble is not yet ported to Qt6.
Related: bug 468658

M  +5    -1    core/CMakeLists.txt

https://invent.kde.org/graphics/digikam/-/commit/4ed95d8db35d6ddd83f29956038d4a2b81e50da6
Comment 66 caulier.gilles 2023-09-06 06:08:34 UTC
Git commit df11df529410fa6eea1063adaab8add03ac1e2c6 by Gilles Caulier.
Committed on 06/09/2023 at 08:02.
Pushed by cgilles into branch 'master'.

Link to new KF6::KIconWidgets
Another KF5 -> KF6 to target link rules

M  +20   -9    core/app/DigikamCoreTarget.cmake
M  +11   -2    core/app/DigikamGuiTarget.cmake
M  +11   -2    core/app/DigikamTarget.cmake
M  +7    -0    core/libs/tags/CMakeLists.txt
M  +19   -0    core/showfoto/CMakeLists.txt

https://invent.kde.org/graphics/digikam/-/commit/df11df529410fa6eea1063adaab8add03ac1e2c6
Comment 67 caulier.gilles 2023-09-06 12:57:39 UTC
Git commit 071b8a43a5f5b80c549f7f9d46ee1e9f60fcefbb by Gilles Caulier.
Committed on 06/09/2023 at 14:56.
Pushed by cgilles into branch 'master'.

Fix broken compilationn with KF6/Qt6
Related: bug 468658

M  +28   -9    core/dplugins/generic/tools/calendar/print/calsettings.cpp

https://invent.kde.org/graphics/digikam/-/commit/071b8a43a5f5b80c549f7f9d46ee1e9f60fcefbb
Comment 68 caulier.gilles 2023-09-06 17:53:12 UTC
Git commit ead95ce24bc40ac1b5bf676649770ba27b3446f3 by Gilles Caulier.
Committed on 06/09/2023 at 19:52.
Pushed by cgilles into branch 'master'.

fix broken compilation with Showfoto using Qt6/KF6
Related: bug 468658

M  +1    -0    core/showfoto/CMakeLists.txt

https://invent.kde.org/graphics/digikam/-/commit/ead95ce24bc40ac1b5bf676649770ba27b3446f3
Comment 69 caulier.gilles 2023-09-06 18:07:54 UTC
Git commit 83aac08c376ad4aa8e33e8cc4dcd234d986f44db by Gilles Caulier.
Committed on 06/09/2023 at 20:06.
Pushed by cgilles into branch 'master'.

Fix broken linking with KJobs API when mediawiki plugin is built with Qt6/KF6
Related: bug 468658

M  +3    -0    core/dplugins/generic/webservices/mediawiki/CMakeLists.txt

https://invent.kde.org/graphics/digikam/-/commit/83aac08c376ad4aa8e33e8cc4dcd234d986f44db
Comment 70 caulier.gilles 2023-09-07 12:17:42 UTC
Git commit 85eef034fb4c3640968bbaea52f7e71655e88147 by Gilles Caulier.
Committed on 07/09/2023 at 14:15.
Pushed by cgilles into branch 'master'.

fix garbase check with QVERIFY under Qt5.
This fix the broken compilation also under Qt6
Related: bug 468658
FIXED-IN: 8.2.0

M  +0    -7    core/tests/database/CMakeLists.txt
M  +16   -16   core/tests/database/haariface_utest.cpp

https://invent.kde.org/graphics/digikam/-/commit/85eef034fb4c3640968bbaea52f7e71655e88147