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

The base template does not compile when using Metal (Mac OS) #99

Closed
Quetzal2 opened this issue Dec 11, 2019 · 6 comments
Closed

The base template does not compile when using Metal (Mac OS) #99

Quetzal2 opened this issue Dec 11, 2019 · 6 comments

Comments

@Quetzal2
Copy link

Quetzal2 commented Dec 11, 2019

This is not like #97, because I am not talking about a published version of Amethyst (like v0.13.2). This makes it a bit trickier to solve (can't just add a template in https://github.com/amethyst/tools/tree/master/templates, like #98).

The issue with Amethyst v0.13.2 (and below)

The actual issue is that amethyst v0.13.2 pulls the metal crate (metal-rs) v0.15.0:
amethyst v0.13.2
→ amethyst_animation v0.8.1
→ amethyst_rendy v0.3.0
→ rendy v0.3.2
→ rendy-command v0.3.0
→ rendy-util v0.3.1
→ gfx-backend-metal v0.2.4
→ metal v0.15.0 .

However, only metal v0.16.0 compiles, having the msg_send explicit typing fix (previous versions did not have it -> SSheldon/rust-objc#62 (comment) . This raises now a compilation error). Prior versions of metal (and some other libraries) do not compile anymore. This is the commit fixing this issue (after v0.15.0): gfx-rs/metal-rs@032800f#diff-b4aea3e418ccdb71239b96952d9cddb6

Using Amethyst master

This leaves Mac OS users no other choice (that I know of) than to use the current master, which pulls metal v0.16.0, which is great! :)

The only issue is that the v0.12.0 template (v0.12.0 is the current Amethyst version used) is not compatible with current master, which makes sense, since it has not been released yet. These are the simple fixes (one of them will already be introduced for v0.13.2) Quetzal2@6d2f66c .

Conclusion

The Mac OS platform has no straight forward way to have an Amethyst base project as of now.

Maybe it's worth waiting for the next release, but at least I wanted to raise awareness of the situation of the metal backend. Basically, earlier versions of those packages don't compile anymore, so it is important to use the latest ones.

@0x6273
Copy link
Contributor

0x6273 commented Dec 12, 2019

I believe downgrading the objc crate to 0.2.6 lets you build the releases on mac os. cargo update -p objc --precise 0.2.6. But I don't have a mac to test this.

The templates should probably include a Cargo.lock file to ensure this sort of breakage doesn't keep happening.

@Quetzal2
Copy link
Author

That works too. I tested it, and can confirm that this "fixes" the issue. I think that this is a good simple trick to bypass the issue for now, as the next Amethyst release will fix it in a clean way.

Including a Cargo.lock in the templates (at least the current one (v0.12.0)) would be great, since this tool is supposed to be usable by newcomers too, and asking them to do this manually could be tricky, since they could miss the information, following other tutorials, or trying Amethyst out by themselves. Adding it to the Readme could be a way to inform the users. If the new Amethyst release is coming soon, we could also simply add the fix, without communicating about it and use this issue as reference if needed.

@hectorgrey
Copy link

What I have done is to use amethyst new, and then update the cargo.Toml to use the latest (0.14 at time of writing), followed by correcting a couple of compile errors in the provided main.rs. So far as I can tell, amethyst_tools only really includes update and new, so this should hopefully work until amethyst_tools is upgraded to use the latest stable release.

@0x6273
Copy link
Contributor

0x6273 commented Mar 25, 2020

Can someone confirm if this still happens with the 0.13.2 template? I believe the 0.15.1 release of metal-rs should have fixed this, but I don't have a Mac to test this on.

@nickbryan
Copy link

Can someone confirm if this still happens with the 0.13.2 template? I believe the 0.15.1 release of metal-rs should have fixed this, but I don't have a Mac to test this on.

@0x6273 I have updated to the latest version created a new test project with no changes and this compiles/runs fine for me on my mac running Catalina 10.15.3.

Get a nice purple window :)

@CleanCut
Copy link
Member

👋 I'm closing all PRs and Issues since amethyst_tools is being end-of-life'd. Please see this forum post for a place to respond and/or discuss the situation rather than here on the repo.

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

5 participants