Repository navigation
xtool dev fails at package planning on Swift 6.4.2 (Linux): SwiftBuild linker probe reports ld.lld -version_details JSON parse error
#420
JlassiRafet
started this conversation in
General
Replies: 1 comment
|
AFAICT this is an issue with using the Ubuntu toolchain on Arch. The Even though we don't actually use the toolchain's built-in Claude recommends running the following commands to get more insight into the issue, let me know what you see. ~/.local/share/swift-6.4.2/usr/bin/ld.lld -v; echo "exit=$?"
ldd ~/.local/share/swift-6.4.2/usr/bin/lld | grep -e xml -e icu -e "not found"Converting this into a discussion since it's not an xtool bug |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Environment
xtool-x86_64.AppImage, FUSE available)swift-6.4.2-RELEASE-ubuntu24.04.tar.gz(not swiftly: swiftly reports "Unsupported Linux platform" on this distro)xtool sdkfromXcode_27.2.xip,darwin-sdk-version.txt:epoch=4,darwinTools=1.1.0,oam=1.4.1platforms: [.iOS(.v17)],swift-tools-version: 6.1Steps
xtool setupcompletes,swift sdk listshowsdarwin.xtool devin the project folder.Result
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.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.xtool devstill reports the same 24 errors.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
-vfallback meant to run on Linux hosts with the Swift 6.4 toolchain? If so, why is the error still raised?toolset-swb.json) namesld64.lld, but the probe runs the toolchain'sld.lld.Related
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 devfinishes planning and builds the app for the device.All reactions