Created attachment 168714 [details] kde-frameworks/kio-6.1.0 build log I having the error above when compiling the kde-frameworks/kio-6.1.0 on the llvm-18 profile. This bug seems to have been cause by this commit here: https://invent.kde.org/frameworks/kio/-/commit/152fa94b5fb2c3226b0f8f7975c1f06bec4ecdaa I gonna attach the emerge --info and build.log, the same are also present on the gentoo bug tracker: https://bugs.gentoo.org/930154 STEPS TO REPRODUCE 1. Have LLVM-18.1.4 2. Update KDE Plasma 6.0.4, Gear 24.02.2 and Frameworks 6.1.0 2. Compiled kde-frameworks/kio-6.1.0 with useflags "acl handbook kwallet wayland" OBSERVED RESULT ```bash /var/tmp/portage/kde-frameworks/kio-6.1.0/work/kio-6.1.0/src/gui/systemd/scopedprocessrunner.cpp:60:9: error: use of undeclared identifier 'close' 60 | close(efd); | ^ 1 error generated. ``` EXPECTED RESULT Compliled without any error SOFTWARE/OS VERSIONS Linux: Gentoo Linux 2.15 KDE Plasma Version: 6.0.4 KDE Frameworks Version: 6.1.0* Qt Version: 6.7.0 ADDITIONAL INFORMATION I was able to update to KDE Frameworks 6.1.0 by apply a patch that revert the commit above For my understanding I don't think this bug is llvm-18 specific I think can also happen on gcc Best Regards, Gonçalo Negrier Duarte
Created attachment 168715 [details] emerge info log
Created attachment 168786 [details] fix-undecleared-identifier-close.patch Happens for me as well on Gentoo with LLVM/Clang 17. I've attached patch as a workaround that includes unistd.h that defines "close", however I'm not sure if this has some unwanted side effects, but so far everything seems to work fine. STEPS TO REPRODUCE 1. Have llvm-17.0.6 2. Update KDE Plasma 6.0.4, Gear 24.02.2 and Frameworks 6.1.0 2. Compile kde-frameworks/kio-6.1.0 clang and USE flags "X wayland" SOFTWARE/OS VERSIONS Linux: Gentoo Linux 2.15 KDE Plasma Version: 6.0.4 KDE Frameworks Version: 6.1.0 Qt Version: 6.7.0
(In reply to Michael from comment #2) > Created attachment 168786 [details] > fix-undecleared-identifier-close.patch > > Happens for me as well on Gentoo with LLVM/Clang 17. > I've attached patch as a workaround that includes unistd.h that defines > "close", however I'm not sure if this has some unwanted side effects, but so > far everything seems to work fine. Can confirm it work also for me, I don't think will cause any side effects, basically it solve the undefined close. Send that patch to gentoo bug as well, might be added as workaround for now
Thanks, can you please take your patch to https://invent.kde.org/frameworks/kio by creating an MR there?
Here is the MR https://invent.kde.org/frameworks/kio/-/merge_requests/1619
Gonna just marked as fixed since the MR was merged