Failing to build kwin through kde-builder because it cannot find WaylandProtocols

I’m trying to build a Plasma session, which of course includes kwin, but kwin is failing to build and I’m out of ideas as to what I can do.

Running kde-builder kwin fails: CMake errors out during configuration, complaining that the required package WaylandProtocols is not found. This is despite kde-builder having cloned (and built?) wayland-protocols next to kwin (both under ~/kde/src on my system). I’m on Arch, and the wayland-protocols package is also installed system-wide.

This is my kde-builder config:

config-version: 2

global:
  branch-group: kf6-qt6
  include-dependencies: true
  install-dir: ~/kde/usr
  source-dir: ~/kde/src
  build-dir: ~/kde/build
  cmake-options: -DCMAKE_BUILD_TYPE=RelWithDebInfo
  num-cores: '12'
  num-cores-low-mem: '4'
  install-login-session: true
  stop-on-failure: true
  directory-layout: flat
  cmake-generator: Ninja
  compile-commands-linking: true
  compile-commands-export: true
  generate-vscode-project-config: false

include ${build-configs-dir}/kde6.yaml: ''

Is there anything I can do to make kwin build on my system?

have you tried rebuilding wayland protocols?

kde-builder --refresh-build wayland-protocls

1 Like

I have tried kde-builder wayland-protocols, which succeeded with no effect on kwin (it still failed to build). Because of the apparent success I didn’t think to do a full rebuild.

A full rebuild (kde-builder --refresh-build wayland-protocols as suggested) worked. Thank you.