Bug 385883

Summary: KWin5 trivial build failure against gbm 10.1.3
Product: [Plasma] kwin Reporter: RJVB <rjvbertin>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.11.1   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: simple patch

Description RJVB 2017-10-17 20:50:40 UTC
Created attachment 108415 [details]
simple patch

KWin 5.11.1 fails to build against the system gbm on Kubuntu 14.04.5 LTS (for use with a personal Neon5-like environment). It's a trivial error: size_t is undefined (= gbm.h apparently expects sys/types.h to be included).

Including the headerfile fixes the build.
Comment 1 Martin Flöser 2017-10-18 04:19:50 UTC
I think the better solution is to increase the minimum version of gbm. Adding includes to fix library bugs is always problematic as that bitrots pretty quickly.
Comment 2 RJVB 2017-10-18 06:22:55 UTC
How is that a library bug? You may not agree with the design principle, but it's nothing new that not all headers are always self-sufficient. There's no bug in the sense that testGbmSurface completes without error.

That said, I see that I only had the 10.1.3 dev package installed, the library is at 11.2.0 . The gbm.h from that newer version includes stddef.h, that should also prevent the issue.
Comment 3 Martin Flöser 2017-10-18 15:30:58 UTC
You just confirmed yourself that it is a library bug: the newer version includes the required header.
Comment 4 RJVB 2017-10-18 16:25:12 UTC
Whatever floats your boat.

Guess I know what to do next time I run into a header that's clearly not self-sufficient.