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

Compilation Error on M2 MacOS 14 #92

Open
neurons9 opened this issue Jan 9, 2024 · 3 comments
Open

Compilation Error on M2 MacOS 14 #92

neurons9 opened this issue Jan 9, 2024 · 3 comments

Comments

@neurons9
Copy link

neurons9 commented Jan 9, 2024

Compiling ioctl-rs v0.1.6
error[E0277]: cannot subtract chrono::Duration from Tm
--> /Users/joa/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-http-1.0.1/src/cookie/jar.rs:224:44
|
224 | cookie.set_expires(time::now() - Duration::days(365));
| ^ no implementation for Tm - chrono::Duration
|
= help: the trait Sub<chrono::Duration> is not implemented for Tm
= help: the following other types implement trait Sub<Rhs>:
<Tm as Subtime::Duration>

Compiling lock_api v0.3.4
error[E0308]: mismatched types
--> /Users/joa/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-http-1.0.1/src/cookie/mod.rs:736:40
|
736 | self.set_expires(time::now() + twenty_years);
| ^^^^^^^^^^^^ expected time::Duration, found chrono::Duration
|
= note: chrono::Duration and time::Duration have similar names, but are actually distinct types
note: chrono::Duration is defined in crate chrono
--> /Users/joa/.cargo/registry/src/index.crates.io-6f17d22bba15001f/chrono-0.4.31/src/duration.rs:55:1
|
55 | pub struct Duration {
| ^^^^^^^^^^^^^^^^^^^
note: time::Duration is defined in crate time
--> /Users/joa/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.1.45/src/duration.rs:45:1
|
45 | pub struct Duration {
| ^^^^^^^^^^^^^^^^^^^

how can I fix this? And what file type are the binaries for macOS in the releases?

@patrickelectric
Copy link
Member

Hi @neurons9, this is pretty weird, mac M* family should be aarch64, there is a binary available on our release CI if you want to try.

How did you install Rust in your computer ? Did you follow the book ?

@neurons9
Copy link
Author

neurons9 commented Jan 9, 2024

Hi @patrickelectric, thanks for your quick reply!
I have installed Rust with the command:
curl https://sh.rustup.rs -sSf | sh
What file types are the binaries? I can't open or run them...
ah got it... sorry

@patrickelectric
Copy link
Member

I only have a mac m1 but I can compile fine here, from the issues that you are pointing, may be a dependence break or something.
Try to cargo clean, cargo update and cargo build

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