Bug 464140 - kbuildsycoca5 does not generate any files when compiled with clang 15.0.6
Summary: kbuildsycoca5 does not generate any files when compiled with clang 15.0.6
Status: RESOLVED DOWNSTREAM
Alias: None
Product: frameworks-kservice
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.101.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-11 10:55 UTC by Michael
Modified: 2023-02-03 07:18 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael 2023-01-11 10:55:43 UTC
SUMMARY

After updating dev-qt packages to 5.15.8 and restarting, no more installed applications were shown.
Digging around I found out that kservice and especially kbuildsycoca5 is responsible to generate the required files, which no longer seems to work but without giving me any pointer why.
I'm not sure how I landed there in first place or how I can recover from this state as downgrading kde-frameworks, dev-qt and kde-plasma didn't change anything.
As a last resort I cleared all qt, kde and plasma related config files from ~/.config and ~/.local/share but that didn't help either.
There is also an more in-depth stackexchange thread about this exact issue from a different person https://unix.stackexchange.com/questions/731054/kde-plasma-problems-all-launchers-broken-app-launcher-empty-desktop-error-mes


STEPS TO REPRODUCE
1. Run kbuildsycoca5  --noincremental


OBSERVED RESULT

$ QT_LOGGING_RULES='*=true' kbuildsycoca5  --noincremental
kbuildsycoca5 running...
kf.service.sycoca: Recreating ksycoca file ("/home/michi/.cache/ksycoca5_en_4VlnO2XZB5a9Is_5ao1CxN9XAH4=", version 304)
kf.service.sycoca: Looking for subdir "kservices5" => ("/usr/share/kservices5")
kf.service.sycoca: Looking for subdir "kservicetypes5" => ("/usr/share/kservicetypes5", ":/kservicetypes5")
kf.service.sycoca: Looking for subdir "mime" => ("/usr/share/mime")
kf.service.sycoca: Found menu file "/etc/xdg/menus/kf5-applications.menu"
kf.service.sycoca: Found menu file "/etc/xdg/menus/applications-merged/wine.menu"
kf.service.sycoca: Menu "applications-kmenuedit.menu" not found.
kf.service.sycoca: Looking up applications under "/usr/share/wine-proton-7.0.9999/applications/"
kf.service.sycoca: Looking up applications under "/usr/share/applications/"
kf.service.sycoca: Looking up applications under "/usr/local/share/applications/"
kf.service.sycoca: Looking up applications under "/var/lib/flatpak/exports/share/applications/"
kf.service.sycoca: Looking up applications under "/home/michi/.local/share/flatpak/exports/share/applications/"
kf.service.sycoca: Looking up applications under "/home/michi/.local/share/applications/"
kf.service.sycoca: Saving

kbuildsycoca5 runs without an error, but didn't generate a menu file in ~/.config/menus and thus no application is visible on the plasma session. I checked all the available logs and permissions but so far I couldn't find why

$ ls -lah ~/.config/menus
total 0
drwxr-xr-x 1 michi michi    0 Jan 11 11:26 .
drwxr-xr-x 1 michi michi 2.1K Jan 11 11:32 ..

ls -lah /etc/xdg/menus
total 20K
drwxr-xr-x 1 root root  146 Jan 11 09:41 .
drwxr-xr-x 1 root root  488 Jan 11 11:02 ..
lrwxrwxrwx 1 root root   21 Jan 11 09:39 applications.menu -> kf5-applications.menu
drwxr-xr-x 1 root root   18 Jan 11 08:38 applications-merged
-rw-r--r-- 1 root root 9.8K Dec  3 10:51 kf5-applications.menu
-rw-r--r-- 1 root root  279 Jan  3 19:04 kinfocenter.menu


EXPECTED RESULT

kbuildsycoca5 runs without an error and generates the menus (and desktop?) files that are shown as installed applications.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo Linux (kernel 6.1.1-zen1)
Graphics Platform: Wayland (this happens on X11 as well)
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.8


ADDITIONAL INFORMATION

All packages were being compiled with clang:
$ clang --version
clang version 15.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/15/bin
Configuration file: /etc/clang/clang.cfg

I'm glad for any pointers how to resolve this or patches I could try out, thanks!
Comment 1 Michael 2023-01-12 17:16:10 UTC
This seems to be an issue caused by clang 15.0.6. Recompiled dev-qt, kde-frameworks, kde-plasma and kde-apps packages with gcc and it works again.
Comment 2 Sam James 2023-02-03 07:18:22 UTC
At this point, I suspect it's a bug in Clang's implementation of -fstack-clash-protection, given we've seen some odd behaviour with Chromium too. GCC's implementation of stack clash protection works fine. We've stopped enabling it by default for Clang.