From e33e10024c6cd7510dddb0b28a6aba96aa0662ba Mon Sep 17 00:00:00 2001 From: David Schlosnagle Date: Thu, 21 Apr 2022 12:12:50 -0400 Subject: [PATCH 1/2] 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. --- atlasdb-client-protobufs/build.gradle | 5 ++++- examples/profile-client-protobufs/build.gradle | 5 ++++- leader-election-api-protobufs/build.gradle | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) 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/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}" } } From 81daf37defbbaf7074b21f5704af3dddefbf1dad Mon Sep 17 00:00:00 2001 From: svc-changelog Date: Thu, 21 Apr 2022 16:23:39 +0000 Subject: [PATCH 2/2] Add generated changelog entries --- changelog/@unreleased/pr-6005.v2.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 changelog/@unreleased/pr-6005.v2.yml 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