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

Build error on mac M1 #53

Closed
abhinav7sinha opened this issue Oct 6, 2022 · 2 comments · Fixed by #102
Closed

Build error on mac M1 #53

abhinav7sinha opened this issue Oct 6, 2022 · 2 comments · Fixed by #102
Assignees

Comments

@abhinav7sinha
Copy link

I get the following error when I try to build the project using the script: ./scripts/build.sh

[ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.1:compile (default) on project mft-common-proto: Missing:
[ERROR] ----------
[ERROR] 1) com.google.protobuf:protoc:exe:osx-aarch_64:3.0.2
[ERROR] 
[ERROR]   Try downloading the file manually from the project website.
[ERROR] 
[ERROR]   Then, install it using the command: 
[ERROR]       mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.0.2 -Dclassifier=osx-aarch_64 -Dpackaging=exe -Dfile=/path/to/file
[ERROR] 
[ERROR]   Alternatively, if you host your own repository you can deploy the file there: 
[ERROR]       mvn deploy:deploy-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.0.2 -Dclassifier=osx-aarch_64 -Dpackaging=exe -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR] 
[ERROR]   Path to dependency: 
[ERROR]   	1) org.apache.airavata:mft-common-proto:jar:0.01-SNAPSHOT
[ERROR]   	2) com.google.protobuf:protoc:exe:osx-aarch_64:3.0.2
[ERROR] 
[ERROR] ----------
[ERROR] 1 required artifact is missing.
[ERROR] 
[ERROR] for artifact: 
[ERROR]   org.apache.airavata:mft-common-proto:jar:0.01-SNAPSHOT
[ERROR] 
[ERROR] from the specified remote repositories:
[ERROR]   apache.snapshots (https://repository.apache.org/snapshots, releases=false, snapshots=true),
[ERROR]   central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)

This is because com.google.protobuf:protoc:3.0.2 doesn't have support for Apple Silicon. Here's the referenced github issue in the protobuf repo.

@abhinav7sinha
Copy link
Author

The newer protobuf binaries have mac m1 support.

  1. so one possible solution is to bump protobuf from com.google.protobuf:protoc:3.0.2 to the latest com.google.protobuf:protoc:3.21.7.
  2. A possible workaround is to use osx-x86_64 the os.detected.classifier for mac m1.

I'm currently using the 2nd approach (use osx-x86_64 as the os.detected.classifier) and it works. But a better approach would be to use the newer protobuf version. I'll test it and let you know if it works well.

@DImuthuUpe
Copy link
Contributor

@abhinav7sinha what is the status of this issue?

@machristie machristie self-assigned this May 17, 2023
machristie added a commit that referenced this issue May 17, 2023
DImuthuUpe pushed a commit that referenced this issue May 25, 2023
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

Successfully merging a pull request may close this issue.

3 participants