Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wayland build error without wayland feature #3038

Closed
LinusU opened this issue May 31, 2023 · 3 comments · Fixed by #3228
Closed

Wayland build error without wayland feature #3038

LinusU opened this issue May 31, 2023 · 3 comments · Fixed by #3228
Labels
bug Something is broken
Milestone

Comments

@LinusU
Copy link

LinusU commented May 31, 2023

Describe the bug
I'm trying to run egui on an Olimex Allwinner A13 board which I'm running Linux 3.4.90 on. There is a few qt applications running, so I'm guessing that it has X11.

I have added eframe to my empty project using cargo add eframe. It shows that the feature wayland isn't enabled:

Screenshot 2023-05-31 at 22 11 07

But when trying to build the project, it fails with a build error in winit-0.28.6/src/platform_impl/linux/wayland/protocols.rs:

error: couldn't read /Users/linus/coding/brewie-egui/target/armv7-unknown-linux-musleabihf/release/build/winit-bffde51e9e2d0966/out/fractional_scale_v1.rs: No such file or directory (os error 2)
  --> /Users/linus/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.28.6/src/platform_impl/linux/wayland/protocols.rs:13:1
   |
13 | include!(concat!(env!("OUT_DIR"), "/fractional_scale_v1.rs"));
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `winit` due to previous error

It seems like the wayland feature is getting enabled in the winit crate, even if not enabled in eframe.

(I also tested this using eframe from latest git master, same error)

To Reproduce
Steps to reproduce the behavior:

  1. cargo init
  2. cargo add eframe
  3. Copy in minimal eframe example from https://docs.rs/eframe/latest/eframe/ to main.rs
  4. cargo build --release --target armv7-unknown-linux-musleabihf

Expected behavior
I expected no wayland-related build errors

Screenshots
n/a

Desktop (please complete the following information):

  • OS: Linux
  • Browser n/a
  • Version 3.4.90

Smartphone (please complete the following information):

  • Device: n/a
  • OS: n/a
  • Browser n/a
  • Version n/a

Additional context
n/a

@LinusU LinusU added the bug Something is broken label May 31, 2023
@RealRTTV
Copy link

RealRTTV commented Aug 1, 2023

Encountering the same issue cross-compiling windows -> aarch linux

@emilk
Copy link
Owner

emilk commented Aug 10, 2023

Good catch! eframe depends on winit without the default-features = false. Will fix!

BTW, you can figure out which crates causes a feature to be enabled with cargo tree -p winit -e features -i

@emilk
Copy link
Owner

emilk commented Aug 10, 2023

#3228 should solve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants