Skip to content

Apple M1 support #535

@fade2black

Description

@fade2black

My MacOS is Apple M1 chipset, with Sonoma 14.2

I installed protobuf using brew install protobuf and tried to compile to compile an empty hello, world! project with raft crate included. The compilation failed with

   Compiling raft-proto v0.7.0
error: failed to run custom build command for `raft-proto v0.7.0`

Caused by:
  process didn't exit successfully: `/Users/bayram/Projects/Rust/hello-raft/target/debug/build/raft-proto-c2bff7cf48736de7/build-script-build` (exit status: 101)
  --- stdout
  The system `protoc` version mismatch, require >= 3.1.0, got 25.1.x, fallback to the bundled `protoc`

  --- stderr
  thread 'main' panicked at /Users/bayram/.cargo/registry/src/index.crates.io-6f17d22bba15001f/protobuf-build-0.14.1/src/protobuf_impl.rs:35:14:
  No suitable `protoc` (>= 3.1.0) found in PATH
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I guess it is related to these lines inside protobuf_impl.rs

let protoc_bin_name = match (env::consts::OS, env::consts::ARCH) {
        ("linux", "x86") => "protoc-linux-x86_32",
        ("linux", "x86_64") => "protoc-linux-x86_64",
        ("linux", "aarch64") => "protoc-linux-aarch_64",
        ("linux", "powerpc64") => "protoc-linux-ppcle_64",
        ("macos", "x86_64") => "protoc-osx-x86_64",
        ("windows", _) => "protoc-win32.exe",
        _ => panic!("No suitable `protoc` (>= 3.1.0) found in PATH"),
    };

Or does it support M1 chipset and am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions