GNOME Bugzilla – Bug 770146
kmssink won't compile
Last modified: 2016-09-30 07:04:12 UTC
Created attachment 333626 [details] make log When compiling gst-plugins-bad from master the make will fail because of undeclared values errors. Relevant part of the log (full make log is attached) - make[3]: Entering directory `/home/zingmars/git_projects/Gstreamer/git/gst-plugins-bad/sys/uvch264' CC libgstdvb_la-gstdvb.lo CC libgstuvch264_la-gstuvch264.lo gstkmssink.c: In function 'get_drm_caps': gstkmssink.c:292:30: error: 'DRM_CAP_ASYNC_PAGE_FLIP' undeclared (first use in this function) ret = drmGetCap (self->fd, DRM_CAP_ASYNC_PAGE_FLIP, &has_async_page_flip); ^ gstkmssink.c:292:30: note: each undeclared identifier is reported only once for each function it appears in gstkmssink.c: In function 'gst_kms_sink_start': gstkmssink.c:396:7: error: implicit declaration of function 'drmSetClientCap' [-Werror=implicit-function-declaration] drmSetClientCap (self->fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1)) ^ gstkmssink.c:396:7: error: nested extern declaration of 'drmSetClientCap' [-Werror=nested-externs] gstkmssink.c:396:34: error: 'DRM_CLIENT_CAP_UNIVERSAL_PLANES' undeclared (first use in this function) drmSetClientCap (self->fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1)) ^ cc1: all warnings being treated as errors make[3]: *** [libgstkmssink_la-gstkmssink.lo] Error 1 make[3]: Leaving directory `/home/zingmars/git_projects/Gstreamer/git/gst-plugins-bad/sys/kms' make[2]: *** [kms] Error 2 Additional info: $ pkg-config --modversion libdrm libkms 2.4.39 1.0.0
> $ pkg-config --modversion libdrm libkms > 2.4.39 > 1.0.0 That's from August 2012 - maybe we need to bump the requirements to something a bti more recent?
(In reply to Tim-Philipp Müller from comment #1) > > $ pkg-config --modversion libdrm libkms > > 2.4.39 > > 1.0.0 > > That's from August 2012 - maybe we need to bump the requirements to > something a bti more recent? Well, those are the versions on Canonical's apt repos (Ubuntu 14.04), so dropping the support for these might mean dropping the support for Ubuntu 14.04.
Created attachment 334832 [details] [review] kmssink: check for DRM_CAP_ASYNC_PAGE_FLIP macro DRM_CAP_ASYNC_PAGE_FLIP appear in libdrm 2.4.48 but Ubutnu 14.04 still uses libdrm 2.4.39. This patch checks for DRM_CAP_ASYNC_PAGE_FLIP definition before testing that capability.
@zingmars, can you check if this patch is enough for you?
Sorry for the late response, the last few weeks have been hectic. The patch only seems to fix the first error with DRM_CAP_ASYNC_PAGE_FLIP, but there's another one with DRM_CLIENT_CAP_UNIVERSAL_PLANES that's also present in the original bug report, so the fix does not fully fix the issue.
(In reply to zingmars from comment #5) > Sorry for the late response, the last few weeks have been hectic. > > The patch only seems to fix the first error with DRM_CAP_ASYNC_PAGE_FLIP, > but there's another one with DRM_CLIENT_CAP_UNIVERSAL_PLANES that's also > present in the original bug report, so the fix does not fully fix the issue. Thanks. mmmhh... This is getting messy. I'm feeling towards to check for libdrm-2.4.55
Created attachment 335466 [details] [review] kmssink: update libdrm dependency to 2.4.55 The latest libdrm feature supported by kmssink is the universal plane, which was added in 2.4.55. Let's update the dependency to that version.
Review of attachment 335466 [details] [review]: Looks good. There is no reason to support too old library. This is a recent addition to GStreamer and it make sense to focus on the newer interface.
Attachment 335466 [details] pushed as fa4786a - kmssink: update libdrm dependency to 2.4.55