amethyst / amethyst-starter-2d

Seed project for 2D games
Other
201 stars 42 forks source link

Build Failed on gfx-backend-vulkan-0.3.3 #21

Closed MarkintoshZ closed 4 years ago

MarkintoshZ commented 4 years ago

I clone the repo, did cargo run and this is the error it output at build

error[E0282]: type annotations needed
   --> /Users/zhixingzhang/.cargo/registry/src/github.com-1ecc6299db9ec823/gfx-backend-vulkan-0.3.3/src/window.rs:213:17
    |
213 |                 msg_send![view, setLayer: layer];
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider giving `result` a type
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

For more information about this error, try `rustc --explain E0282`.
error: could not compile `gfx-backend-vulkan`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

I am using MacOS 10.15.5 and rustc version 1.44.1 (c7087fe00 2020-06-17) Wondering if this is a problem this this repo or the gfx-backend-vulkan library.

MarkintoshZ commented 4 years ago

Compiling with default = ["metal"] apparently works on my machine

dawnlarsson commented 4 years ago

Is this issue still active?

linonetwo commented 4 years ago

Seems we can not use default = ["vulkan"] on MacOS...

error[E0282]: type annotations needed
   --> /Users/linonetwo/.cargo/registry/src/mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b/gfx-backend-vulkan-0.3.3/src/window.rs:213:17
    |
213 |                 msg_send![view, setLayer: layer];
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider giving `result` a type
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

For more information about this error, try `rustc --explain E0282`.
error: could not compile `gfx-backend-vulkan`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

I'm using rust stable channel.

dawnlarsson commented 4 years ago

Yes, please read the readme Vulkan dosent work on macOS, Apple has Metal instead

[features] default = ["metal"]