GNOME Bugzilla – Bug 797347
camerabin2 fails to build on Ubuntu 18.04
Last modified: 2018-10-28 12:32:11 UTC
../subprojects/gst-plugins-bad/gst/camerabin2/gstwrappercamerabinsrc.c: In function ‘check_and_replace_src’: ../subprojects/gst-plugins-bad/gst/camerabin2/gstwrappercamerabinsrc.c:488:50: error: ‘DEFAULT_VIDEOSRC’ undeclared (first use in this function); did you mean ‘DEFAULT_WIDTH’? self->app_vid_src, "autovideosrc", DEFAULT_VIDEOSRC, ^~~~~~~~~~~~~~~~ DEFAULT_WIDTH ../subprojects/gst-plugins-bad/gst/camerabin2/gstwrappercamerabinsrc.c:488:50: note: each undeclared identifier is reported only once for each function it appears in
So weird. Why does this happen for you? I have: $ rg DEFAULT_VIDEOSRC /tmp/gb/ /tmp/gb/subprojects/gst-plugins-bad/config.h 8:#define DEFAULT_VIDEOSRC "v4l2src" and configinc is in include_directories in gst/camerabin2/meson.build and there's an #include "config.h" in the gstwrappercamerabinsrc.c and -DHAVE_CONFIG_H is set via c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'],
What's the full compiler line from ninja -v for you?
Ok, I understood, that's a huge bug in Meson actually. The problem is I had a local change in gst-plugins-bad that makes its configure fails in the middle, and since for gst-build the subproject gst-plugins-bad is optional, that doesn't make the whole configuration fail, it just ignore the error and should not build -bad at all. But all build targets from -bad that where generated before the error are kept by meson and will still be built. That means that the camerabin2 and curl targets are built but the config.h didn't get generated because the configure in -bad failed sooner.