Commit 36ed219
authored
fix(windows): align CRT to dynamic to resolve ONNX __imp_ link errors (#7)
The x86_64-pc-windows-msvc release link failed with 75 LNK2019/LNK2001
errors on __imp_* C-runtime symbols. Root cause is a CRT linkage conflict
(pykeio/ort #329): ONNX Runtime's prebuilt lib (ort download-binaries)
links the CRT dynamically (/MD) and references __imp_* import stubs, but
two C build-deps hardcode .static_crt(true), dragging libcmt/libucrt into
the link and leaving ONNX's __imp_* unresolved:
- esaxx-rs via tokenizers' default `esaxx_fast` feature (training-only)
- libsqlite3-sys (bundled) via burn's default `dataset` feature
Both are pulled by features WhisperForge never uses (no .encode(), no
tokenizer training, no burn datasets). Fixes:
- tokenizers: default-features=false + ["onig"] — drops esaxx_fast, so
esaxx-rs no longer compiles its static-CRT C++. `onig` keeps the same
regex backend as the default, so load/decode behavior is unchanged.
- .cargo/config.toml: /NODEFAULTLIB:libcmt+libucrt and force msvcrt+ucrt,
neutralizing libsqlite3-sys's static CRT and returning the link to
ONNX's standard all-dynamic configuration. The prior
legacy_stdio_definitions.lib flag targeted the wrong symbols.
Also add a `windows-link-check` CI job that links the MSVC target with the
dist feature set on every PR — the v0.5.3 failure surfaced only at tag time
because PR runs only do `dist plan`, not a real build.1 parent c28288c commit 36ed219
4 files changed
Lines changed: 53 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
15 | 20 | | |
16 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
63 | 68 | | |
64 | 69 | | |
65 | 70 | | |
| |||
0 commit comments