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

Mac OS M1 cpu build protobuf issue , I had fix it ,need update #464

Closed
cherho0 opened this issue Dec 2, 2021 · 5 comments
Closed

Mac OS M1 cpu build protobuf issue , I had fix it ,need update #464

cherho0 opened this issue Dec 2, 2021 · 5 comments

Comments

@cherho0
Copy link

cherho0 commented Dec 2, 2021

protobuf platform error

how to fix:
modify reactive_ble_mobile build.gradle
protoc {

    if (project.hasProperty('protoc_platform')) {
        artifact = "com.google.protobuf:protoc:3.13.0:${protoc_platform}"
    } else {
        artifact = "com.google.protobuf:protoc:3.13.0"
    }
}

add protoc_platform in gradle :
open ~/.gradle
open gradle.properties
add protoc_platform=osx-x86_64

hope update

@remonh87
Copy link
Contributor

remonh87 commented Dec 4, 2021

@cherho0 I think you use an older version because we solved this in #396 . This fix is released in version 5.0.1

@remonh87 remonh87 closed this as completed Dec 4, 2021
@cherho0
Copy link
Author

cherho0 commented Dec 6, 2021

image
I am sure it not work on my m1 macbook , 5.0.1 and 5.0.2

@remonh87
Copy link
Contributor

remonh87 commented Dec 6, 2021

It looks like it is fetching the correct binary but it is not there in the repo. Indeed I checked maven.alivun and the binary is not there. I do not know if this is a specific mirror for China but I am able to build the app here on my M1. However I use different repositories in grade

@cherho0
Copy link
Author

cherho0 commented Dec 7, 2021

It shoule be "com.google.protobuf:protoc:3.13.0:osx-x86_64" but not osx-aarch_64.exe , I got your source code ,there is not the code "osdetector.os == "osx" here

@davormaricdev
Copy link

@cherho0 no, it shouldn't. M1 is based on ARM (aarch_64) chipset and not on x86_64. aarc_64 is available under this maven repository: https://repo1.maven.org/maven2/com/google/protobuf/protoc/3.18.1/
It looks like your build.gradle is using different maven repository

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

3 participants