Commit 0780856
yuv-sys: actionable error when libyuv submodule is not initialized (#1347)
## Problem
A fresh `git clone` without `--recursive` leaves `yuv-sys/libyuv` empty.
The build script copies the empty directory and fails several calls
later with:
thread 'main' panicked at yuv-sys/build.rs:140:10:
called Result::unwrap() on an Err value: Os { code: 2, kind: NotFound,
message: "No such file or directory" }
Nothing in the error points at the submodule as the cause, and the
README build instructions don't mention `--recursive`. CI/container
builds don't hit this because the Dockerfile initializes submodules
explicitly — it only affects local builds from a fresh clone.
## Fix
Check for `libyuv/include/libyuv.h` before the copy and panic with the
remedy.
## Verification
- `git submodule deinit -f yuv-sys/libyuv` → build fails with the new
message
- `git submodule update --init` → clean build succeeds (macOS, aarch64)
---------
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>1 parent 338d9c0 commit 0780856
2 files changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
137 | 144 | | |
138 | 145 | | |
139 | 146 | | |
| |||
0 commit comments