Open emilk opened 3 weeks ago
You need the libwayland-dev
. You can also look into CI
for winit/etc.
You need the libwayland-dev
Does all users of our binary need it too? That will be quite annoying for them, especially X11 users.
You can also look into CI for winit/etc.
I don't see anything special in https://github.com/rust-windowing/winit/blob/master/.github/workflows/ci.yml
This happened when updating from wayland-sys
0.31.4
to 0.31.5
btw - what changed there? Can it be undone?
The crate wayland-sys
has not changed at all since its 0.31.1
release, so I don't think this update is the reason you got this error. Rather, maybe one of your dependencies pulling wayland-sys
activated the cargo feature in one of its updates?
Does all users of our binary need it too?
That depends on what does your dependency using wayland-client, but assuming it uses the dlopen
feature (like winit does), then that is only needed for building the project.
@emilk maybe something that was using wayland-sys disabled its dlopen
feature? Since dlopen
is the only way to avoid the direct linking to system library. winit for example always enables it by default, but one can disable it when including winit.
I could indeed fix the problem by adding wayland-sys = { features = ["dlopen"] }
to my code (https://github.com/rerun-io/rerun/pull/7977). Thanks! 🙏
It might be nice to add that as a suggestion for others that hit the same unwrap
in https://github.com/Smithay/wayland-rs/blob/a078c5b36a8f68c095ffb2ad32dba7c2eef22310/wayland-sys/build.rs#L9-L11
I updated a crate that pulled in a new
wayland-sys
, and now I get the following error on CI:The offending line is this, which unfortunately doesn't have a comment:
https://github.com/Smithay/wayland-rs/blob/a078c5b36a8f68c095ffb2ad32dba7c2eef22310/wayland-sys/build.rs#L9-L11
(it would be nice if the
unwrap
was replaced with a helpfulexpect
).CARGO_FEATURE_CLIENT
lead me to look at the documentation for theclient
feature flag, but again I came up short:https://github.com/Smithay/wayland-rs/blob/a078c5b36a8f68c095ffb2ad32dba7c2eef22310/wayland-sys/Cargo.toml#L24-L26
(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?