Static build fails to load libnice elements

Olivier Crête olivier.crete at collabora.com
Thu Mar 4 23:00:29 UTC 2021


Hi,

I'm pretty sure that the libnice elements don't get included in
libgstreamer-full, you have to link them separately as they're not
officially part of GStreamer.

Olivier

On Thu, 2021-03-04 at 22:42 +0000, Aaron Clauson wrote:
> 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
> (https://gitlab.freedesktop.org/gstreamer/gst-build#static-build)
> 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 packages).
> 
> 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 libgstreamer-full-1.0.so. 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/libgstreamer-full-1.0.so | 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 \
>   builddir
> 
> 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/lib/x86_64-linux-gnu/glib-2.0/include -
> 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.
> 
> Aaron
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-- 
Olivier Crête
olivier.crete at collabora.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210304/37aa9a17/attachment-0001.htm>


More information about the gstreamer-devel mailing list