PistonDevelopers / conrod

An easy-to-use, 2D GUI library written entirely in Rust.
Other
3.35k stars 296 forks source link

Build failure in `conrod_vulkano` discovered on rasberry pi. #1409

Open thesnout opened 3 years ago

thesnout commented 3 years ago

I see this error after following the instructions in chapter 2:

pi@hovind:~/conrod/conrod $ cargo build Compiling shaderc-sys v0.6.3 Compiling naga v0.2.0 Compiling futures-executor v0.3.12 Compiling rendy-core v0.5.1 Compiling wayland-client v0.23.6 Compiling vulkano v0.16.0 Compiling futures v0.3.12 Compiling wayland-protocols v0.28.3 error[E0609]: no field shaderf3264 on type vk::PhysicalDeviceFeatures --> /home/pi/.cargo/registry/src/github.com-1285ae84e5963aae/vulkano-0.16.0/src/features.rs:164:21 | 164 | shader_f3264 => shaderf3264, | ^^^^^^^^^^^ help: a field with a similar name exists: shaderInt64

error[E0560]: struct vk::PhysicalDeviceFeatures has no field named shaderf3264 --> /home/pi/.cargo/registry/src/github.com-1285ae84e5963aae/vulkano-0.16.0/src/features.rs:164:21 164 shader_f3264 => shaderf3264, ^^^^^^^^^^^ vk::PhysicalDeviceFeatures does not have this field
= note: available fields are: `robustBufferAccess`, `fullDrawIndexUint32`, `imageCubeArray`, `independentBlend`, `geometryShader` ... and 50 others
error[E0308]: mismatched types --> /home/pi/.cargo/registry/src/github.com-1285ae84e5963aae/vulkano-0.16.0/src/command_buffer/sys.rs:1303:38 1303 vk.CmdSetBlendConstants(cmd, constants); // TODO: correct to pass array? ^^^^^^^^^
expected &[f32; 4], found array [f32; 4]
help: consider borrowing here: &constants

Compiling wayland-cursor v0.28.3 Compiling wayland-egl v0.28.3 Compiling rendy-resource v0.5.1 Compiling rendy-command v0.5.1 error: aborting due to 3 previous errors

Some errors have detailed explanations: E0308, E0560, E0609. For more information about an error, try rustc --explain E0308. error: could not compile vulkano.

pi@hovind:~/conrod/conrod $ rustc --version rustc 1.47.0 (18bf6b4f0 2020-10-07) pi@hovind:~/conrod/conrod $ cargo --version cargo 1.47.0 (f3c7e066a 2020-08-28) pi@hovind:~/conrod/conrod $ uname -srm Linux 5.4.79-v7l+ armv7l

alvinhochun commented 3 years ago

Hi, there was some breaking changes in the vk-sys crate which vulkano had been using, which is causing the build error you got. Anyway, you don't need to have the Vulkan code working. If you just run the examples directly as stated in the latest guide, e.g. cargo run --release --example all_winit_glium, it should build fine without triggering those errors.

mitchmindtree commented 3 years ago

Thanks for the report @thesnout!

I'm currently unsure of the best way to work around this issue. I am personally not invested in the vulkano backend and solely use conrod_wgpu which I think wgpu provides a much smoother approach to targeting vulkan on linux these days.

That said, I don't think it's acceptable for us to leave CI in this state. I'm thinking I'll open a PR that splits up the CI for each backend, making it clearer which are currently succeeding and which are not. Edit: I've opened a PR for this at #1412.