https://bugs.kde.org/show_bug.cgi?id=525026
Bug ID: 525026
Summary: Build fails with PipeWire < 1.4: code uses
pw_stream_return_buffer() while CMake only requires
1.0.9
Classification: Plasma
Product: kwin
Version First 6.7.80
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: screencasting
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
SUMMARY
CMakeLists.txt asks for libpipewire-0.3 >= 1.0.9, but
src/plugins/screencast/screencaststream.cpp calls pw_stream_return_buffer(),
which does not exist before PipeWire 1.4.0. On a distribution that ships
anything between 1.0.9 and 1.3.x, configure succeeds, the screencast plugin is
enabled, and the build then fails part way through.
STEPS TO REPRODUCE
1. Use a system with PipeWire between 1.0.9 and 1.3.x - KDE neon Unstable
currently has 1.2.6.
2. Configure and build kwin master.
OBSERVED RESULT
/path/kwin/src/plugins/screencast/screencaststream.cpp:631:9: error:
'pw_stream_return_buffer' was not declared in this scope;
did you mean 'pw_stream_queue_buffer'?
The build stops after roughly a thousand targets, which is a while to wait for
a dependency problem that configure could have reported in a second.
EXPECTED RESULT
Either configure refuses early with a clear message about the PipeWire version,
or the code stays within the API of the version it asks for.
ADDITIONAL INFORMATION
Where the function appears, checked against the released headers
(src/pipewire/stream.h):
1.2.6 absent
1.2.7 absent
1.3.0 absent
1.4.0 present
1.4.1 present
So the requirement in CMakeLists.txt:370
pkg_check_modules(PipeWire IMPORTED_TARGET libpipewire-0.3>=1.0.9)
is three minor releases behind what the code needs; >= 1.4.0 would match
reality. The call itself is at screencaststream.cpp:631, in
ScreenCastStream::record(), returning a buffer when the GL context cannot be
made current.
Worth noting for anyone hitting this: passing
-DCMAKE_DISABLE_FIND_PACKAGE_PipeWire=ON does not help, because PipeWire is
located with pkg_check_modules rather than find_package, so the plugin is still
added.
SOFTWARE/OS VERSIONS
kwin: git master (6.7.80)
Building on: KDE neon Unstable Edition (Ubuntu 24.04 base), PipeWire 1.2.6, GCC
14.2, Qt 6.11.1
--
You are receiving this mail because:
You are watching all bug changes.