diff --git a/atlasdb-client-protobufs/build.gradle b/atlasdb-client-protobufs/build.gradle index a37361b5114..99f52671dd1 100644 --- a/atlasdb-client-protobufs/build.gradle +++ b/atlasdb-client-protobufs/build.gradle @@ -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}" } } diff --git a/changelog/@unreleased/pr-6005.v2.yml b/changelog/@unreleased/pr-6005.v2.yml new file mode 100644 index 00000000000..2da530e1d89 --- /dev/null +++ b/changelog/@unreleased/pr-6005.v2.yml @@ -0,0 +1,10 @@ +type: fix +fix: + description: |- + Use protoc x86_64 on Apple M1 aarch64 + + The old protoc version 3.5.1 atlasdb uses does not yet support Apple M1 aarch64 + (see https://github.com/protocolbuffers/protobuf/issues/8062), so use x86_64 until + atlasdb upgrades to protoc 3.18.0+ which add osx-aarch_64. + links: + - https://github.com/palantir/atlasdb/pull/6005 diff --git a/examples/profile-client-protobufs/build.gradle b/examples/profile-client-protobufs/build.gradle index 71dc48465bd..e89d32ddfa1 100644 --- a/examples/profile-client-protobufs/build.gradle +++ b/examples/profile-client-protobufs/build.gradle @@ -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}" } } diff --git a/leader-election-api-protobufs/build.gradle b/leader-election-api-protobufs/build.gradle index 6569f0ba4cb..694e8b6d772 100644 --- a/leader-election-api-protobufs/build.gradle +++ b/leader-election-api-protobufs/build.gradle @@ -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}" } }