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
{{ message }}
Repository navigation
xtool 1.21.0 on WSL2 x86_64 fails to generate actool wrapper during xtool dev build ` #310
xtool dev build fails on WSL2 x86_64 because xtool attempts to execute an actool binary that is never generated.
The build process successfully:
Authenticates with Apple Developer Services
Installs the Darwin SDK
Resolves Swift Packages
Downloads all Firebase, Capacitor, Facebook, Google Sign-In, and Sentry dependencies
However, during the build phase xtool attempts to run:
~/.swiftpm/swift-sdks/darwin.artifactbundle/Xcode.app/Contents/Developer/usr/bin/actool exists but is a Mach-O 64-bit arm64 executable — cannot run on x86_64 Linux (Exec format error).
Built AssetKit from source (github.com/xtool-org/AssetKit):
Produces only libAssetKit.a (static library)
No executableTarget in Package.swift
So users cannot work around this by building AssetKit themselves.
Tried TMPDIR=~/xtool-tmp and mkdir -p ~/xtool-tmp before build:
Same failure.
Observed behavior
xtool dev build reaches the compile stage (planning/constructing completes) then repeatedly tries to launch:
home/selepe/sellhive2025/ios/App/CapApp-SPM/xtool/.xtool-tmp/actool --version --output-format xml1
text
And fails with:
.xtool-tmp/actool is not an executable file
text
The .xtool-tmp/ directory contains only Package.swift and Sources/ — actool is never generated there.
Conclusion so far
xtool is expected to generate a Linux-native actool wrapper (backed by AssetKit) into .xtool-tmp/ during xtool dev build, but that step is not happening in this environment. The Darwin SDK toolset does not include a Linux actool binary, and AssetKit upstream provides no CLI target to substitute.
This appears to be a bug in the SDK layout / toolchain assembly step for WSL2 x86_64, not a project or user configuration issue.
Requested
Confirm whether actool generation is expected from the SDK install or from xtool dev build itself.
If it must be produced at build time, any logs or debug env var we can enable to see why the generation step is skipped.
Whether a Linux actool shim is available as a separate binary we can place into toolset/bin/ as a workaround.
I traced it the same way: the .xtool-tmp/actool invocation only fires when the build walks Assets.xcassets. Moving the catalog out of the way lets the build skip it entirely. Good workaround for getting further, but it means no app icon, no splash, no named image sets in the final bundle.
What I tried (in order)
Environment:
Host: WSL2 Ubuntu 26.04 x86_64
Swift 6.4.0 (swiftly-managed)
xtool: first 1.21.0 AppImage, then downgraded to 1.20.1 AppImage (both reproduce the bug)
SDK: re-installed from Xcode_27.1_Release_Candidate.xip, both with xtool sdk install and xtool sdk build + xtool sdk install ~/new-sdk-out/darwin.xtoolsdk
SDK status after clean re-install: epoch=2,darwinTools=1.1.0,oam=1.3.0
Attempts to fix the actool error:
Confirmed no actool is present in toolset/bin/ — only dsymutil, ld64.lld, llvm-lib.
Confirmed the Xcode.app copy at Xcode.app/Contents/Developer/usr/bin/actool is a Mach-O arm64 binary (can't run on x86_64 Linux).
Built the upstream xtool-org/AssetKit from source — produces only libAssetKit.a, no CLI executable, so no drop-in workaround.
Built the actool from joshuaswarren/omarchy-apple-devtools/darwin-tools (AssetKit-based, real Linux x86_64 executable). Verified it runs and prints valid --version XML.
Copied that actool into toolset/bin/and into .xtool-tmp/actool. Build then wiped .xtool-tmp/ at start and reported "actool is not an executable file" — .xtool-tmp/ gets cleaned every run, so a manual drop-in doesn't survive.
Switched to a patched xtool built from joshuaswarren/xtool at SHA f0a1f90 (the fork the omarchy installer uses). With that binary, .xtool-tmp/actool no longer gets deleted before it's used. actool problem solved.
Now blocked on XCFrameworks
With the patched xtool, the build gets past actool and fails on every binary dependency:
The directories exist under .build/artifacts/ and contain real bundles (Info.plist, ios-arm64/, _CodeSignature). SwiftPM still reports "There is no XCFramework found."
I tried _SWIFTPM_EXPERIMENTAL_LINUX_XCFRAMEWORK=1 as an env var — no change. My understanding is SwiftPM expects the equivalent as a CLI flag (--experimental-xcframeworks-on-linux) that xtool does not pass through.
Questions
Is the XCFramework flag plumbed through xtool in a way I missed? If not, is there a config key in xtool.yml or an env var that forwards arbitrary flags to SwiftPM?
For the .xtool-tmp wipe: is the expected behavior that xtool regenerates the tool wrapper after cleanup? On my system it cleans the directory but only re-creates Package.swift and Sources/ — no actool. Is that the piece that should be produced by the SDK install, or generated at build time from the toolset?
Does the fork at joshuaswarren/xtool@f0a1f90 include the XCFramework flag pass-through, or is that still upstream-only?
Project: Capacitor 8 iOS app (Capacitor core + Cordova + 17 Capacitor plugins including Firebase, Facebook SDK, Google Sign-In, Sentry — all binary XCFrameworks).
Happy to run any diagnostics you want.
3. I had the same bug. I discovered that actool is used for Assets.xcassets folder. The workaround is to temporary remove it.
The directories exist under .build/artifacts/ and contain real bundles (Info.plist, ios-arm64/, _CodeSignature). SwiftPM still reports "There is no XCFramework found."
I tried _SWIFTPM_EXPERIMENTAL_LINUX_XCFRAMEWORK=1 as an env var — no change. My understanding is SwiftPM expects the equivalent as a CLI flag (--experimental-xcframeworks-on-linux) that xtool does not pass through.
Questions
Is the XCFramework flag plumbed through xtool in a way I missed? If not, is there a config key in xtool.yml or an env var that forwards arbitrary flags to SwiftPM?
For the .xtool-tmp wipe: is the expected behavior that xtool regenerates the tool wrapper after cleanup? On my system it cleans the directory but only re-creates Package.swift and Sources/ — no actool. Is that the piece that should be produced by the SDK install, or generated at build time from the toolset?
Does the fork at joshuaswarren/xtool@f0a1f90 include the XCFramework flag pass-through, or is that still upstream-only?
Project: Capacitor 8 iOS app (Capacitor core + Cordova + 17 Capacitor plugins including Firebase, Facebook SDK, Google Sign-In, Sentry — all binary XCFrameworks).
I traced the current Linux build path at b50173f against the reported SwiftPM-resource case. Planner includes target resources in the plan and Packer copies the resulting SwiftPM bundle, but I found no actool invocation/wrapper or .xcassets handling in the current sources; the SDK selection also does not package an Xcode actool binary. The report and follow-up indicate that SwiftPM Assets.xcassets is the trigger, while the docs currently say SwiftPM resources “just work.”
Could you clarify whether .xcassets inside SwiftPM target resources is intended to be supported on Linux, or is deliberately unsupported pending a separate asset-catalog pipeline? This affects whether the minimal compatible correction belongs in the build path or in the resource-support documentation. I saw that #325 adds a distinct assetCatalogs: path and explicitly says it does not address this report.
The actool issue was only the first wall. For a Capacitor 8 app the real blocker is that SwiftPM on Linux won't resolve the binary XCFrameworks the plugins ship (Capacitor, Cordova, Firebase, Sentry, etc.), even with the patched fork — so a full local build isn't viable for Capacitor projects right now.
What works for me instead:
Build an unsigned .ipa on a cloud Mac (Codemagic, xcodebuild with CODE_SIGNING_ALLOWED=NO)
Sign + install from WSL with xtool install
For the AFCClient muxError on WSL, the iTunes/Apple Devices port-forward workaround from xtool dev stuck on Connecting step #19 (USBMUXD_SOCKET_ADDRESS → host:27015) fixed it; usbipd did not.
Happy to leave this open for the .xcassets-in-SwiftPM question @dajiaohuang raised.
Activity
Selepe89 commentedon Oct 10, 2026
Additional investigation after filing
I've continued troubleshooting and want to add findings that may help narrow this down.
Environment recap
epoch=2,darwinTools=1.1.0,oam=1.3.0xtool devices(USB passthrough works)Steps already attempted
Result: SDK installs successfully, epoch changed from 3 to 2,
xtool sdk statusreports OK.swift sdk listshowsdarwincorrectly.Inspected
~/.swiftpm/swift-sdks/darwin.artifactbundle/toolset/bin/:dsymutil,ld64.lld,llvm-lib,orig/actoolbinary present~/.swiftpm/swift-sdks/darwin.artifactbundle/Xcode.app/Contents/Developer/usr/bin/actoolexists but is a Mach-O 64-bit arm64 executable — cannot run on x86_64 Linux (Exec format error).libAssetKit.a(static library)executableTargetin Package.swiftTMPDIR=~/xtool-tmpandmkdir -p ~/xtool-tmpbefore build:Observed behavior
xtool dev buildreaches the compile stage (planning/constructing completes) then repeatedly tries to launch:home/selepe/sellhive2025/ios/App/CapApp-SPM/xtool/.xtool-tmp/actool --version --output-format xml1
text
And fails with:
.xtool-tmp/actool is not an executable file
text
The
.xtool-tmp/directory contains onlyPackage.swiftandSources/—actoolis never generated there.Conclusion so far
xtool is expected to generate a Linux-native
actoolwrapper (backed by AssetKit) into.xtool-tmp/duringxtool dev build, but that step is not happening in this environment. The Darwin SDK toolset does not include a Linuxactoolbinary, and AssetKit upstream provides no CLI target to substitute.This appears to be a bug in the SDK layout / toolchain assembly step for WSL2 x86_64, not a project or user configuration issue.
Requested
actoolgeneration is expected from the SDK install or fromxtool dev builditself.actoolshim is available as a separate binary we can place intotoolset/bin/as a workaround.Thanks — happy to run any diagnostics you need.
kvapca commentedon Oct 10, 2026
I had the same bug. I discovered that
actoolis used forAssets.xcassetsfolder. The workaround is to temporary remove it.Selepe89 commentedon Oct 11, 2026
Thanks @kvapca — this confirms what I found.
Confirming the actool / Assets.xcassets link
I traced it the same way: the
.xtool-tmp/actoolinvocation only fires when the build walksAssets.xcassets. Moving the catalog out of the way lets the build skip it entirely. Good workaround for getting further, but it means no app icon, no splash, no named image sets in the final bundle.What I tried (in order)
Environment:
xtool sdk installandxtool sdk build+xtool sdk install ~/new-sdk-out/darwin.xtoolsdkepoch=2,darwinTools=1.1.0,oam=1.3.0Attempts to fix the actool error:
actoolis present intoolset/bin/— onlydsymutil,ld64.lld,llvm-lib.Xcode.app/Contents/Developer/usr/bin/actoolis a Mach-O arm64 binary (can't run on x86_64 Linux).xtool-org/AssetKitfrom source — produces onlylibAssetKit.a, no CLI executable, so no drop-in workaround.actoolfromjoshuaswarren/omarchy-apple-devtools/darwin-tools(AssetKit-based, real Linux x86_64 executable). Verified it runs and prints valid--versionXML.actoolintotoolset/bin/and into.xtool-tmp/actool. Build then wiped.xtool-tmp/at start and reported "actool is not an executable file" —.xtool-tmp/gets cleaned every run, so a manual drop-in doesn't survive.joshuaswarren/xtoolat SHAf0a1f90(the fork the omarchy installer uses). With that binary,.xtool-tmp/actoolno longer gets deleted before it's used. actool problem solved.Now blocked on XCFrameworks
With the patched xtool, the build gets past actool and fails on every binary dependency:
Selepe89 commentedon Oct 11, 2026
The directories exist under
.build/artifacts/and contain real bundles (Info.plist,ios-arm64/,_CodeSignature). SwiftPM still reports "There is no XCFramework found."I tried
_SWIFTPM_EXPERIMENTAL_LINUX_XCFRAMEWORK=1as an env var — no change. My understanding is SwiftPM expects the equivalent as a CLI flag (--experimental-xcframeworks-on-linux) that xtool does not pass through.Questions
xtool.ymlor an env var that forwards arbitrary flags to SwiftPM?.xtool-tmpwipe: is the expected behavior that xtool regenerates the tool wrapper after cleanup? On my system it cleans the directory but only re-createsPackage.swiftandSources/— noactool. Is that the piece that should be produced by the SDK install, or generated at build time from the toolset?joshuaswarren/xtool@f0a1f90include the XCFramework flag pass-through, or is that still upstream-only?Project: Capacitor 8 iOS app (Capacitor core + Cordova + 17 Capacitor plugins including Firebase, Facebook SDK, Google Sign-In, Sentry — all binary XCFrameworks).
Happy to run any diagnostics you want.
The directories exist under
.build/artifacts/and contain real bundles (Info.plist,ios-arm64/,_CodeSignature). SwiftPM still reports "There is no XCFramework found."I tried
_SWIFTPM_EXPERIMENTAL_LINUX_XCFRAMEWORK=1as an env var — no change. My understanding is SwiftPM expects the equivalent as a CLI flag (--experimental-xcframeworks-on-linux) that xtool does not pass through.Questions
xtool.ymlor an env var that forwards arbitrary flags to SwiftPM?.xtool-tmpwipe: is the expected behavior that xtool regenerates the tool wrapper after cleanup? On my system it cleans the directory but only re-createsPackage.swiftandSources/— noactool. Is that the piece that should be produced by the SDK install, or generated at build time from the toolset?joshuaswarren/xtool@f0a1f90include the XCFramework flag pass-through, or is that still upstream-only?Project: Capacitor 8 iOS app (Capacitor core + Cordova + 17 Capacitor plugins including Firebase, Facebook SDK, Google Sign-In, Sentry — all binary XCFrameworks).
Happy to run any diagnostics you want.
dajiaohuang commentedon Oct 15, 2026
I traced the current Linux build path at
b50173fagainst the reported SwiftPM-resource case.Plannerincludes target resources in the plan andPackercopies the resulting SwiftPM bundle, but I found noactoolinvocation/wrapper or.xcassetshandling in the current sources; the SDK selection also does not package an Xcodeactoolbinary. The report and follow-up indicate that SwiftPMAssets.xcassetsis the trigger, while the docs currently say SwiftPM resources “just work.”Could you clarify whether
.xcassetsinside SwiftPM target resources is intended to be supported on Linux, or is deliberately unsupported pending a separate asset-catalog pipeline? This affects whether the minimal compatible correction belongs in the build path or in the resource-support documentation. I saw that #325 adds a distinctassetCatalogs:path and explicitly says it does not address this report.Selepe89 commentedon Oct 15, 2026
Thanks all — closing the loop on my side.
The actool issue was only the first wall. For a Capacitor 8 app the real blocker is that SwiftPM on Linux won't resolve the binary XCFrameworks the plugins ship (Capacitor, Cordova, Firebase, Sentry, etc.), even with the patched fork — so a full local build isn't viable for Capacitor projects right now.
What works for me instead:
xtool installxtool devstuck on Connecting step #19 (USBMUXD_SOCKET_ADDRESS → host:27015) fixed it; usbipd did not.Happy to leave this open for the .xcassets-in-SwiftPM question @dajiaohuang raised.