static builds with gstreamer-rs?

David Holroyd dave at badgers-in-foil.co.uk
Tue Jul 7 07:20:00 UTC 2020


Hi,

I would like to try and have a static build of my gstreamer-using rust 
application, but haven't been able to work out all the steps yet.

I think I will need to:

  1) Build the rust application, with --target=x86_64-unknown-linux-musl 
(working well for static builds prior to attempting to add gstreamer-rs)
  2) Use gst-build, with -Ddefault_library=static in order to get a 
statically-linkable artefact (and to be able to use plugins from latests 
gst releases)
  3) Somehow get the gstreamer*-sys crates to link to static artefacts 
built by gst-build


I'm stuck working out the details for step #3 at the moment, but I 
mention the earlier steps in case I've made a bad assumption there.  I 
tried defining an environmental variable 
'SYSTEM_DEPS_GSTREAMER_1_0_SEARCH_NATIVE' pointing to the builddir 
created by step #2 above, but ldd shows my executable is still 
dynamically linking to my system-installed gstreamer libs.


I would be very grateful for any pointers!

dave



More information about the gstreamer-devel mailing list