Repository navigation
package: pin the chip model at v1.3.1, which Windows can open - #638
Merged
Merged
Conversation
v1.3.0's Windows DLL imported libstdc++-6.dll. That exists inside the MSYS2 environment it was built in and almost nowhere else, so on any ordinary Windows machine neither emulator could open the chip model: qemu-system-xtensa.exe: sx1262: cannot load the chip model at ...\libvirtualsx1262.dll: The specified module could not be found. which names the DLL rather than the dependency behind it. Renode reaches the same library through LoadLibraryW and failed the same way, so this was every emulated board on Windows, ESP32 and nRF52 alike. It surfaced three steps downstream as "firmware started but never connected within 40s" - a radio that never answers, because the model behind it never loaded. Nothing was lost in packaging: the release staged what build.sh produced and we shipped what we unpacked. The build asked for a dynamic runtime on a platform that has none. MeshBench/virtual-sx1262#1 links it statically; v1.3.1 is that build, same ABI and same model, and imports only kernel32 and msvcrt. Verified against the published artefact rather than a local build: the v1.3.1 windows tarball dropped into a v0.0.8 install, probe cache cleared. board.probe Generic_E22_sx1262 v1.3.0 boot failed firmware started but never connected within 40s v1.3.1 boot passed attached and answering The Windows tarball grows from 28 kB to 143 kB, which is the static runtime and the whole cost of the fix. The catalogue's digests and sizes move with the pin, as the rule at the top of emulator-pins.env requires. Closes #632. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RSb8bN9gtL72cXAxtyTbAG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #632. Pairs with MeshBench/virtual-sx1262#1, which is merged and released as v1.3.1.
What was wrong
v1.3.0's Windows DLL imported
libstdc++-6.dll— present inside the MSYS2 environment it was built in, and almost nowhere else. So on any ordinary Windows machine neither emulator could open the chip model:which names the DLL rather than the dependency behind it. Renode reaches the same library through
LoadLibraryWand failed identically, so this was every emulated board on Windows, ESP32 and nRF52 alike. It surfaced three steps downstream asfirmware started but never connected within 40s, which reads as flaky emulation rather than a missing file.Nothing was lost in packaging.
release.ymlstaged exactly whatbuild.shproduced andpackage.ymlshipped exactly what it unpacked — I rebuilt v1.3.0's source with the unmodified flags and got the same imports as the shipped artefact. The build asked for a dynamic runtime on a platform that has none.What this changes
The pin, and the catalogue's digests and sizes beside it, as the rule at the top of
emulator-pins.envrequires:33f4453c…26,340 B7e04041a…26,335 B362ed99e…19,118 B167e471b…19,119 B176b2962…28,685 B90621299…146,549 BThe Windows tarball grows from 28 kB to 143 kB. That is the static runtime, and the whole cost of the fix. Same ABI (1.3), same model — only the Windows link changed; the DLL now imports
kernel32andmsvcrtand nothing else.Verification
Against the published v1.3.1 artefact rather than a local build, on Windows 10 Home 22H2:
virtual-sx1262-windows-amd64.tar.gzfrom the release,sha256sum -cagainst its published.sha256: OK, and the digest matches what this PR puts in the catalogueKERNEL32.dll,msvcrt.dll— nothing elseThe node then pins its board image properly —
firmware_board: "Heltec_v3", which stayed empty for as long as the boot was failing — andboard.screenreports a real 128x64 SSD1306 instead of refusing.Not in this PR
The bundle still cannot tell a loadable DLL from an unloadable one.
package.ymlrunsfileon it, which passes happily on either, andsetup.checkreports the toolchain rowreadyon the strength of the path existing — both were green through this entire bug, on three platforms, for a release. The upstream PR adds an import check where the DLL is built; the equivalent here would catch a bad artefact arriving from anywhere rather than only from a build we control. Worth doing, and worth its own change.🤖 Generated with Claude Code
https://claude.ai/code/session_01RSb8bN9gtL72cXAxtyTbAG