spacemeowx2 / blflash

bl602 serial flasher
Apache License 2.0
54 stars 15 forks source link

How about release Apple silicon binary version ? #8

Open Pillar1989 opened 2 years ago

Pillar1989 commented 2 years ago

How about release Apple silicon binary version ?

spacemeowx2 commented 2 years ago

https://github.com/actions/virtual-environments/issues/2187

Seems need to wait Github actions to support this platform

GPSBabelDeveloper commented 2 years ago

Does the Intel version not run under Rosetta? I just pulled the source onto an M1 and typed 'cargo build' (there probably should be a Makefile or a paragraph in doc...) If that's a correct way to build, it does indeed fail, but not "obviously" in an M1-specific way.

@Pillar1989 , is this the error that cause you to file the bugreport?

Compiling bitvec v0.22.3 Compiling clap v2.33.3 error[E0433]: failed to resolve: could not find addr_of in ptr --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.22.3/src/ptr/single.rs:141:17 | 141 | unsafe { ptr::addr_of!(self.addr).read_unaligned() } | ^^^^^^^ could not find addr_of in ptr

Compiling serial-unix v0.4.0 error[E0658]: const generics are unstable --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.22.3/src/array/traits.rs:204:22 204 impl<'a, O, T, const N: usize> TryFrom<&'a BitSlice<O, T>> ^
= note: see issue #74878 <https://github.com/rust-lang/rust/issues/74878> for more information
error[E0658]: const generics are unstable --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.22.3/src/array/traits.rs:244:22 244 impl<'a, O, T, const N: usize> TryFrom<&'a BitSlice<O, T>> ^
= note: see issue #74878 <https://github.com/rust-lang/rust/issues/74878> for more information
error[E0658]: const generics are unstable --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.22.3/src/array/traits.rs:285:22 285 impl<'a, O, T, const N: usize> TryFrom<&'a mut BitSlice<O, T>> ^
= note: see issue #74878 <https://github.com/rust-lang/rust/issues/74878> for more information
error[E0658]: const generics are unstable --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.22.3/src/view.rs:135:15 135 impl<T, const N: usize> BitView for [T; N] ^
= note: see issue #74878 <https://github.com/rust-lang/rust/issues/74878> for more information

error[E0658]: const generics are unstable --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.22.3/src/view.rs:171:15 | 171 | impl<T, const N: usize> BitViewSized for [T; N] An undeclared crate, module, or type was used.

Erroneous code example:

let map = HashMap::new();
// error: failed to resolve: use of undeclared type `HashMap`

Please verify you didn't misspell the type/module's name or that you didn't forget to import it:

use std::collections::HashMap; // HashMap has been imported.
let map: HashMap<u32, u32> = HashMap::new(); // So it can be used!

If you've expected to use a crate name:

use ferris_wheel::BigO;
// error: failed to resolve: use of undeclared crate or module `ferris_wheel`

Make sure the crate has been added as a dependency in Cargo.toml.

To use a module from your current crate, add the crate:: prefix to the path. ...skipping... ^
= note: see issue #74878 <https://github.com/rust-lang/rust/issues/74878> for more information

Compiling serial v0.4.0 Compiling digest v0.9.0 Compiling block-buffer v0.9.0 Compiling parse_int v0.5.0 Compiling regex v1.5.4 Compiling sha2 v0.9.5 Compiling console v0.14.1 Compiling env_logger v0.8.3 Compiling indicatif v0.16.0 error: aborting due to 6 previous errors

Some errors have detailed explanations: E0433, E0658. For more information about an error, try rustc --explain E0433. error: could not compile bitvec

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

@spacemeowx2 , I don't know Rust but I can type things and report results. I could probably help make a build available, but it's probably best to focus on making it trivial to build for everyone.

I have PineCone/PineNut, DoIT, and a few other misc Bouffalo boards where I can do pass/fail testing if it's helpful. The upload barrier has been the reasons those boards have been largely idle.

spacemeowx2 commented 2 years ago

@GPSBabelDeveloper Make sure your rust version is latest stable(install using rustup). I just compiled on M1 without error.

https://doc.rust-lang.org/stable/std/ptr/macro.addr_of.html

See top right of the page, you can see addr_of is added in 1.51.0

GPSBabelDeveloper commented 2 years ago

Confirmed that gets it building. Since you're running on M1 it seems the original problem report should probably be closed.

Hopefully, I'll leave this better I found it. Please consider closing this and reviewing http://github.com/spacemeowx2/blflash/pull/10

Thanx.

On Thu, Feb 3, 2022 at 1:56 PM imspace @.***> wrote:

@GPSBabelDeveloper https://github.com/GPSBabelDeveloper Make sure your rust version is latest stable(install using rustup). I just compiled on M1 without error.

https://doc.rust-lang.org/stable/std/ptr/macro.addr_of.html

— Reply to this email directly, view it on GitHub https://github.com/spacemeowx2/blflash/issues/8#issuecomment-1029347545, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC3VADY2ROEYQRSNZH2AZB3UZLMWFANCNFSM5H7LJW2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

robertlipe commented 2 years ago

With #10 integration, multiple users on M1 (including me), and OP's silence of many months, this can surely be closed. Thank you, @spacemeowx2