Skip to content

Commit

Permalink
Use protoc x86_64 on Apple M1 aarch64
Browse files Browse the repository at this point in the history
The old protoc version 3.5.1 atlasdb uses does not yet support Apple M1 aarch64
(see protocolbuffers/protobuf#8062), so use x86_64 until
atlasdb upgrades to protoc 3.18.0+ which add osx-aarch_64.
  • Loading branch information
schlosna committed Apr 21, 2022
1 parent 83cec56 commit e33e100
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion atlasdb-client-protobufs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ apply from: "../gradle/shared.gradle"

apply plugin: 'com.google.protobuf'

// The protoc version atlasdb uses does not yet support Apple M1 aarch64
// (see https://github.com/protocolbuffers/protobuf/issues/8062), so use x86_64.
def protocArch = 'osx-aarch_64'.equals(osdetector.classifier) ? 'osx-x86_64' : osdetector.classifier
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:${libVersions.protoc}"
artifact = "com.google.protobuf:protoc:${libVersions.protoc}:${protocArch}"
}
}

Expand Down
5 changes: 4 additions & 1 deletion examples/profile-client-protobufs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ group = 'com.palantir.atlasdb.examples'

apply plugin: 'com.google.protobuf'

// The protoc version atlasdb uses does not yet support Apple M1 aarch64
// (see https://github.com/protocolbuffers/protobuf/issues/8062), so use x86_64.
def protocArch = 'osx-aarch_64'.equals(osdetector.classifier) ? 'osx-x86_64' : osdetector.classifier
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:${libVersions.protoc}"
artifact = "com.google.protobuf:protoc:${libVersions.protoc}:${protocArch}"
}
}

Expand Down
5 changes: 4 additions & 1 deletion leader-election-api-protobufs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ apply from: "../gradle/shared.gradle"

apply plugin: 'com.google.protobuf'

// The protoc version atlasdb uses does not yet support Apple M1 aarch64
// (see https://github.com/protocolbuffers/protobuf/issues/8062), so use x86_64.
def protocArch = 'osx-aarch_64'.equals(osdetector.classifier) ? 'osx-x86_64' : osdetector.classifier
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:${libVersions.protoc}"
artifact = "com.google.protobuf:protoc:${libVersions.protoc}:${protocArch}"
}
}

Expand Down

0 comments on commit e33e100

Please sign in to comment.