Stage Windows runtime DLLs flat next to bugscope.exe (fixes #5) - #8
Merged
Merged
Conversation
The Windows loader resolves load-time DLLs before main runs and searches only the exe dir, System32, and PATH — never our icebug/lib + liblbug subdirs — so the exe refused to start with arrow/lbug_shared/networkit_state not found. Hand-copying those surfaced round two (bz2/brotli/lz4): Arrow's transitive deps, which packaging never shipped because it globbed only arrow*.dll. - scripts/stage_windows_bundle.sh: copy every runtime DLL flat next to the exe (icebug recursive, liblbug, all vcpkg bin DLLs, OpenSSL), keep the subdir layout, fail fast when a known dep is missing flat. - CI Windows Package step calls it instead of the subdir-only copies. - src/windows_dll: prepend bundled subdirs to PATH at startup for runtime LOAD EXTENSION loads (defense-in-depth; cannot help load-time DLLs) + unit tests. - README troubleshooting entry for the Windows DLL failure.
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.
Fixes #5.
Problem:
bugscope.exerefused to start — firstarrow.dll/lbug_shared.dll/networkit_state.dllnot found, then (after hand-copying those)bz2.dll/brotlidec.dll/brotlienc.dll/lz4.dllnot found.Root cause: the Windows zip staged DLLs only in
icebug/lib+liblbugsubdirs, but the Windows loader resolves load-time DLLs beforemainruns and searches only the exe dir, System32, and PATH (no RPATH/@rpathequivalent). Round two was Arrow's transitive compression deps, which packaging never shipped because it globbed onlyarrow*.dll.Changes:
scripts/stage_windows_bundle.sh(new): copies every runtime DLL flat next to the exe (icebug recursive incl.networkit/, liblbug, all vcpkgbinDLLs, OpenSSLbin), keeps the subdir layout, and fails the build iflbug_shared/networkit_state/arrowis missing flat.src/windows_dll(new, called first inmainon Windows): prepends the exe dir + bundled subdirs toPATHfor runtimeLOAD EXTENSIONloads. Defense-in-depth only — documented as unable to help load-time DLLs.Verification:
cargo fmt --checkclean,cargo clippy --all-targetsclean, fullcargo testgreen (incl. 6 newwindows_dllunit tests); staging script dry-run against a fake tree stages 11 DLLs flat and exits 1 on missing-dep cases.