From a41dbd46719655b36695c33345fe65d9ead4f024 Mon Sep 17 00:00:00 2001 From: Dmitry Kovba Date: Thu, 11 Sep 2025 10:16:31 -0700 Subject: [PATCH] Update the toolchain and Static Linux SDK (#287) The PR updates the toolchain and Static Linux SDK. This resolves the compilation errors below: ``` Building vminitd and vmexec... Building for debugging... :0: error: stack nearly exhausted; compilation time may suffer, and crashes due to stack overflow are likely :1:10: note: in file included from :1: 1 | #include "SwiftMusl.h" | `- note: in file included from :1: 2 | /Users/Dmitry/Library/org.swift.swiftpm/swift-sdks/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-06-25-a_static-linux-0.0.1.artifactbundle/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-06-25-a_static-linux-0.0.1/swift-linux-musl/musl-1.2.5.sdk/aarch64/usr/lib/swift_static/linux-static/aarch64/SwiftMusl.h:135:10: error: could not build module 'sys_stropts' 133 | #include 134 | #include 135 | #include | `- error: could not build module 'sys_stropts' 136 | #include 137 | #include :0: error: stack nearly exhausted; compilation time may suffer, and crashes due to stack overflow are likely :0: error: could not build C module 'SwiftMusl' :0: error: stack nearly exhausted; compilation time may suffer, and crashes due to stack overflow are likely :1:10: note: in file included from :1: 1 | #include "SwiftMusl.h" | `- note: in file included from :1: 2 | /Users/Dmitry/Library/org.swift.swiftpm/swift-sdks/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-06-25-a_static-linux-0.0.1.artifactbundle/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-06-25-a_static-linux-0.0.1/swift-linux-musl/musl-1.2.5.sdk/aarch64/usr/lib/swift_static/linux-static/aarch64/SwiftMusl.h:135:10: error: could not build module 'sys_stropts' 133 | #include 134 | #include 135 | #include | `- error: could not build module 'sys_stropts' 136 | #include 137 | #include :0: error: stack nearly exhausted; compilation time may suffer, and crashes due to stack overflow are likely :0: error: could not build C module 'SwiftMusl' [719/1348] Compiling x_all.cc make[1]: *** [all] Error 1 make: *** [vminitd] Error 2 ``` To update: - Run `make cross-prep` - List the installed Static Linux SDKs using `swift sdk list` - Remove the old Static Linux SDKs using `swift sdk remove ` Optionally: - List the installed toolchains using `swiftly list` - Uninstalled the old toolchains using `swiftly uninstall ` --- .swift-version | 2 +- vminitd/Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.swift-version b/.swift-version index 2bbca19b..76b925a7 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -6.2-snapshot-2025-06-25 \ No newline at end of file +6.2-snapshot-2025-09-06 \ No newline at end of file diff --git a/vminitd/Makefile b/vminitd/Makefile index 45f7d832..f57003ba 100644 --- a/vminitd/Makefile +++ b/vminitd/Makefile @@ -17,8 +17,8 @@ WARNINGS_AS_ERRORS ?= true SWIFT_WARNING_CONFIG = $(if $(filter-out false,$(WARNINGS_AS_ERRORS)),-Xswiftc -warnings-as-errors) SWIFT_CONFIGURATION := --swift-sdk aarch64-swift-linux-musl $(SWIFT_WARNING_CONFIG) -SWIFT_VERSION = 6.2-snapshot-2025-06-25 -SWIFT_SDK_URL = https://download.swift.org/swift-6.2-branch/static-sdk/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-06-25-a/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-06-25-a_static-linux-0.0.1.artifactbundle.tar.gz +SWIFT_VERSION = 6.2-snapshot-2025-09-06 +SWIFT_SDK_URL = https://download.swift.org/swift-6.2-branch/static-sdk/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-09-06-a/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-09-06-a_static-linux-0.0.1.artifactbundle.tar.gz SWIFT_SDK_PATH = /tmp/$(notdir $(SWIFT_SDK_URL)) SWIFTLY_URL := https://download.swift.org/swiftly/darwin/swiftly.pkg