Bug 442296 - "CMake Error: The INTERFACE_QT_MAJOR_VERSION property of "Qt5::Core" does not agree with the value of QT_MAJOR_VERSION already determined for KUserFeedbackQml / KUserFeedbackConsoleApplication"
Summary: "CMake Error: The INTERFACE_QT_MAJOR_VERSION property of "Qt5::Core" does not...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kuserfeedback
Classification: Frameworks and Libraries
Component: Management and Analytics Console (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Volker Krause
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-11 08:08 UTC by Kyle Devir
Modified: 2021-12-31 22:36 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
error.log from kdesrc-build (4.43 KB, text/x-log)
2021-09-11 08:08 UTC, Kyle Devir
Details
Retested build error.log from kdesrc-build (4.29 KB, text/plain)
2021-12-03 06:02 UTC, Kyle Devir
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Devir 2021-09-11 08:08:13 UTC
Created attachment 141467 [details]
error.log from kdesrc-build

SUMMARY

CMake configuration finishes, then CMake spits this at me unhappily:

```
CMake Error: The INTERFACE_QT_MAJOR_VERSION property of "Qt5::Core" does
not agree with the value of QT_MAJOR_VERSION already determined
for "KUserFeedbackQml".

CMake Error: The INTERFACE_QT_MAJOR_VERSION property of "Qt5::Core" does
not agree with the value of QT_MAJOR_VERSION already determined
for "KUserFeedbackConsoleApplication".
```

CMake log attached


SOFTWARE/OS VERSIONS

Operating System: Arch Linux
KDE Plasma Version: 5.22.80
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2
Kernel Version: 5.14.1-arch1-1-custom (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: Radeon RX 580 Series
Comment 1 Eduardo 2021-10-15 05:50:47 UTC
I'm getting the same error.

Trying to build plasma-desktop, it fails when trying to build its dependency kuserfeedback with this error:

-- 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 "KUserFeedbackQml".
Comment 2 Volker Krause 2021-12-02 21:35:28 UTC
According to the CMake log this is building against Qt 6.2.0, not Qt 5.15.2 as probably intended according to the report.
Comment 3 Eduardo 2021-12-03 05:51:33 UTC
I just tried building it again now with kdesrc-build and now it works! I didn't do anything on my system, I guess it was some misconfiguration on the git master and somebody fixed it in the meantime.

If it also works for the OP, maybe we can close this bug report.
Comment 4 Kyle Devir 2021-12-03 06:00:13 UTC
Will test now. :)
Comment 5 Kyle Devir 2021-12-03 06:02:41 UTC
Created attachment 144163 [details]
Retested build error.log from kdesrc-build

Still not working. :(
Comment 6 NicBOMB 2021-12-13 06:53:06 UTC
As Volker mentioned, building with qt6 is not yet supported. I encountered this issue on Manjaro. If you have qt6 packages remove them for now. Make sure you have the required qt5 dependencies and then build again with `--refresh-build`.
Comment 7 Eduardo 2021-12-31 13:46:07 UTC
On another computer, I tried setting up the dev environment from scratch with a new "~/kde" directory, and now I get this error again.

I'm on Arch Linux. It's true that I have many qt6-* packages, but they are required by other software and not easy to get rid off.

However, on my other computer, I also have Arch Linux with many qt6-* packages, and this is building just fine despite that.

This makes the life of those trying to contribute to plasma so much difficult. It should be an easy welcoming process, new developers shouldn't have to go through this pain.

This is only happening on the "kuserfeedback" project. All the other projects build fine. I don't think this can be considered "intentional", it is surely fixable, since other projects build fine. Why only "kuserfeedback" presents an issue? What is it that makes it special? If it is currently unsupported to build on a system that has qt6 together with qt5, then that is an issue that must be addressed. Maybe some of the CMakeLists.txt files can be set up in a way to accept the existence of qt6 but build against qt5 anyway, like other projects seem to do.

I'm reopening this issue, I'll try to investigate more.
Comment 8 Ahmad Samir 2021-12-31 14:09:45 UTC
Hopefully with https://invent.kde.org/libraries/kuserfeedback/-/merge_requests/18 things will be better, i.e. it's Qt5 by default and only Qt6 if you explicitly pass -DQT_MAJOR_VERSION=6 to cmake.
Comment 9 Eduardo 2021-12-31 14:20:35 UTC
(In reply to Ahmad Samir from comment #8)
> Hopefully with
> https://invent.kde.org/libraries/kuserfeedback/-/merge_requests/18 things
> will be better, i.e. it's Qt5 by default and only Qt6 if you explicitly pass
> -DQT_MAJOR_VERSION=6 to cmake.

Yes! I can build that branch on the computer that I can't build the master branch. If it is merged it should fix it!
You should add "BUG: 442296" to it!
Comment 10 Ahmad Samir 2021-12-31 22:36:43 UTC
Git commit 317e78673af22e6809d34a2b1dd6a263e3786f29 by Ahmad Samir.
Committed on 31/12/2021 at 16:30.
Pushed by ahmadsamir into branch 'master'.

Adapt CMake code to make it build with Qt6

Use QT_MAJOR_VERSION, to match what we have in ECM.

M  +7    -8    CMakeLists.txt
M  +7    -7    autotests/CMakeLists.txt
M  +7    -7    docs/CMakeLists.txt
M  +1    -1    src/common/CMakeLists.txt
M  +6    -6    src/console/CMakeLists.txt
M  +2    -2    src/provider/CMakeLists.txt
M  +1    -1    src/provider/core/CMakeLists.txt
M  +3    -3    src/provider/qml/CMakeLists.txt
M  +2    -2    src/provider/widgets/CMakeLists.txt

https://invent.kde.org/libraries/kuserfeedback/commit/317e78673af22e6809d34a2b1dd6a263e3786f29