You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?
Confirmed reproduction steps with SwiftPM CLI. The description text must include reproduction steps with either of command-line SwiftPM commands, swift build, swift test, swift package etc.
error: Failed opening '/home/finagolfin/swift-syntax/Examples/.build/aarch64-unknown-linux-android24/debug/index/store/v5/units/AddAsyncMacroTests.swift.o-20XPE2PQ2J7J7': No such file or directory
It fails with a similar error for the latest trunk 6.1 SDK bundle used by the command ~/swift-DEVELOPMENT-SNAPSHOT-2024-10-30-a-ubi9/usr/bin/swift build --build-tests --swift-sdk aarch64-unknown-linux-android24 -Xswiftc -disallow-use-new-driver, with that last flag needed because of a swift-driver 6.1 regression, swiftlang/swift-driver#1723.
Swift Package Manager version/commit hash
SwiftPM 6.0 and 6.1, cross-compiling packages that use macros didn't work at all before that
Swift & OS version (output of swift --version ; uname -a)
Swift 6.0.2/6.1 cross-compiling the swift-syntax example or swift-foundation tests for Android AArch64 from linux x86_64
The text was updated successfully, but these errors were encountered:
If I create a MacroDemo project with swift package init --type macro, it fails to cross-compile with a similar error:
$ ~/Library/Developer/Toolchains/swift-6.0.2-RELEASE.xctoolchain/usr/bin/swift build --swift-sdk 6.0.2-RELEASE_ubuntu_jammy_aarch64 --build-tests
Fetching https://github.com/apple/swift-syntax.git from cache
Fetched https://github.com/apple/swift-syntax.git from cache (0.02s)
Creating working copy for https://github.com/apple/swift-syntax.git
Working copy of https://github.com/apple/swift-syntax.git resolved at 510.0.3
Building for debugging...
…
clang: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]
error: Failed opening '/opt/src/github/MacroDemo/.build/aarch64-swift-linux-musl/debug/index/store/v5/units/MacroDemoTests.swift.o-OV9PWKAUKWEY': No such file or directory
The same error occurs with the 6.0.2-RELEASE_ubuntu_jammy_aarch64 (which I built with swift-sdk-generator: swift run swift-sdk-generator make-linux-sdk --swift-version 6.0.2-RELEASE), as well as with both the Musl SDK (swift-6.0.2-RELEASE_static-linux-0.0.1) and the Android SDK (swift-6.0.2-RELEASE-android-24-0.1).
Note that this might not affect all macros, but might be some specific issue with SwiftSyntaxMacros (or SwiftSyntaxMacrosTestSupport). If I create a variant of the sample macro project that just tests the #stringify macro directly (see MacroDemoLibTests.swift), then it builds successfully and the tests pass on Android.
Is it reproducible with SwiftPM command-line tools:
swift build
,swift test
,swift package
etc?swift build
,swift test
,swift package
etc.Description
It always fails with an error like this with my Android SDK bundles:
I first reported this bug in April, nothing has changed since.
Expected behavior
The tests to cross-compile
Actual behavior
Weird errors that it can't find a file
Steps to reproduce
It fails with a similar error for the latest trunk 6.1 SDK bundle used by the command
~/swift-DEVELOPMENT-SNAPSHOT-2024-10-30-a-ubi9/usr/bin/swift build --build-tests --swift-sdk aarch64-unknown-linux-android24 -Xswiftc -disallow-use-new-driver
, with that last flag needed because of a swift-driver 6.1 regression, swiftlang/swift-driver#1723.Swift Package Manager version/commit hash
SwiftPM 6.0 and 6.1, cross-compiling packages that use macros didn't work at all before that
Swift & OS version (output of
swift --version ; uname -a
)Swift 6.0.2/6.1 cross-compiling the swift-syntax example or swift-foundation tests for Android AArch64 from linux x86_64
The text was updated successfully, but these errors were encountered: