rpicamsrc: fix "Could not find component vc.ril.camera" on recent raspios
authorTim-Philipp Müller <tim@centricular.com>
Mon, 13 Jul 2020 22:43:48 +0000 (23:43 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 23 Jul 2020 18:11:30 +0000 (19:11 +0100)
Make extra sure all the required mmal libs such as libmmal_vc_client.so
actually get linked and stay linked. Otherwise the above error happens
it seems.

buster (10.4) with meson 0.55 and pi ref 2020-05-27
pi-gen, 825107f04027269db77426046f5085475b1ea22f, stage5

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/682>

sys/rpicamsrc/meson.build

index 56cabc1..dc18a83 100644 (file)
@@ -60,6 +60,8 @@ rpi_warn_flags = cc.get_supported_arguments([
   '-Wno-stringop-truncation',
 ])
 
+rpi_link_flags = cc.get_supported_link_arguments(['-Wl,--no-as-needed'])
+
 gnome = import('gnome')
 
 enums = gnome.mkenums_simple('gstrpicam-enum-types',
@@ -67,12 +69,13 @@ enums = gnome.mkenums_simple('gstrpicam-enum-types',
   identifier_prefix: 'GstRpiCamSrc',
   symbol_prefix: 'gst_rpi_cam_src')
 
-# we might need '-Wl,--no-as-needed' or b_asneeded=false on ubuntu, tbd
 gstrpicamsrc = library('gstrpicamsrc',
   rpicamsrc_sources, enums,
   c_args: [gst_plugins_good_args, rpi_inc_args, rpi_warn_flags],
+  link_args: rpi_link_flags,
   include_directories: [configinc, libsinc],
   dependencies: [gst_dep, gstbase_dep, gstvideo_dep] + mmal_deps,
+  override_options: ['b_asneeded=false'],
   install_dir: plugins_install_dir,
   install: true)