Repository navigation
Closed
Description
Environment
- xtool 1.24.0 (
xtool-x86_64.AppImage, FUSE available) - Host: Omarchy 4.0.6 (Arch-based), x86_64
- Swift 6.4.2-RELEASE, official
swift-6.4.2-RELEASE-ubuntu24.04.tar.gz(not swiftly: swiftly reports "Unsupported Linux platform" on this distro) - SDK:
xtool sdkfromXcode_27.2.xip,darwin-sdk-version.txt:epoch=4,darwinTools=1.1.0,oam=1.4.1 - Target: iPhone14,7, iOS 27.0.1, free Apple ID (login mode 1)
- Package: one library product + targets, one external dependency (GRDB.swift 7.11.1),
platforms: [.iOS(.v17)],swift-tools-version: 6.1
Steps
xtool setupcompletes,swift sdk listshowsdarwin.xtool devin the project folder.
Result
Building for debugging...
[Computing dependencies]
error: Could not parse output of `/home/<user>/.local/share/swift-6.4.2/usr/bin/ld.lld -version_details` as JSON: (x24)
error: Build failed
The build never reaches compilation. Earlier in the same setup, a full compile of all targets (including GRDB) for arm64-ios succeeded, and the failure was in the link step, so this appeared after some change in the environment that I could not reproduce.
What I checked
ld.lld -version_detailson the Swift 6.4.2 toolchain:error: unknown argument '-version_details', exit 1, empty stdout.ld.lld -von the same toolchain: printsLLD 21.0.0 (https://github.com/swiftlang/llvm-project.git fb5f84d903a3b4e7aea15cd5666598a46f56c833) (compatible with GNU linkers)on stdout, exit 0.- In a clean environment (
env -i),ld.lldcould not start:libxml2.so.2(Ubuntu 24.04 build) loaded but could not findlibicuuc.so.74. Setting$ORIGINas the runpath on the toolchain's libxml2 and ICU libraries fixed the load.ld.lld -vthen works in the clean environment. - After that fix,
xtool devstill reports the same 24 errors. - SwiftBuild source (
swiftlang/swift-build,Sources/SWBCore/SpecImplementations/Tools/LinkerTools.swift,discoveredLinkerToolsInfo, around line 2015): it tries-version_detailsfirst, and on a JSON parse failure falls back to-v. The fallback recognisesLLD (\d+). Yet the thrown error is still the original JSON parse error, so the fallback result seems to be discarded or never reached.
Questions
- Is the
-vfallback meant to run on Linux hosts with the Swift 6.4 toolchain? If so, why is the error still raised? - Which linker does SwiftBuild resolve during planning on Linux? The Darwin SDK toolset (
toolset-swb.json) namesld64.lld, but the probe runs the toolchain'sld.lld. - Is there a known-good Swift 6.4 Linux toolchain for xtool 1.24.0? (We also tried 6.4.0 with the same result.)
Related
- sdk: SwiftBuild support #229 "sdk: SwiftBuild support" (closed, released in 1.24.0)
- Xcode 27 / Swift 6.4 not supported #260 "Xcode 27 / Swift 6.4 not supported" (closed)
- Xcode 27 SDK cannot be linked on Linux: .tbd files declare
arm64e.x1-ios, which the bundled LLD 20 cannot parse #269 "Xcode 27 SDK cannot be linked on Linux: .tbd files declare arm64e.x1-ios" (closed, different error)
Expected
xtool dev finishes planning and builds the app for the device.
Metadata
Metadata
Assignees
Labels
No labels
Activity
kabiroberai commentedon Nov 1, 2026
AFAICT this is an issue with using the Ubuntu toolchain on Arch. The
version_detailserror is a red herring.Even though we don't actually use the toolchain's built-in
ld.lld, SwiftBuild still checks it for version info. So basically~/.local/share/swift-6.4.2/usr/bin/ld.lld -visn't working in the SwiftBuild environment for some reason.Claude recommends running the following commands to get more insight into the issue, let me know what you see.
Converting this into a discussion since it's not an xtool bug