From dcea3ebfae1eb69f0d67642675e1e9f5b6dfda98 Mon Sep 17 00:00:00 2001 From: Dongsu Park Date: Tue, 5 Dec 2023 10:28:23 +0100 Subject: [PATCH] overlay afterburn: fix arm64 cross-build issue of 5.5.0 Fix build issue that started to appear in afterburn 5.5.0. Every public function for the amd64 part must have a corresponding empty function in the unsupported part, so that cross-compile for arm64 can work. --- .../afterburn/afterburn-9999.ebuild | 1 + .../files/0003-vmware-arm64-unsupported.patch | 41 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/files/0003-vmware-arm64-unsupported.patch diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/afterburn-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/afterburn-9999.ebuild index 0fb18dfa7d..39903886e3 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/afterburn-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/afterburn-9999.ebuild @@ -312,6 +312,7 @@ RDEPEND=" PATCHES=( "${FILESDIR}"/0001-Revert-remove-cl-legacy-feature.patch "${FILESDIR}"/0002-util-cmdline-Handle-the-cmdline-flags-as-list-of-sup.patch + "${FILESDIR}"/0003-vmware-arm64-unsupported.patch ) src_unpack() { diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/files/0003-vmware-arm64-unsupported.patch b/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/files/0003-vmware-arm64-unsupported.patch new file mode 100644 index 0000000000..2a3a59d1ef --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/files/0003-vmware-arm64-unsupported.patch @@ -0,0 +1,41 @@ +From 2a9489f373771e190c4d311d6b934342a3ba98a7 Mon Sep 17 00:00:00 2001 +Message-Id: <2a9489f373771e190c4d311d6b934342a3ba98a7.1701767005.git.dpark@linux.microsoft.com> +From: Dongsu Park +Date: Tue, 5 Dec 2023 10:03:10 +0100 +Subject: [PATCH] providers/vmware: add missing public functions for non-amd64 + +VmwareProvider must have a corresponding empty function +`parse_netplan_config()` in unsupported part as well, just like the +amd64 part. +Otherwise build would fail when cross-building afterburn for arm64. + +``` +error[E0599]: no method named `parse_netplan_config` found for reference +`&VmwareProvider` in the current scope + --> src/providers/vmware/mod.rs:37:14 + | +37 | self.parse_netplan_config() + | ^^^^^^^^^^^^^^^^^^^^ method not found in +`&VmwareProvider` +``` + +--- + src/providers/vmware/unsupported.rs | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/providers/vmware/unsupported.rs b/src/providers/vmware/unsupported.rs +index 99dace52..c4c04f20 100644 +--- a/src/providers/vmware/unsupported.rs ++++ b/src/providers/vmware/unsupported.rs +@@ -7,4 +7,8 @@ impl VmwareProvider { + pub fn try_new() -> Result { + bail!("unsupported architecture"); + } ++ ++ pub fn parse_netplan_config(&self) -> Result> { ++ bail!("unsupported architecture"); ++ } + } +-- +2.34.1 +