Building static gstreamer with gst-plugin-webrtchttp plugin

Trying to build static libraries for gstreamer and gst-plugins-rs. While running gst-inspect the plugin in looking for shared library instead of static gstreamer.

git clone --recurse-submodules https://gitlab.freedesktop.org/gstreamer/gstreamer.git
cd gstreamer
meson --prefix=/opt/gstreamer ../build-gst-full-static -Ddefault_library=static -Dintrospection=disabled
ninja -C ../build-gst-full-static
meson install -C ../build-gst-full-static
git clone https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
cd gst-plugin-rs
cargo cbuild -p gst-plugin-webrtchttp
cargo cinstall --release --prefix=/usr --libdir /opt/gstreamer/lib/x86_64-linux-gnu -p gst-plugin-webrtchttp

export LD_LIBRARY_PATH=/opt/gstreamer/lib/x86_64-linux-gnu

export GST_PLUGIN_PATH=/opt/gstreamer/lib/x86_64-linux-gnu/gstreamer-1.0

$ gst-inspect-1.0 whipsink

(gst-plugin-scanner:217643): GStreamer-WARNING **: 03:17:06.885: Failed to load plugin ‘/opt/gstreamer/lib/x86_64-linux-gnu/gstreamer-1.0/libgstwebrtchttp.so’: libgstsdp-1.0.so.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:217643): GStreamer-WARNING **: 03:17:06.885: Failed to load plugin ‘/opt/gstreamer/lib/x86_64-linux-gnu/gstreamer-1.0/libgstwebrtchttp.so’: libgstsdp-1.0.so.0: cannot open shared object file: No such file or directory

No such element or plugin ‘whipsink’

Hi,

gst-inspect cannot look for static libraries unless you have compiled it with linking all the necessary static libs.

Unrelated, but whipsink is deprecated now and unmaintained, please consider changing to whipclientsink :slight_smile:

Thanks for the suggestion.

I tried different build command to build gst-plugins-rs along with gstreamer but that also failed with Error.

meson setup --buildtype=release --prefix /opt/gstreamerstatic1106 --strip --default-library=static -Dgst-full-libraries=video,audio,app,pbutils,sdp,webrtc,rtsp-server -Dintrospection=disabled -Dtools=enabled -Dbase=enabled -Dgood=enabled -Dbad=enabled -Dlibnice=enabled -Dlibav=enabled -Drs=enabled -Drtsp_server=enabled -Dges=disabled -Ddevtools=disabled -Dpython=disabled ../gst-build-1106

but it failed with

Executing subproject gst-plugins-rs

gst-plugins-rs| Project name: gst-plugins-rs

gst-plugins-rs| Project version: 0.15.0-alpha.1

gst-plugins-rs| C compiler for the host machine: cc (gcc 11.4.0 “cc (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0”)

gst-plugins-rs| C linker for the host machine: cc ld.bfd 2.38

gst-plugins-rs| Rust compiler for the host machine: rustc -C linker=cc (rustc 1.91.0 “1.91.0”)

gst-plugins-rs| Rust linker for the host machine: rustc -C linker=cc ld.bfd 2.38

gst-plugins-rs| Program python3 (tomllib) found: NO

gst-plugins-rs| Program python3 (tomli) found: YES (/usr/bin/python3) modules: tomli

gst-plugins-rs| Program cargo found: YES 1.91.0 1.91.0 (/root/.cargo/bin/cargo)

gst-plugins-rs| Program cargo_wrapper.py found: YES (/home/ubuntu/gstreamer/subprojects/gst-plugins-rs/cargo_wrapper.py)

gst-plugins-rs| Program cargo-cbuild found: YES 0.10.18 0.10.18 (/root/.cargo/bin/cargo-cbuild)

gst-plugins-rs| Dependency glib-2.0 found: YES 2.72.4 (cached)

gst-plugins-rs| Dependency gstreamer-1.0 found: YES 1.27.2.1 (overridden)

gst-plugins-rs| Dependency gstreamer-app-1.0 found: YES 1.27.2.1 (overridden)

gst-plugins-rs| Dependency gstreamer-audio-1.0 found: YES 1.27.2.1 (overridden)

gst-plugins-rs| Dependency gstreamer-base-1.0 found: YES 1.27.2.1 (overridden)

gst-plugins-rs| Dependency gstreamer-video-1.0 found: YES 1.27.2.1 (overridden)

gst-plugins-rs| Dependency gstreamer-rtp-1.0 found: YES 1.27.2.1 (overridden)

gst-plugins-rs| Dependency gstreamer-webrtc-1.0 found: YES 1.27.2.1 (overridden)

gst-plugins-rs| Dependency gstreamer-sdp-1.0 found: YES 1.27.2.1 (overridden)

gst-plugins-rs| Dependency gstreamer-check-1.0 found: YES 1.27.2.1 (overridden)

gst-plugins-rs| Dependency gstreamer-gl-1.0 from subproject subprojects/gst-plugins-base found: NO

gst-plugins-rs| Dependency gstreamer-net-1.0 found: YES 1.27.2.1 (overridden)

gst-plugins-rs| Dependency gstreamer-analytics-1.0 found: YES 1.27.2.1 (overridden)

subprojects/gst-plugins-rs/meson.build:328:24: ERROR: No default provided for dependency , which is not pkg-config, cmake, or config-tool based.

gst-plugins-rs| Dependency gstreamer-gl-1.0 from subproject subprojects/gst-plugins-base found: NO

I am guessing the dependencies for gstreamer-gl-1.0 are missing, which are needed by gst-plugins-rs also.