Bug 379732 - Does not build: 'DrmSurfaceBuffer' does not name a type
Summary: Does not build: 'DrmSurfaceBuffer' does not name a type
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.9.95
Platform: Other Linux
: NOR critical
Target Milestone: ---
Assignee: Roman Gilg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-11 19:39 UTC by Fabian Vogt
Modified: 2017-05-12 06:56 UTC (History)
2 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 Fabian Vogt 2017-05-11 19:39:00 UTC
When building without wayland and mesa gbm:

[  498s] In file included from /home/abuild/rpmbuild/BUILD/kwin-5.9.95/plugins/platforms/drm/drm_backend.cpp:20:0:
[  498s] /home/abuild/rpmbuild/BUILD/kwin-5.9.95/plugins/platforms/drm/drm_backend.h:81:5: error: 'DrmSurfaceBuffer' does not name a type
[  498s]      DrmSurfaceBuffer *createBuffer(gbm_surface *surface);
Comment 1 Roman Gilg 2017-05-11 20:05:09 UTC
Do you have the file https://cgit.kde.org/kwin.git/tree/plugins/platforms/drm/drm_buffer_gbm.h ?
Comment 2 Christophe Marin 2017-05-11 20:07:26 UTC
(In reply to Roman Gilg from comment #1)
> Do you have the file
> https://cgit.kde.org/kwin.git/tree/plugins/platforms/drm/drm_buffer_gbm.h ?

Yes but HAVE_GBM is false so it doesn't get included. (gbm is an optional dependency in kwin)
Comment 3 Roman Gilg 2017-05-11 20:19:52 UTC
Ok, got it. Thanks for the report.
Comment 4 Roman Gilg 2017-05-11 22:04:18 UTC
Git commit 9334d0ac48239156d7e6d2e08c626852fca8b164 by Roman Gilg.
Committed on 11/05/2017 at 21:53.
Pushed by romangilg into branch 'Plasma/5.10'.

[DRM plugin] No forward declare of DrmSurfaceBuffer without GBM

This fixes a compilation error introduced with efedddd905c3e49, which
forward declared the DrmSurfaceBuffer class also on builds without GBM.

M  +2    -3    plugins/platforms/drm/drm_backend.cpp
M  +2    -0    plugins/platforms/drm/drm_backend.h

https://commits.kde.org/kwin/9334d0ac48239156d7e6d2e08c626852fca8b164
Comment 5 Martin Flöser 2017-05-12 04:59:29 UTC
I would expect that openSUSE is building with gbm support. In fact GBM is not considered optional for Linux distros, but only for BSDs. Maybe I need to adjust the dependencies there.
Comment 6 Fabian Vogt 2017-05-12 06:56:00 UTC
(In reply to Martin Flöser from comment #5)
> I would expect that openSUSE is building with gbm support. In fact GBM is
> not considered optional for Linux distros, but only for BSDs. Maybe I need
> to adjust the dependencies there.

It is enabled on Tumbleweed but not Leap 42.x, as wayland is not available there (X too old, how ironic).