Bug 385883 - KWin5 trivial build failure against gbm 10.1.3
Summary: KWin5 trivial build failure against gbm 10.1.3
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 5.11.1
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-17 20:50 UTC by RJVB
Modified: 2017-10-18 16:25 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
simple patch (380 bytes, text/plain)
2017-10-17 20:50 UTC, RJVB
Details

Note You need to log in before you can comment on or make changes to this bug.
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.