Description
I'm trying to update the swift-android-action to support building/testing against pre-release snapshots.
Building swift-numerics with 6.1-DEVELOPMENT-SNAPSHOT-2025-03-07-a (grabbed from the artifacts output from https://github.com/finagolfin/swift-android-sdk/actions/runs/13804189225/attempts/1) on ubuntu-24.04 is failing, whereas it works for swift-6.0.3-RELEASE. As seen in the unbutu-24.04 CI build output:
$ /home/runner/swift/toolchains/swift-6.1-DEVELOPMENT-SNAPSHOT-2025-03-07-a/usr/bin/swift build --swift-sdk x86_64-unknown-linux-android24
…
[68/70] Linking ComplexLog
error: link command failed with exit code 1 (use -v to see invocation)
ld.lld: error: unable to find library -lswiftSwiftOnoneSupport
ld.lld: error: unable to find library -lswiftCore
ld.lld: error: unable to find library -lswift_Concurrency
ld.lld: error: unable to find library -lswift_StringProcessing
ld.lld: error: unable to find library -lswift_RegexParser
ld.lld: error: unable to find library -lswiftCore
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[68/70] Linking ComplexLog1p
Error: Process completed with exit code 1.
I'm not sure what the problem might be. Libraries like libswiftCore.so
appear to be in the same relative location:
zap org.swift.swiftpm/swift-sdks % find swift-6.0.3-RELEASE-android-24-0.1.artifactbundle/swift-6.0.3-release-android-24-sdk swift-6.1-DEVELOPMENT-SNAPSHOT-2025-03-07-a-android-24-0.1.artifactbundle/swift-6.1-devel-android-24-sdk -name libswiftCore.so
swift-6.0.3-RELEASE-android-24-0.1.artifactbundle/swift-6.0.3-release-android-24-sdk/android-27c-sysroot/usr/lib/aarch64-linux-android/libswiftCore.so
swift-6.0.3-RELEASE-android-24-0.1.artifactbundle/swift-6.0.3-release-android-24-sdk/android-27c-sysroot/usr/lib/arm-linux-androideabi/libswiftCore.so
swift-6.0.3-RELEASE-android-24-0.1.artifactbundle/swift-6.0.3-release-android-24-sdk/android-27c-sysroot/usr/lib/x86_64-linux-android/libswiftCore.so
swift-6.1-DEVELOPMENT-SNAPSHOT-2025-03-07-a-android-24-0.1.artifactbundle/swift-6.1-devel-android-24-sdk/android-27c-sysroot/usr/lib/aarch64-linux-android/libswiftCore.so
swift-6.1-DEVELOPMENT-SNAPSHOT-2025-03-07-a-android-24-0.1.artifactbundle/swift-6.1-devel-android-24-sdk/android-27c-sysroot/usr/lib/arm-linux-androideabi/libswiftCore.so
swift-6.1-DEVELOPMENT-SNAPSHOT-2025-03-07-a-android-24-0.1.artifactbundle/swift-6.1-devel-android-24-sdk/android-27c-sysroot/usr/lib/x86_64-linux-android/libswiftCore.so
And there are no differences in swift-toolset.json
or swift-sdk.json
:
diff swift-6.0.3-RELEASE-android-24-0.1.artifactbundle/swift-6.0.3-release-android-24-sdk/swift-toolset.json swift-6.1-DEVELOPMENT-SNAPSHOT-2025-03-07-a-android-24-0.1.artifactbundle/swift-6.1-devel-android-24-sdk/swift-toolset.json
diff swift-6.0.3-RELEASE-android-24-0.1.artifactbundle/swift-6.0.3-release-android-24-sdk/swift-sdk.json swift-6.1-DEVELOPMENT-SNAPSHOT-2025-03-07-a-android-24-0.1.artifactbundle/swift-6.1-devel-android-24-sdk/swift-sdk.json
It also fails on the macos-13 CI with the same linker errors. But strangely, it does work when building on macOS 15 (both locally and in the macos-15 CI):
zap apple/swift-numerics % ~/Library/Developer/Toolchains/swift-6.1-DEVELOPMENT-SNAPSHOT-2025-03-07-a.xctoolchain/usr/bin/swift build --swift-sdk x86_64-unknown-linux-android24
Building for debugging...
[1/1] Write swift-version-5E6BD54C478A4A87.txt
Build complete! (0.18s)
This repo's build doesn't seem to be using any special flags, and yet all the packages are building for both ubuntu-24.04 and macos-13. What's the difference?