-
-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Description
Swift 6.2 Android SDK has a regression where libFoundationXML.so fails to find zlib symbols at runtime, causing any code using FoundationXML (XMLParser, XMLDocument, etc.) to crash.
Swift 6.1 works fine with the same code and configuration.
Environment
- Swift Version: 6.2 (release)
- Android API Level: 28 (also tested 33, 34)
- Architecture: x86_64 (ubuntu-latest runner)
- Action Version: skiptools/swift-android-action@v2
- Runner: GitHub Actions ubuntu-latest
Error
CANNOT LINK EXECUTABLE "./SyndiKitPackageTests.xctest":
cannot locate symbol "deflateInit2_" referenced by
"/data/local/tmp/android-xctest/libFoundationXML.so"
The symbol deflateInit2_ is part of zlib, which libxml2 depends on.
Reproduction
Test repository: brightdigit/SyndiKit
- Branch:
test-android-swift-versions - Uses XMLCoder package which depends on FoundationXML
Minimal workflow that reproduces:
```yaml
- uses: skiptools/swift-android-action@v2
with:
swift-version: "6.2"
android-api-level: 28
run-tests: true
```
Any Swift package using FoundationXML will fail.
Verification
Created test branch comparing Swift 6.1 vs 6.2:
- ✅ Swift 6.1: All tests pass
- ❌ Swift 6.2: Fails with zlib linking error
CI runs:
Expected Behavior
Swift 6.2 should include zlib (libz.so) in the Android SDK or ensure libFoundationXML.so is statically linked with zlib, matching the behavior of Swift 6.1.
Workaround
Temporarily using Swift 6.1 for Android builds until this is resolved.
Additional Context
- This appears to be a packaging/linking regression between 6.1 and 6.2
- The issue affects any use of FoundationXML on Android
- Architecture is x86_64 (not 32-bit ARM), so this is not related to the known NDK issue [BUG] libz.a for armeabi-v7a is missing symbols android/ndk#1391
Repository affected: brightdigit/SyndiKit
Test branch: test-android-swift-versions