Static build fails to load libnice elements

Aaron Clauson aaron at
Thu Mar 4 22:42:43 UTC 2021

I'm experimenting with non-static and static gstreamer builds using the
gst-build on an Ubuntu docker image. In both cases I'm able to successfully
build gstreamer and compile my basic application that's using
a webrtcbin pipeline.

Note that static in this case is referring to the "Static build"
description from the gst-build readme ( rather
than attempting to link my executable with actual static libraries.

For the non-static build my application is able to run the
webrtcbin pipeline as expected. For static builds I get the warning below
about libnice and the pipeline fails to launch (I definitely have
libnice-dev installed and both docker images install an identical set of

0:00:54.272738800    16 0x558ef5419c00 WARN               webrtcbin
gstwebrtcbin.c:133:_have_nice_elements:<sendonly> error: libnice elements
are not available

My understanding with the static build was that all the plugins are
included in The libnice symbols all seem to be in
that library:

root at 3600f52e3abd:/src/gst-webrtc-echo/builddir# nm
/usr/local/lib/x86_64-linux-gnu/ | grep nice
0000000000caaf60 t _gst_nice_thread
0000000000c95700 t _have_nice_elements
0000000000cb2310 t _nice_agent_stream_ids_get_type
0000000000cb22f0 t _nice_agent_stream_ids_get_type_once

The meson command I'm using to generate the static build is:

meson -Dgood=enabled -Dgst-plugins-good:vpx=enabled \
  -Dgst-plugins-good:rtpmanager=enabled \
  -Dbad=enabled -Dgst-plugins-bad:dtls=enabled \
  -Dbad=enabled -Dgst-plugins-bad:srtp=enabled \
  -Dbad=enabled -Dgst-plugins-bad:webrtc=enabled \
  --default-library=static \

And the command I then use to build my application is:

gcc gst-webrtc-echo.c -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0
-I/usr/local/include/gstreamer-1.0 -L/usr/local/lib
-L/usr/local/lib/x86_64-linux-gnu -lgstreamer-full-1.0 -lglib-2.0
-lgmodule-2.0 -lgobject-2.0 -lgio-2.0 -lpthread -lm -ldl -lpcre -lffi
-levent -lcjson

If anybody can spot anything I might be doing wrong any suggestions would
be welcome.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list