Apologies if I'm posting in the wrong spot; please feel free to redirect.
I'm attempting to cross-compile from my mac (m1 max / osx 26.8), targeting an older raspberry pi (aarch64) running Debian 13 (Trixie). I'm able to follow @xtremekforever 's awesome instructions at "Using Swift SDKs with Raspberry Pis" to install the 6.3.3 toolchain with:
swift run swift-sdk-generator make-linux-sdk \
--target aarch64-unknown-linux-gnu \
--distribution-name debian \
--distribution-version 13
swift experimental-sdk install /Users/<elided>/repos/misc/swift-sdk-generator/Bundles/6.3.3-RELEASE_debian_trixie_aarch64.artifactbundle
However, when I attempt to run the verification step, I compilation errors related to missing imports in NIO:
git clone https://github.com/hummingbird-project/hummingbird-examples
cd hummingbird-examples/hello/
swift build --swift-sdk 6.3.3-RELEASE_debian_trixie_aarch64
[snip]
/Users/<elided>/repos/misc/hummingbird-examples/hello/.build/checkouts/swift-nio/Sources/_NIOFileSystem/DirectoryEntries.swift:751:47: error: property 'fts_path' is not available due to missing import of defining module '_FoundationCShims' [#MemberImportVisibility]
19 | import NIOPosix
20 | import SystemPackage
21 |
| `- note: add import of module '_FoundationCShims'
22 | /// An `AsyncSequence` of entries in a directory.
23 | @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
:
749 | extension UnsafeMutablePointer<CInterop.FTSEnt> {
750 | fileprivate var path: FilePath {
751 | FilePath(platformString: self.pointee.fts_path!)
| `- error: property 'fts_path' is not available due to missing import of defining module '_FoundationCShims' [#MemberImportVisibility]
752 | }
753 | }
[/snip]
I also tried compiling a Vapor toy that is what I eventually wish to deploy; it too fails in NIO, but complaining about different a different file and regarding different symbols:
/Users/<elided>/repos/ccc/<elided>/.build/checkouts/swift-nio/Sources/_NIOFileSystem/FileInfo.swift:239:36: error: property 'st_nlink' is not available due to missing import of defining module 'CDispatch' [#MemberImportVisibility]
20 | @preconcurrency import Glibc
21 | import CNIOLinux
22 | #elseif canImport(Musl)
| `- note: add import of module 'CDispatch'
23 | @preconcurrency import Musl
24 | import CNIOLinux
:
237 | var isEqual = lStat.st_dev == rStat.st_dev
238 | isEqual = isEqual && lStat.st_mode == rStat.st_mode
239 | isEqual = isEqual && lStat.st_nlink == rStat.st_nlink
| `- error: property 'st_nlink' is not available due to missing import of defining module 'CDispatch' [#MemberImportVisibility]
240 | isEqual = isEqual && lStat.st_ino == rStat.st_ino
241 | isEqual = isEqual && lStat.st_uid == rStat.st_uid
Any ideas? I'm not doing anything particularly fancy, and I don't think I'm missing any steps, but I probably am.
Thanks!