Support for M1 Macs (osx-aarch_64)
See original GitHub issue% java -jar .m2/repository/com/github/os72/protoc-jar/3.11.4/protoc-jar-3.11.4.jar -pp
------------------------------------------------------------------------
Detecting the operating system and CPU architecture
------------------------------------------------------------------------
os.detected.name: osx
os.detected.arch: aarch_64
os.detected.version: 11.1
os.detected.version.major: 11
os.detected.version.minor: 1
os.detected.classifier: osx-aarch_64
Detected platform: osx-aarch_64 (mac os x/aarch64)
Would it be possible to add to protoc-jar/bin// a protoc--osx-aarch_64.exe? Temporarily, it can probably even be a copy of protoc-*-osx-x86_64.exe as it should run on M1 macs.
I also have a brew installed protoc that seems to be compiled for arm, if you need it.
% file /opt/homebrew/Cellar/protobuf/3.14.0/bin/protoc
/opt/homebrew/Cellar/protobuf/3.14.0/bin/protoc: Mach-O 64-bit executable arm64
% ls -l /opt/homebrew/Cellar/protobuf/3.14.0/bin/protoc
-r-xr-xr-x 1 cmardini staff 71872 4 Jan 16:22 /opt/homebrew/Cellar/protobuf/3.14.0/bin/protoc
% md5 /opt/homebrew/Cellar/protobuf/3.14.0/bin/protoc
MD5 (/opt/homebrew/Cellar/protobuf/3.14.0/bin/protoc) = 0da061ae62c179f668ff4a544377cec3
The protoc-jar-maven-plugin seems to request this for the embedded protoc.
[INFO] Protoc version: 3.11.0
protoc-jar: protoc version: 3.11.0, detected platform: osx-aarch_64 (mac os x/aarch64)
protoc-jar: downloading: https://repo.maven.apache.org/maven2/com/google/protobuf/protoc/maven-metadata.xml
protoc-jar: saved: /var/folders/gq/883qwjg91_x4pyq995m7vct40000gn/T/protocjar.webcache/com/google/protobuf/protoc/maven-metadata.xml
protoc-jar: downloading: https://repo.maven.apache.org/maven2/com/github/os72/protoc/maven-metadata.xml
protoc-jar: saved: /var/folders/gq/883qwjg91_x4pyq995m7vct40000gn/T/protocjar.webcache/com/github/os72/protoc/maven-metadata.xml
protoc-jar: cached: /var/folders/gq/883qwjg91_x4pyq995m7vct40000gn/T/protocjar.webcache/com/google/protobuf/protoc/maven-metadata.xml
protoc-jar: downloading: https://repo.maven.apache.org/maven2/com/google/protobuf/protoc/3.11.0/protoc-3.11.0-osx-aarch_64.exe
protoc-jar: cached: /var/folders/gq/883qwjg91_x4pyq995m7vct40000gn/T/protocjar.webcache/com/github/os72/protoc/maven-metadata.xml
protoc-jar: downloading: https://repo.maven.apache.org/maven2/com/github/os72/protoc/3.11.0/protoc-3.11.0-osx-aarch_64.exe
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.323 s
[INFO] Finished at: 2021-01-05T09:25:11-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.os72:protoc-jar-maven-plugin:3.11.4:run (default) on project webapi-grpc-clients: Error extracting protoc for version 3.11.0: Unsupported platform: protoc-3.11.0-osx-aarch_64.exe -> [Help 1]
To workaround, I’ve done the following:
mvn install:install-file -DgroupId=com -DartifactId=github -Dversion=os72 -Dclassifier=3.14.0 -Dpackaging=protoc -Dfile=/opt/homebrew/Cellar/protobuf/3.14.0/bin/protoc
and then in the plugin configuration in pom.xml:
<protocVersion>3.14.0</protocVersion>
<protocArtifact>com:github:os72:protoc:3.14.0</protocArtifact>
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:16 (3 by maintainers)
Top Results From Across the Web
Apple M1 Processor Overview and Compatibility - Toptal
The M1 has a standard range of I/O options with a Thunderbolt controller capable of supporting USB 4. However, there's no support for...
Read more >Mac computers with Apple silicon
Mac computers with Apple silicon · MacBook Air (M2, 2022) · MacBook Pro (13-inch, M2, 2022) · Mac Studio (2022) · MacBook Pro...
Read more >what is the difference between mac m1 vs apple silicon vs ...
ARM64 = “Apple Silicon” including the M1 chip. So if you hate their super pretentious name, you can just say “ARM Mac” like...
Read more >Running x86_64-based containers on Mac computers with an ...
Tutorial. Running x86_64-based containers on Mac computers with an Apple silicon (M1) processor. Configuring Podman VMs to run both ...
Read more >Setting up the Apple M1 for Code Development - CPU fun
The Apple M1 is an Apple implementation of an Arm 64-bit (AArch64) architecture processor. To allow machines built with this processor to run ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
in the meantime, I was able to run the process in a Apple M1 chip using the parameter “-Dos.arch=x86_64” with the maven goals
Suggested workaround for the time being:
brew install protobufhttps://formulae.brew.sh/formula/protobufI was able to add the property to a m1 maven build profile