Repository navigation
Windows: the toolchain checks name their fix — link probe, SDK stubs, Metal and Git installs, pinned wheels - #206
Conversation
v0lumehi
left a comment
There was a problem hiding this comment.
The three-attempt report and the wrapped block are a clear improvement. Two bugs keep the new text from reaching the player and the log, though:
dep.row.loggets two arguments for three placeholders. The string isdependency %@: [%@] %@, andmodel.pycallsself.t('dep.row.log', <title>, <detail>). Inlocalization.t(),py % argsraisesTypeErrorand the raw template comes back, so every logged row readsdependency %@: [%@] %@. That is exactly the line the exportedlast-run.logwas meant to carry. Either drop the[%@]or pass the state as the middle argument.dep.fix.nonasciiis shown as the raw key.link_failure_summaryappends it at the end of the joined detail, butui.pyonly translates a detail that starts withdep.. A detail starting withlink failedgoes throughshort_pathunchanged, so the player with the non-ASCII SDK path, the one this hint is for, sees the literaldep.fix.nonascii. Translating the key before it is joined in (or returning it as a separate field) fixes it. A test asserting the translated sentence in the panel text would catch both.
Smaller:
d.title_key.replace('dep.', 'dep.')does nothing.- The Swedish column of
dep.fix.nonasciianddep.row.logis still the English text.
…s the one suspect The owner's second run used the new three-strategy probe and came back "link failed 3 ways" with the linker's self-check green (LLD 23.1.4 runs) — and the interesting part was cut off at the panel's edge, exactly where the answer lived. - The failure summary now keeps every attempt's last three output lines (not one), echoes the exact clang command to try by hand, and — when the SDK path is not pure ASCII — appends the fix that matches this machine: ld64.lld's Windows port can fail to open narrow-char paths while clang's front end (the compile probe, green there) handles them. The owner's SDK sits under C:\Users\QC-北\... — that hint is the most likely fix. - The panel moves a detail longer than ~140 characters into its own wrapped block under the row instead of eliding it to nothing. - Every not-ok dependency row is logged with its full detail, so an exported last-run.log always carries what the panel could not show. Verified: python3 -m unittest discover -s frontend-qt/tests -> 139 tests, 9 skipped, 0 failures (2 new: the summary names all strategies and the by-hand command, and flags a non-ASCII SDK path).
The Mac build bundles every tool it may; the Windows build auto-downloads all of them but one — Metal Developer Tools, which Apple gates behind an Apple ID, so the browser download is the licensed path. Until now the app stopped there: the row linked the download page and accepted an already unpacked folder. The Metal row's button now takes the downloaded zip itself: it is validated (metal.exe in bin/ for 5.x/6.x or ios/bin/ for 4.x), unpacked into the tools folder the other toolchains live in — surviving app updates — and the folder is remembered in toolchain.json. An already unpacked folder is equally accepted, and a zip without metal.exe is refused with what to check. The player's part shrinks to: download from Apple, pick the zip. Verified: python3 -m unittest discover -s frontend-qt/tests -> 142 tests, 9 skipped, 0 failures (3 new: a 6.x-layout zip unpacks into the tools dir with staging cleaned, a 4.x ios/bin layout is accepted, a zip without metal.exe is refused leaving nothing behind; plus the routing shape test).
…wn git, and the venv packages ride in the zip Three gaps from the owner's fresh-machine run (new user, nothing installed): - Install all stopped after the Python interpreter: the loop's attempted set was keyed by id, so the row's SECOND fix (venv + pip packages, which replaces the interpreter row the pass had just created) was skipped as "already tried" — the docstring promised the opposite. attempted is now keyed by (id, fix): a row whose install command changed is retried, a genuinely failed one is not. - The SDK clone failed three times with "git is not installed". The clone needs git, but git was only ever installed by the repository-download flow, which a fresh machine never runs. The SDK install now downloads PortableGit itself (per-user, the same helper the repo flow uses — toolchain.git_exe() already looks there) before cloning. - The log carried literal "dependency %@: [%@] %@" lines: the new row-logging call passed two arguments to a three-placeholder string, and t()'s format-failure fallback kept the raw text. Three args now. **Python + packages, bundled** (the owner's ask): the release workflow downloads the venv wheels (lz4, capstone, fonttools, backports.zstd, nsz) at packaging time and puts wheels/ beside the exe; the venv step installs from disk (--no-index) — no PyPI round-trip, seconds not minutes. Source runs keep the PyPI path. Wheels are ~15 MB in the zip. Metal stays as agreed: user downloads from Apple (Apple ID), the app unpacks the picked zip and remembers the folder. Verified: python3 -m unittest discover -s frontend-qt/tests -> 146 tests, 9 skipped, 0 failures (4 new: offline/online pip args, the log row string with three args, plus the metal-zip and pick-flow tests from this branch).
d22df12 to
2ddf2ed
Compare
v0lumehi
left a comment
There was a problem hiding this comment.
Thanks for the update, @LNPANDY. Second pass over the current head (2ddf2ed):
Fixed
dep.row.lognow gets the state as its middle argument, so the logged row is filled in. The no-op.replace('dep.', 'dep.')is gone too.
Still open
dep.fix.nonasciistill reaches the player as the raw key.link_failure_summaryappends the key to the joined detail, andui.pyonly translates a detail that starts withdep.. A detail starting withlink failedpasses through unchanged, so the player with the non-ASCII SDK path sees the literaldep.fix.nonascii. The new test asserts the raw key in the summary, which is why it passes. Translating the key before joining (or returning the hint as its own field thatui.pyrenders withself.m.t) fixes it, with a test on the rendered panel text.
New in this revision
2. The release zip now carries unpinned wheels. build-qt.yml runs pip download lz4 capstone fonttools backports.zstd nsz with no versions or hashes, and the result ships in the player's zip. #154 bundles everything else from pinned, checksummed sources, and the wheels should follow that: a requirements file with exact versions and --hash lines, then pip download --require-hashes --only-binary=:all: --platform win_amd64 --python-version 3.12 -r <file>. Otherwise every release build can pick up a different (or a compromised) package version without anyone seeing it in a diff.
3. Scope. The PR now also installs the Metal zip, downloads PortableGit, ships the wheels and changes the release workflow, while the title and body still describe the link probe report. Could you either split those into their own PR or update the title and body? The workflow change also changes how the Windows zip is built, so it is worth a line in the release notes.
Small
- The Swedish column of the new strings is still the English text (
dep.fix.nonascii,dep.row.log, and the new Metal and PortableGit strings in the Swift table's sv dictionary).
CI is green on all 9 checks.
…tegy may just fix it The owner's machine finally produced a readable failure, and it names the real problem: "ld64.lld: error: undefined symbol: puts" across all three strategies, with the linker's self-check green. That is libc not resolving — nothing to do with Metal (reinstalling it was a red herring). Two candidate causes, now both covered: - The SDK lacks its link stubs (usr/lib/libSystem.tbd, crt*.o): the probe checks both before linking and fails with "the download is incomplete — re-download or use the xip route" instead of an undefined-symbol list. The repo's iPhoneOS26.0.sdk does carry usr/lib/libSystem.tbd, so a partial checkout would read exactly like this. - The cross driver does not add -lSystem the way Apple's does: the probe gained a fourth strategy passing it explicitly, and build_app.link (the real build) now passes -lSystem too — idempotent when the driver already does it, decisive when it does not. And when all four fail, the summary appends a -v re-run of the first strategy, keeping the driver's link command, the runtime libs and the library search paths (12 lines) — so the next report shows whether -lSystem was passed and what the search paths were. Verified: python3 -m unittest discover -s frontend-qt/tests -> 175 tests, 9 skipped, 0 failures.
v0lumehi
left a comment
There was a problem hiding this comment.
Third pass, on the two new link-probe commits (f5aaf48, ba4eec7):
Blocker: the new SDK check rejects a complete SDK. probe_link now fails when usr/lib has no crt*.o. A real, complete iPhoneOS SDK has none: Xcode 27.1's iPhoneOS.sdk/usr/lib holds libSystem.tbd, libSystem.B.tbd and the _asan variants, but no crt1.o or any other crt*.o (iOS executables use LC_MAIN, so no crt object is linked). So every player with a correct SDK would now get "SDK is missing usr/lib/crt*.o: the download is incomplete" and the probe stops before it links. Please drop the crt*.o check and keep only libSystem.tbd.
Good:
-lSysteminbuild_app.linkand as a fourth probe strategy is a sensible fix for a cross driver that does not add libSystem itself. Apple's driver ignores the duplicate.- The capped verbose run is a useful last report.
Still open from my second pass:
dep.fix.nonasciiis still appended to the joined detail and reaches the panel as the raw key (ui.pyonly translates a detail that starts withdep.). The test still asserts the raw key in the summary.build-qt.ymlstill runspip downloadwithout versions or hashes, and the result ships in the player's zip.- The PR's title and body still describe only the link-probe report, while it now also installs the Metal zip, downloads PortableGit, ships the wheels, changes the release workflow and checks the SDK.
- The Swedish column of the new strings is still English.
CI is still running on ba4eec7.
…s no crt*.o iOS executables use LC_MAIN, so even a complete iPhoneOS SDK has no crt object in usr/lib; checking for one rejected every player's correct download before the probe could link (review, v0lumehi).
link_failure_summary embedded the raw dep.fix.nonascii key in its joined text, which ui.py never translates (it only translates a detail that starts with the key). The model's translator now rides the probe call, and the test asserts the translated hint.
…s only The zip ships these packages to players; the supply is now pinned (lz4 4.4.5, capstone 5.0.9, fonttools 4.68.0, backports.zstd 1.8.0, nsz 5.0.0) and sdists are out.
…e is gone The venv keeps main's package list (zbic joined) with this branch's offline wheels install; the CI wheels download gains zbic 1.0.1.post1; localization.py regenerated over the merged Swift table.
The merge of LNPANDY#206 left two German entries for the key. A Swift dictionary literal with a duplicate key traps at runtime, so swift test on main stopped at CheatsIOSNoteTests. The newer entry stays because it matches the English text.
Fix or feature
What and why
The Windows dependency experience stops guessing. Seven commits, each one a step the panel can name:
CI green; review items from @v0lumehi addressed (crt check dropped, hint translated, wheels pinned, Swedish added, title and body now match the scope).