Hi! I'm really excited to try out nannou. I'm having some issues compiling it on macOS 10.14.5. When I run cargo run --release --example simple_draw in the nannou repository, I'm getting an error compiling the metal crate.
I've tried compiling on both of these toolchains:
stable-x86_64-apple-darwin -- rustc 1.38.0 (625451e37 2019-09-23)
nightly-x86_64-apple-darwin -- rustc 1.40.0-nightly (c23a7aa77 2019-10-19)
On both toolchains, I get an error compiling the metal crate:
Compiling metal v0.13.1
error[E0282]: type annotations needed
--> /Users/bencongdon/.cargo/registry/src/github.com-1ecc6299db9ec823/metal-0.13.1/src/lib.rs:128:13
|
128 | msg_send![self.0, release];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider giving `result` a type
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
Here's the full error (though I don't think it yields much more information): https://pastebin.com/9YXijsjZ
Do you have any ideas of how I could fix this? Thanks! 馃槃
Thanks for the issue @bcongdon!
@JoshuaBatty @freesig are either of you on 10.14.5 and can try recreate this?
It looks like vulkano-win uses the metal crate, but it seems master is using 0.17 whereas the version of vulkano used by nannou seems to use 0.13.1 judging by your error. I wonder if this has been addressed in one of the recent updates to vulkano's master branch.
@bcongdon could you try running the triangle example that's in the vulkano repo on the master branch? If that works, then we likely just need to update our vulkano version, but this also means updating conrod's vulkano version first.
Thanks for looking into this! Yup -- I was able to run the triangle example of vulkano 馃檪
I see the same problem on macOS 10.15.
Same here, macOs 10.14.6
About vulkano's triangle example - it starts successfully
Anyone have a fix for this? On Catalina as well.
Just a heads up, fixing this within conrod and nannou relies on the next version of vulkano getting published which is currently pending winit 0.20 getting published.
If you have a project that depends on nannou, you may be able to work around this by patching the vulkano dependency with the master git branch. e.g. adding this to your toml:
[patch.crates-io]
vulkano = { git = "https://github.com/vulkano-rs/vulkano", branch = "master" }
If you're trying to run the nannou examples within the nannou repo itself, you will also need to change the existing vulkano entry under [dependencies] to:
#vulkano = "0.14"
vulkano = { git = "https://github.com/vulkano-rs/vulkano", branch = "master" }
You may be able to patch the metal dependency in a similar manner rather than patching vulkano, seeing as the metal crate is the culprit here. I'm not sure if these suggestions will cause other compiler errors as I don't have a macOS machine with me, but they could be worth a shot!
Edit: here are the docs on patch for reference.
The patch does not work. My build still fails Compiling metal v0.13.1. I tried explicitly doing a patch for metal itself: no change. Reading the patch documentation, I'm not at all sure it will override a transitive dependency, which is what we want here.
Patch really does deal with transitive dependencies, but it demands that versions match. The master branch of vulkano-rs hasvulkano-win at 0.15.0, so the patch has no impact for dependencies that call for vulkano-win of 0.14.0. Grabbing a checkout of vulkano and hacking it a bit, then this patch works in my little project
[patch.crates-io]
vulkano = { path = "../vulkano/vulkano" }
vulkano-win = { path = "../vulkano/vulkano-win" }
vulkano-shaders = { path = "../vulkano/vulkano-shaders" }
In my local vulkano checkout, I rolled back to the 0.14.0 release commit 814dacdab923771f8a818f7925785d347ddd4866, then updated dependencies for vulkano-win like this:
git diff
diff --git a/vulkano-win/Cargo.toml b/vulkano-win/Cargo.toml
index 465a6cad..928f3d30 100644
--- a/vulkano-win/Cargo.toml
+++ b/vulkano-win/Cargo.toml
@@ -16,6 +16,6 @@ winit = "0.19"
vulkano = { version = "0.14.0", path = "../vulkano" }
[target.'cfg(target_os = "macos")'.dependencies]
-metal = "0.13"
-cocoa = "0.18"
-objc = "0.2.2"
+metal = "0.17.0"
+cocoa = "0.19.1"
+objc = "0.2.7"
0.15 was an accidental release. I don't have the power to yank packages. The errors defined here where the same the CI was outputting before I updated these deps.
@mitchmindtree If this is an issue that is impacting nannou I could release an alpha version of vulkano and it's packages or if you think going ahead with the release of 0.16 with winit alpha is alright. I don't know about the stability of the alpha version and how many breaking changes there will be before the official 0.20
@AustinJ235 is there any chance we could see vulkano 0.16 published that continues to depend on winit 0.19.4? Perhaps the recent commit that updates vulkano's winit dependency to 0.20 could be moved to another branch while we wait for a stable version of winit 0.20 to be published?
@mitchmindtree All goes well with the CI I should have a vulkano release out today with winit 0.19. https://github.com/vulkano-rs/vulkano/pull/1267
Looking into this now 馃憖
It's working fine on my mac. I'm updating Rust to see if it breaks although I dout it.
hmmmm.
This is on the latest master?
Actually this might be because I have an old version on vulkan. I'll update that as well.
Ok latest vulkano, rust, and nannou master. No issues.
I'm on 10.14.6.
Is this still broken??
Very strange because my Cargo.lock is pointing at metal-0.13.1 and it compiles without issue.
I'd suggest either running cargo update or deleting the Cargo.lock file. All versions should be up to date.
Thanks a lot @AustinJ235!
It looks like 0.16 of vulkano published successfully, though it seems vulkano-shaders and vulkano-win haven't yet been published?
Once they're published we can start the process of updating conrod_vulkano, shade_runner and nannou for this new version.
Just to say that I have tested the push from yesterday and now it compiles. the example simple_draw it is a bit laggy, it does not update when the mouse move but just when I click. The example 2_2_forces_many works smoothly. Thanks for the fix ;)
Hey folks! I have a nannou branch up now where this has been fixed. Josh's laptop secretly updated behind the scenes and so he ran into this today, we were able to confirm that this branch does fix the issue:
nannou = { git = "https://github.com/mitchmindtree/nannou", branch = "publish" }
Just waiting on shade_runner to get published then will merge and publish nannou 0.12 with the fix! Thanks everyone for reporting and sorry about the delay!
Edit: PR is up here if interested #421.
I have just pulled from master, and actually I still have an error when trying to run "simple_draw". This time is cocoa complaining:
--> /Users/da1/.cargo/registry/src/github.com-1ecc6299db9ec823/cocoa-0.18.4/src/appkit.rs:544:9
|
544 | msg_send![self, releaseGlobally];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| cannot infer type
| consider giving `result` a type
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
Would you mind trying cargo update? It looks like cocoa-0.18.4 has been pulled down, however the latest patch version is cocoa-0.18.5 - running cargo update should automatically cause it to update that tiny patch version. Hopefully this fixes your issue!
it worked ;)
Most helpful comment
0.15was an accidental release. I don't have the power to yank packages. The errors defined here where the same the CI was outputting before I updated these deps.@mitchmindtree If this is an issue that is impacting nannou I could release an alpha version of vulkano and it's packages or if you think going ahead with the release of
0.16with winit alpha is alright. I don't know about the stability of the alpha version and how many breaking changes there will be before the official0.20