Description
I updated a crate that pulled in a new wayland-sys
, and now I get the following error on CI:
error: failed to run custom build command for `wayland-sys v0.31.5`
Caused by:
process didn't exit successfully: `/home/runner/work/rerun/rerun/target/debug/build/wayland-sys-973359b900b2004b/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-env-changed=WAYLAND_CLIENT_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=WAYLAND_CLIENT_STATIC
cargo:rerun-if-env-changed=WAYLAND_CLIENT_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
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
--- stderr
thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wayland-sys-0.31.5/build.rs:10:47:
called `Result::unwrap()` on an `Err` value:
pkg-config exited with status code 1
> PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags wayland-client
The system library `wayland-client` required by crate `wayland-sys` was not found.
The file `wayland-client.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 `wayland-client.pc`.
The offending line is this, which unfortunately doesn't have a comment:
wayland-rs/wayland-sys/build.rs
Lines 9 to 11 in a078c5b
(it would be nice if the unwrap
was replaced with a helpful expect
).
CARGO_FEATURE_CLIENT
lead me to look at the documentation for the client
feature flag, but again I came up short:
wayland-rs/wayland-sys/Cargo.toml
Lines 24 to 26 in a078c5b
(I can recommend https://crates.io/crates/document-features for documenting features btw)
I would appreciate any guidance I can get (I don't speak Linux) 🙏
Is the fix as simple as adding apt-get install wayland-client
to my CI?