Diagnose and fix ApraPipes CI/CD build failures across all platforms (Windows, Linux x64/ARM64, Jetson, macOS, Docker)...
You are an ApraPipes DevOps troubleshooting agent. Your role is to:
DevOps Principle: Fix the build, not the code.
IMPORTANT: For the comprehensive debugging methodology and guiding principles, see methodology.md.
Key Principles:
NOTE: All platforms now use modern tooling. Jetson ARM64 runs JetPack 5.0+ (Ubuntu 20.04, gcc-9.4, CUDA 11.4). JetPack 4.x is no longer supported due to GitHub Actions GLIBC requirements.
For detailed platform requirements, see:
troubleshooting.jetson.md ā JetPack 5.x requirements, multimedia API changesCheck the failing workflow to determine platform and configuration:
# List recent workflow runs
gh run list --limit 10
# View specific run
gh run view <run-id>
Extract from workflow name/logs:
windows-latest, ubuntu-latest, macos-latest) vs self-hostedUse this decision tree:
Which workflow failed?
āā CI-Windows (Windows + CUDA, cloud runners)
ā āā build job ā troubleshooting.windows.md
ā āā cuda job ā troubleshooting.cuda.md (GPU tests on self-hosted)
ā
āā CI-Linux (Linux x64 + CUDA, cloud runners)
ā āā build job ā troubleshooting.linux.md
ā āā cuda job ā troubleshooting.cuda.md (GPU tests on self-hosted)
ā āā docker job ā troubleshooting.containers.md
ā
āā CI-Linux-ARM64 (Jetson/ARM64 + CUDA, self-hosted)
ā āā ci job ā troubleshooting.jetson.md + troubleshooting.cuda.md
ā
āā CI-MacOSX-NoCUDA (macOS, cloud runners)
āā ci job ā troubleshooting.macos.md
# Download full logs (don't rely on UI truncation)
gh run view <run-id> --log > /tmp/build-<run-id>.log
# Search for errors
grep -i "error:" /tmp/build-<run-id>.log | head -20
grep "CMake Error" /tmp/build-<run-id>.log
grep "failed with" /tmp/build-<run-id>.log
CRITICAL: If step has continue-on-error: true, don't trust step status - check actual error messages!
These issues can appear on ANY platform. Check these first before diving into platform-specific guides:
Symptoms:
error: no version database entry for <package>error: failed to fetch ref <hash> from repositoryQuick Check:
# Verify baseline commit is fetchable
git ls-remote https://github.com/Apra-Labs/vcpkg.git | grep <baseline-hash>
Fix: See reference.md ā vcpkg Baseline Management
Symptoms:
sf::Int16 not found)Root Cause: Package upgraded to new major version with breaking changes
Fix: Pin package to compatible version in base/vcpkg.json:
{
"overrides": [
{ "name": "sfml", "version": "2.6.2" }
]
}
See: reference.md ā Version Pinning Strategy
Symptoms:
ModuleNotFoundError: No module named 'distutils'Root Cause: vcpkg using Python 3.12+ which removed distutils
Fix: Downgrade Python in vcpkg/scripts/vcpkg-tools.json to 3.10.11
See: troubleshooting.windows.md ā Issue W1 (applies to all platforms)
Maintenance Note: When updating cross-platform issue fixes (like Python distutils), update ALL relevant locations:
- SKILL.md (this file) - Cross-Platform Patterns section
- troubleshooting.windows.md - Issue W1 (detailed fix)
- troubleshooting.linux.md - Issue L3 (reference to W1)
Keep Windows issue W1 as the detailed reference, others should point to it.
Symptoms:
fatal: remote error: upload-pack: not our ref <hash>Root Cause: Committed detached HEAD or parent commit (not advertised by git)
Quick Check:
# Check if commit is advertised
cd vcpkg
git ls-remote origin | grep <commit-hash>
Fix: Create branch and push, or use advertised commit (branch tip/tag)
See: reference.md ā vcpkg Fork Management
Symptoms:
Root Cause: Cache key changed between Phase 1 and Phase 2
Quick Check: Compare cache keys in Phase 1 save vs Phase 2 restore logs
Fix: Ensure cache key includes all relevant files:
key: ${{ inputs.flav }}-5-${{ hashFiles('base/vcpkg.json', 'base/vcpkg-configuration.json', 'submodule_ver.txt') }}
See: reference.md ā Cache Configuration
Symptoms:
Root Cause: Triggering gh workflow run multiple times in quick succession without waiting for confirmation
How It Happens:
Quick Check:
# Check for duplicate runs on the same branch/commit
gh run list --workflow=<workflow-name> --branch <branch-name> --limit 10
Prevention Protocol:
gh workflow run returns a run ID; wait for it before re-executinggh run list to verify no existing run for the commitgh run watch <run-id> to confirm startgh run cancel <run-id>Example Fix:
# BAD: May trigger multiple times
gh workflow run CI-Linux-CUDA-Docker.yml --ref fix/branch # Called 3 times accidentally
# GOOD: Check first, trigger once, watch immediately
gh run list --workflow=CI-Linux-CUDA-Docker.yml --branch fix/branch --limit 3
LATEST_RUN=$(gh run list --workflow=CI-Linux-CUDA-Docker.yml --branch fix/branch --limit 1 --json databaseId --jq '.[0].databaseId')
if [ -z "$LATEST_RUN" ] || [ "$(gh run view $LATEST_RUN --json status --jq '.status')" = "completed" ]; then
NEW_RUN=$(gh workflow run CI-Linux-CUDA-Docker.yml --ref fix/branch --json 2>&1 | grep -oP 'https://github.com/.*/actions/runs/\K[0-9]+')
gh run watch $NEW_RUN
fi
Immediate Cleanup:
# If duplicates found, cancel older runs (keep newest)
gh run cancel 19907395952 && gh run cancel 19907463211 # Keep 19907630652
| Workflow | Job | Primary Guide | Secondary Guides |
|---|---|---|---|
| CI-Windows | build | troubleshooting.windows.md | reference.md |
| CI-Windows | cuda | troubleshooting.cuda.md | troubleshooting.windows.md |
| CI-Linux | build | troubleshooting.linux.md | reference.md |
| CI-Linux | cuda | troubleshooting.cuda.md | troubleshooting.linux.md |
| CI-Linux | docker | troubleshooting.containers.md | troubleshooting.linux.md |
| CI-Linux-ARM64 | ci | troubleshooting.jetson.md | troubleshooting.cuda.md |
| CI-MacOSX-NoCUDA | ci | troubleshooting.macos.md | troubleshooting.vcpkg.md, reference.md |
# GitHub CLI (required for all platforms)
gh --version
# Git (required for submodule management)
git --version
# Platform-specific package managers
# Windows: chocolatey
# Linux: apt/yum
# macOS: homebrew (future)
GitHub Actions:
# List workflows
gh workflow list
# Trigger workflow manually
gh workflow run <workflow-name>
# Monitor run
gh run watch <run-id>
# Download logs
gh run view <run-id> --log > build.log
# Cancel run
gh run cancel <run-id>
vcpkg Diagnostics:
# List installed packages
./vcpkg/vcpkg list
# Check package status
cat vcpkg_installed/vcpkg/status
# Verify baseline
cat base/vcpkg-configuration.json | grep baseline
Log Analysis:
# Find errors (case insensitive)
grep -i "error" build.log
# Find CMake errors
grep "CMake Error" build.log
# Find package failures
grep "error:" build.log | grep "package"
# Find specific issues
grep -i "distutils\|python" build.log
grep "unexpected hash" build.log
grep "PKG_CONFIG" build.log
continue-on-error)git ls-remote before using as baselinePhase 1 (Prep) Success:
Phase 2 (Build/Test) Success:
Full Build Success:
Use this table to quickly find the right fix for common error messages. Search for key phrases in your error log.
| Error Message (grep pattern) | Issue | Fix Location |
|---|---|---|
No module named 'distutils' |
Python 3.12+ removed distutils | troubleshooting.windows.md ā W1 |
Could NOT find PkgConfig |
pkg-config missing or incompatible | troubleshooting.windows.md ā W2 |
unexpected hash |
Library download hash mismatch | reference.md ā Hash Fix Process |
no version database entry |
vcpkg baseline outdated | reference.md ā Baseline Management |
not our ref / upload-pack |
Git commit not fetchable | reference.md ā vcpkg Fork Management |
Cache not found |
Cache key mismatch between phases | reference.md ā Cache Configuration |
CUDA_HOME is not set |
CUDA env vars missing | troubleshooting.cuda.md ā C1 |
nvcc: command not found |
CUDA toolkit not in PATH | troubleshooting.cuda.md ā C2 |
cudnn.h: No such file |
cuDNN not installed | troubleshooting.cuda.md ā C3 |
No space left on device |
Disk full (embedded devices) | troubleshooting.jetson.md ā J1 |
nvbuf_utils not found |
JetPack 5.x API change | troubleshooting.jetson.md ā J7 |
libnpp*.so not found |
CUDA libs not in ldconfig | troubleshooting.jetson.md ā J8 |
dlsym@@GLIBC undefined |
Static linking missing -ldl | troubleshooting.jetson.md ā J3 |
libpng/png.h not found |
vcpkg header path mismatch | troubleshooting.jetson.md ā J4 |
version '2.x.x', required '>= 2.y' |
PKG_CONFIG_PATH wrong order | troubleshooting.jetson.md ā J6 |
Unsupported SFML component |
Library breaking change | reference.md ā Version Pinning |
glib requires feature 'libmount' |
Platform filter needed | troubleshooting.linux.md ā L2 |
Not in table? See "When Stuck" section in methodology.md for research strategies.
This skill should be updated when:
The new unified architecture (as of Dec 2025):
flav parameter - Windows, Windows-CUDA, Linux, Linux-CUDA, Linux-Docker, Linux_ARM64, MacOSX