Bugs caught during WSL → Debian 13 migration (2026-04-22)
Synced read-only from
/home/synnet/mirrors/synvirt-product/docs/MIGRATION_FINDINGS.md. Edit at the source, not here.
Bugs caught during WSL → Debian 13 migration (2026-04-22)
Section titled “Bugs caught during WSL → Debian 13 migration (2026-04-22)”Four latent bugs surfaced when running scripts/debian-bootstrap.sh
followed by cargo build --release and iso-builder/build.sh on a
clean Debian 13 VMware VM (no state inherited from the prior WSL host).
All were pre-existing; the migration only exposed them because host
environment assumptions and pre-populated vendor caches were gone.
1. libclang-dev / llvm-dev missing from bootstrap
Section titled “1. libclang-dev / llvm-dev missing from bootstrap”- Symptom:
cargo build --releasefailed withclang-sys v1.8.1build script panicking:couldn't find any valid shared libraries matching: ['libclang.so', 'libclang-*.so']. - Root cause:
scripts/debian-bootstrap.shinstalledclang llvmbut notlibclang-dev/llvm-dev. A transitivebindgenuser in the workspace (viaclang-sys) needslibclang.soat build time, which only ships with the-devpackages. - Fix:
scripts/debian-bootstrap.sh:69— appendedlibclang-dev llvm-devto the base-tooling apt install. - Pre-existing / new: pre-existing latent. The old WSL host happened
to have
libclang-devinstalled manually at some point.
2. cargo not in PATH under sudo / root in iso-builder/build.sh
Section titled “2. cargo not in PATH under sudo / root in iso-builder/build.sh”- Symptom:
sudo ./build.shfailed immediately at step[1/6]withcargo: command not found(exit 127). - Root cause:
rustupinstalls cargo under the invoking user’s~/.cargo/bin.sudoenforcessecure_path, which does not include user cargo dirs.build.shassumed cargo was reachable. - Fix:
iso-builder/build.sh:19-38— guard block that sources${SUDO_USER}/.cargo/env,/home/synvirt/.cargo/env, or${HOME}/.cargo/envin that order before running any cargo command; exits 127 with a clear error if none succeed. - Pre-existing / new: pre-existing latent. Old workflow ran
./build.shas the user (sudo only forlb buildinternals), so the top-level invocation always had cargo in PATH.
3. virtio-win URL filename mismatch in build.sh
Section titled “3. virtio-win URL filename mismatch in build.sh”- Symptom:
[3/6] building guest-tools ISOdied withcurl: (22) The requested URL returned error: 404on.../archive-virtio/virtio-win-0.1.240-1/virtio-win-0.1.240-1.iso. - Root cause: upstream convention is a dir with
-Nsuffix but the ISO inside has no-N, e.g.virtio-win-0.1.240-1/virtio-win-0.1.240.iso.build.shinterpolated the sameVIRTIO_WIN_VERSIONinto both, so the constructed URL never existed at any version (verified against 0.1.240-1 through 0.1.285-1). - Fix:
iso-builder/build.sh:80-86— split intoVIRTIO_WIN_VERSION(numeric part, default0.1.240) andVIRTIO_WIN_DIR_SUFFIX(default-1). The filename uses only the version; the dir concatenates both. Smoke-tested: HTTP 200 on the patched URL. - Pre-existing / new: pre-existing latent. Never caught because
iso-builder/vendor/guest-tools/was pre-populated on old hosts (finding #4), so thecurlpath was skipped.
4. iso-builder/vendor/guest-tools/ relied on inherited host state
Section titled “4. iso-builder/vendor/guest-tools/ relied on inherited host state”- Symptom: the guest-tools fetch path in
build.shwas never exercised on previously-used dev hosts. Clean migration had an emptyvendor/guest-tools/, so the broken URL from finding #3 executed for the first time. - Root cause: the cache dir is (correctly) gitignored, but there is no documented pre-fetch step for fresh hosts, nor a checksum manifest. New operators discover the path only when it fails.
- Fix: none in tree — addressed indirectly by fix #3 (fresh fetch
now succeeds on first run). Documentation of the flag
SYNVIRT_SKIP_GUEST_TOOLS=1remains the escape hatch. - Pre-existing / new: pre-existing, architectural. Worth revisiting if a CI runner or second dev host ever enters the rotation.