graphics/gstreamer1-plugins-gl fails to configure. Has header "libdrm/drm_fourcc.h" : YES gst-libs/gst/gl/meson.build:558:6: ERROR: Unknown variable "allocators_dep". This is on CURRENT on an Alder Lake system that lacks DRM support and is running scfb.
Same on 2 hosts with 13.1-p2 amd64: 1st with x11/nvidia-driver-390 and 2nd with x11/nvidia-driver-340.
This patch was added: % cat /usr/ports/multimedia//gstreamer1-plugins/files/patch-gst-libs_gst_allocators_meson.build --- gst-libs/gst/allocators/meson.build.orig 2022-09-06 20:56:00 UTC +++ gst-libs/gst/allocators/meson.build @@ -1,3 +1,4 @@ +if get_option('allocators').enabled() gst_allocators_headers = files([ 'allocators.h', 'allocators-prelude.h', @@ -58,3 +59,4 @@ allocators_dep = declare_dependency(link_with: gstallo sources : allocators_gen_sources) meson.override_dependency('gstreamer-allocators-1.0', allocators_dep) +endif So, unless 'allocators' is explicitly enabled, allocators_dep is not defined. It's not clear from the commit or review why that is there (committer, maintainter CC'd for comment). But if you remove that patch, gstreamer1-plugins-gl gets past 'configure' when libdrm is installed. Because the intent of the patch is not documented, I don't know what to test for breakage if the patch is removed. It may be something that fails to build, or it could cause some run-time problem, or maybe the patch should just not be there at all and everything works fine without it. An answer from the patch author would be helpful here. By the way, the reason this only shows up when libdrm is installed is from this meson.build snippet in work/gst-plugins-base-1.20.3/gts-libs/gl/meson.build: if egl_dep.found() and cc.has_header('libdrm/drm_fourcc.h') optional_deps += allocators_dep endif
Passing -Dallocators=enabled to meson is an option (to get past the configure failure instead of deleting the patch) as well. Before deciding how to proceed with a fix for this bug, it would be good to understand why the option to disable allocators was added.
Created attachment 237598 [details] Guard against masked token in gst-libs/gst/allocators/meson.build
Created attachment 237599 [details] Guard against masked token in gst-libs/gst/allocators/meson.build If we are guarding the entire file here --> gst-libs/gst/allocators/meson.build with if get_option('allocators').enabled() then the token `allocators_dep` remains undefined. Should we not then guard the other calls to this token, as well? See patches submitted: patch-ext_gl_meson.build patch-gst-libs_gst_gl_meson.build
Created attachment 237600 [details] Guard against masked token in gst-libs/gst/allocators/meson.build
Running FreeBSD 12.3-RELEASE-p6 GENERIC Will this issue be resolved soon? This issue is holding up all downstream dependencies. Thanks Joel
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=040e9e09916bc42675bb0d3aa94fee4787bb15c3 commit 040e9e09916bc42675bb0d3aa94fee4787bb15c3 Author: Thomas Zander <riggs@FreeBSD.org> AuthorDate: 2022-11-01 22:36:11 +0000 Commit: Thomas Zander <riggs@FreeBSD.org> CommitDate: 2022-11-01 23:24:41 +0000 multimedia/gstreamer1-plugins: Fix build in the presence of libdrm PR: 267100 Reported by: rkoberman@gmail.com .../files/patch-ext_gl_meson.build | 15 ++++++++++-- .../files/patch-gst-libs_gst_gl_meson.build | 28 +++++++++++++++------- 2 files changed, 33 insertions(+), 10 deletions(-)
https://cgit.freebsd.org/ports/commit/?id=040e9e09916bc42675bb0d3aa94fee4787bb15c3 should build the port without the allocator dependency despite the presence of libdrm, producing a plugin like from the package build in a clean environment. We can reopen this bug if it still does not work after this change.