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

Build failure after adding bevy_pixels to project. #9

Closed
merehap opened this issue Mar 1, 2022 · 4 comments
Closed

Build failure after adding bevy_pixels to project. #9

merehap opened this issue Mar 1, 2022 · 4 comments

Comments

@merehap
Copy link

merehap commented Mar 1, 2022

I just added this to my Cargo.toml on PopOS Linux:
bevy = { version = "0.6", default_features = false } bevy_pixels = "0.3"

(Swapping in bevy 0.6.1 doesn't change anything.)

The result was this error message:

error: Please select a feature to build for unix: x11, wayland
--> /home/sean/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.26.1/src/platform_impl/linux/mod.rs:10:1
|
10 | compile_error!("Please select a feature to build for unix: x11, wayland");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This is the same problem that this other project is facing: StarArawn/bevy_tiled#65

I modified the bevy dependency as mentioned in that ticket to:
bevy = { version = "0.5", default-features = false, features = ["x11"] }
and everything worked.

Potential fix here, but it presumably won't work well for wayland users: https://github.com/StarArawn/bevy_tiled/pull/66/files

But of course that step shouldn't be required if possible. Could you take a look at how to remove this hiccup from the linux installation process? Thanks!

@dtcristo
Copy link
Owner

dtcristo commented Mar 1, 2022

I've implemented this in 0.4.0. Please let me know if you have further issues.

@dtcristo dtcristo closed this as completed Mar 1, 2022
@adsick
Copy link

adsick commented Mar 1, 2022

Hi, I also had this issue, then mentioned features = ["wayland"], but then this:
image

my workspace config is this:
bevy_pixels is in bevy/crates directory,
the dependencies of bevy_pixels are:

  14   │ [dependencies]
  15 ~ │ bevy = { path = "../../", version = "0.6", default_features = false, features = ["bevy_winit", "wayland"] }
  16   │ pixels = "0.9"

note, I'm using such workspace config because it saves time for not compiling bevy multiple times

@dtcristo
Copy link
Owner

dtcristo commented Mar 1, 2022

I'm not on Linux so can't really look into this issue. If you manage to fix it, I'd be happy to merge a PR.

Try the new version I released and use the "wayland" feature on bevy_pixels in your own project.

[dependencies]
bevy = { version = "0.6", default_features = false }
bevy_pixels = { version = "0.4", features = ["wayland"] }

@adsick
Copy link

adsick commented Mar 1, 2022

using latest bevy with latest bevy_pixels:
the same(
image

[features]
default = ["wayland"]

# Display server protocol support (X11 is enabled by default)
wayland = ["bevy/wayland"]
x11 = ["bevy/x11"]

[dependencies]
bevy = { path = "../../", version = "0.6", default_features = false, features = ["bevy_winit"] }
pixels = "0.9"

[dev-dependencies]
rand = "0.8"

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

No branches or pull requests

3 participants