Ubuntu 22.04 | Webrtc build broken
Describe your issue
When trying to build latest code for webrtcsink
on an Ubuntu 22.04 machine, I am getting the following error:
warning: gstreamer-sys@0.23.0:
error: failed to run custom build command for `gstreamer-sys v0.23.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#2613c577)`
Caused by:
process didn't exit successfully: `/home/amram/development/gst-plugins-rs/target/debug/build/gstreamer-sys-c4925ece94778f23/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=GSTREAMER_1.0_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
cargo:warning=
pkg-config exited with status code 1
> PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags gstreamer-1.0 gstreamer-1.0 >= 1.22
The system library `gstreamer-1.0` required by crate `gstreamer-sys` was not found.
The file `gstreamer-1.0.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
The PKG_CONFIG_PATH environment variable is not set.
HINT: if you have installed the library, try setting PKG_CONFIG_PATH to the directory containing `gstreamer-1.0.pc`.
The error seems due to gstreamer-sys expecting gstreamer 1.22, but current gstreamer apt version for Ubuntu 22.04 is 1.20.3
. Using a Cargo.toml from before the change in in the past few days, works as expected. Looking at the logs the difference I see is that after the change the build command includes CARGO_FEATURE_V1_22=1
which causes the gstreamer-sys lib to try to build for version 1.22 which doesn't exist.
Expected Behavior
Build should succeed
Observed Behavior
Build fails
Setup
- Operating System: Ubuntu 22.04 Jammy
- Device: Computer
- gst-plugins-rs Version: Latest main
- GStreamer Version: 1.20.3
- Command line: Terminal
Steps to reproduce the bug
- open terminal in an Ubuntu 22.04 machin
git clone https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
cd /gst-plugins-rs/net/webrtc
cargo build
How reproducible is the bug?
Always
Solutions you have tried
Reverting the code to an older version (works). Building on different images in docker (failed).