kde-misc/kdeconnect fails to compile with a full clang/libcxx toolchain: FAILED: core/CMakeFiles/kdeconnectcore.dir/backends/bluetooth/bluetoothdevicelink.cpp.o /usr/lib/ccache/bin/clang++ -DHAVE_KIO -DKCOREADDONS_LIB -DKDECONNECT_BLUETOOTH -DQT_BLUETOOTH_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_ASCII -DQT_NO_DEBUG -DQT_NO_KEYWORDS -DQT_NO_URL_CAST_FROM_STRING -DTRANSLATION_DOM AIN=\"kdeconnect-core\" -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -Dkdeconnectcore_EXPORTS -I/var/tmp/portage/kde-misc/kdeconnect-22.04.0/work/kdeconnect-kde-22.04.0_build/core -I/var/tmp/portage/kde-misc/kdeconnect-22.04.0/work/kdeconnect-kde-22.04.0 /core -I/var/tmp/portage/kde-misc/kdeconnect-22.04.0/work/kdeconnect-kde-22.04.0_build/core/kdeconnectcore_autogen/include -I/var/tmp/portage/kde-misc/kdeconnect-22.04.0/work/kdeconnect-kde-22.04.0 -isystem /usr/include/qt5 -isystem /usr/include /qt5/QtNetwork -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-clang -isystem /usr/include/KF5/KCoreAddons -isystem /usr/include/KF5 -isystem /usr/include/Qca-qt5/QtCrypto -isystem /usr/include/qt5/QtDBus -isystem /usr/inc lude/KF5/KI18n -isystem /usr/include/KF5/KConfig -isystem /usr/include/KF5/KConfigCore -isystem /usr/include/KF5/KIOCore -isystem /usr/include/KF5/KIO -isystem /usr/include/KF5/KService -isystem /usr/include/qt5/QtBluetooth -DQT_NO_DEBUG -O3 -m arch=native -mtune=native -pipe -fomit-frame-pointer -fno-operator-names -fno-exceptions -Wno-gnu-zero-variadic-macro-arguments -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-d tor -Woverloaded-virtual -Werror=return-type -Werror=init-self -Wvla -Wdate-time -fdiagnostics-color=always -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -std=gnu++17 -MD -MT core/CMakeFiles/kdeconnectcore.dir/backends/bluetooth/bl uetoothdevicelink.cpp.o -MF core/CMakeFiles/kdeconnectcore.dir/backends/bluetooth/bluetoothdevicelink.cpp.o.d -o core/CMakeFiles/kdeconnectcore.dir/backends/bluetooth/bluetoothdevicelink.cpp.o -c /var/tmp/portage/kde-misc/kdeconnect-22.04.0/work /kdeconnect-kde-22.04.0/core/backends/bluetooth/bluetoothdevicelink.cpp /var/tmp/portage/kde-misc/kdeconnect-22.04.0/work/kdeconnect-kde-22.04.0/core/backends/bluetooth/bluetoothdevicelink.cpp:95:12: error: chosen constructor is explicit in copy-initialization return {}; // TODO Not sure what to do here. For LanDeviceLink we use the SSL connection's certificate, but we don't have that here ^~ /usr/include/qt5/QtNetwork/qsslcertificate.h:95:14: note: explicit constructor declared here explicit QSslCertificate(const QByteArray &data = QByteArray(), QSsl::EncodingFormat format = QSsl::Pem); ^ 1 error generated. Reproducible: Always Steps to Reproduce: 1. Switch to Clang/libc++/lld toolchain for whole system 2. Try building kdeconnect 3. PROFIT Actual Results: Build failure due to compiler error Expected Results: kdeconnect should build with Clang
Created attachment 775092 [details] Build log
Created attachment 775095 [details] emerge info
Could you report this upstream on KDE's Bugzilla?
(In reply to Sam James from comment #3) > Could you report this upstream on KDE's Bugzilla? Reported as https://bugs.kde.org/show_bug.cgi?id=458904.
Ah crap, I had completely forgotten about this. Thanks for following up and reporting the issue, Sam!
What about 22.12.3?
Still broken with both clang-15 and clang-16.
This has been fixed upstream https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/540
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a0b7a7f7698823ddf3e67ebfc0d7d372fa73334 commit 2a0b7a7f7698823ddf3e67ebfc0d7d372fa73334 Author: Luna <luna.dragon@suse.com> AuthorDate: 2023-06-08 07:07:45 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2023-06-08 11:35:19 +0000 kde-misc/kdeconnect: Fix builds using clang clang is more strict for syntax then gcc hence it was not possible to build kdeconnect with clang. This adds a patch from upstream that corrects this by explictly using the constructer as it should have in the first place. Closes: https://bugs.gentoo.org/841416 Signed-off-by: Luna <luna.dragon@suse.com> Closes: https://github.com/gentoo/gentoo/pull/31342 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> ...-explicit-constructor-for-QSslCertificate.patch | 35 ++++++++++++++++++++++ kde-misc/kdeconnect/kdeconnect-23.04.1.ebuild | 1 + 2 files changed, 36 insertions(+)