|
17 | 17 |
|
18 | 18 | set -euo pipefail |
19 | 19 |
|
20 | | -dnf install -y libva-amdgpu-devel rocjpeg-devel |
| 20 | +# Diagnostics: which repos are configured and whether the rocJPEG/libva packages |
| 21 | +# are visible. If this script fails again, these tell us whether it's a |
| 22 | +# missing/stale repo vs. a genuinely absent package. Kept non-fatal. |
| 23 | +echo "::group::rocJPEG: dnf repos and package availability" |
| 24 | +dnf repolist --all 2>&1 | head -40 || true |
| 25 | +dnf list --refresh --available 'rocjpeg*' 'libva-amdgpu*' 2>&1 | head -30 || true |
| 26 | +echo "::endgroup::" |
| 27 | + |
| 28 | +# rocjpeg-devel is in the ROCm dnf repo; its VA-API dependency (libva-amdgpu*) |
| 29 | +# is in the separate amdgpu-graphics repo. --refresh forces a metadata download: |
| 30 | +# the manylinux build images ship with stale dnf cache that can miss |
| 31 | +# libva-amdgpu-devel ("No match for argument"). If the amdgpu repo still isn't |
| 32 | +# visible, fall back to installing rocjpeg-devel alone and let dnf resolve its |
| 33 | +# deps (surfacing a clear error if libva genuinely can't be satisfied). |
| 34 | +dnf install -y --refresh libva-amdgpu-devel rocjpeg-devel \ |
| 35 | + || dnf install -y --refresh rocjpeg-devel |
| 36 | + |
| 37 | +# Diagnostics: where rocJPEG landed (feeds the CMake discovery), and the real |
| 38 | +# header API surface. DecodeJpegRocm.cpp is written against the documented API; |
| 39 | +# if it fails to compile, these grep results show the actual enum/struct/function |
| 40 | +# names from the installed rocjpeg.h so we can fix mismatches without guessing. |
| 41 | +echo "::group::rocJPEG: installed files and header API" |
| 42 | +rpm -ql rocjpeg-devel rocjpeg 2>&1 | grep -Ei 'rocjpeg\.h|librocjpeg' || true |
| 43 | +ls -l /opt/rocm*/lib/librocjpeg* 2>/dev/null || true |
| 44 | +rocjpeg_header="$(find /opt -name rocjpeg.h 2>/dev/null | head -1)" |
| 45 | +echo "rocjpeg.h -> ${rocjpeg_header:-<not found>}" |
| 46 | +if [[ -n "${rocjpeg_header}" ]]; then |
| 47 | + grep -nE \ |
| 48 | + 'ROCJPEG_OUTPUT_|ROCJPEG_CSS_|ROCJPEG_BACKEND_|ROCJPEG_MAX_COMPONENT|RocJpegDecodeParams|crop_rectangle|output_format|rocJpegDecodeBatched|rocJpegDecode\(|rocJpegGetImageInfo|rocJpegStreamParse|rocJpegCreate|rocJpegGetErrorName' \ |
| 49 | + "${rocjpeg_header}" || true |
| 50 | +fi |
| 51 | +echo "::endgroup::" |
0 commit comments