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

same build error Win10 #13

Open
clive-g-brown opened this issue May 19, 2020 · 5 comments
Open

same build error Win10 #13

clive-g-brown opened this issue May 19, 2020 · 5 comments

Comments

@clive-g-brown
Copy link

Only change I made was to Csrgo.toml to update spmc as the version in there is gone. ArrayFire-rust alone compiles fine

error[E0277]: (dyn std::ops::Fn(defines::AfError) + 'static) cannot be shared between threads safely
--> arrayfire-rust\src\error.rs:25:1
|
25 | pub static DEFAULT_HANDLE_ERROR: &'static ErrorCallback = &handle_error_general;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (dyn std::ops::Fn(defines::AfError) + 'static) cannot be shared between threads safely
|
= help: within &'static (dyn std::ops::Fn(defines::AfError) + 'static), the trait std::marker::Sync is not implemented for (dyn std::ops::Fn(defines::AfError) + 'static)
= note: required because it appears within the type &'static (dyn std::ops::Fn(defines::AfError) + 'static)
= note: shared static variables must have a type that implements Sync

@jramapuram
Copy link
Owner

This is most likely because you are probably using a newer Rust version (untested).
Can you try using rustup to get 1.8 and try it?

@clive-g-brown
Copy link
Author

thanks, the highest version I can find is 1.44.0

@jramapuram
Copy link
Owner

Yup, its a little counter-intuitive, but 1.8.0 is older than 1.44.0
Try:

rustup toolchain install 1.8.0

@clive-g-brown
Copy link
Author

yeah tried that, doesn't seem to find it. never mind.

@jramapuram
Copy link
Owner

Strange, seems to work for me:

image

In either case, I have not worked on this repo in a long time (since tensorflow / pytorch) as I'm working on my PhD. If you did want to work on it I would suspect it wouldn't work out-of-the-box anyhow.

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

2 participants