Skip to content

[RSDK-11420] - Use conan for cpp-sdk dep#40

Open
seanavery wants to merge 23 commits intoviam-modules:mainfrom
seanavery:RSDK-11420
Open

[RSDK-11420] - Use conan for cpp-sdk dep#40
seanavery wants to merge 23 commits intoviam-modules:mainfrom
seanavery:RSDK-11420

Conversation

@seanavery
Copy link
Collaborator

@seanavery seanavery commented Feb 19, 2026

Summary

Replace the viam-cpp-sdk bundled in Docker base images with Conan package management for both Jetson and Pi targets.

  • Add conanfile.py pinning viam-cpp-sdk/0.20.1
  • All builds (make build, make package) now go through Conan (conan install + conan build)
  • Remove SDK source install from both Dockerfiles (Dockerfile.base, Dockerfile.base.bullseye)
  • Remove SDK-only apt deps from Pi image (libboost-all-dev, libgrpc++-dev, libprotobuf-dev, etc.)
  • AppImage packaging and release artifact format unchanged

CI Changes

  • Bumped all ARM runners from buildjet-2vcpu to buildjet-8vcpu (SDK builds from source, OOMs on 2vcpu)
  • Added actions/cache for .conan-home across build.yml, unit.yml, deploy.yml — first build is ~20min, cached builds are fast
  • Merged conan-build.yml smoke check into build.yml and deleted the redundant workflow
  • Unit tests now use make conan-test which chains install → build → test
  • Cache keys are per-target (jetson/pi) to avoid GCC 10/11 cache conflicts

Bullseye (Pi) Linker Fix

The SDK libviam_rust_utils.a references POSIX AIO symbols (aio_read, aio_write, etc.) that live in librt on Debian Bullseye (glibc 2.31). On Jammy (glibc 2.34+) these are merged into libc. The SDK Conan package declares -lrt but places libviam_rust_utils.a last in link order, after -lrt is already discarded. Fixed with -Wl,--no-as-needed in CMakeLists.txt.

Base Images

New base images pushed to ghcr.io with SDK removed (image size ~70% smaller):

Known Constraint

No Linux arm64 prebuilt binaries exist on viamconan for any viam-cpp-sdk version. The SDK conan-publish.yml has an arm64 runner in its matrix but packages are not appearing — likely silent CI failure. Every CI run builds the full SDK dep chain from source; actions/cache amortizes this after the first run.

Test Plan

  • Jetson: make buildmake package → ldd clean (no libviam deps) — Canon + CI
  • Pi: make buildmake package → ldd clean — Canon + CI
  • Unit tests green in CI
  • Lint green
  • Build Latest green (both targets)
  • Build and push new base images (0.0.7) with SDK removed
  • CI green with new 0.0.7 base images
  • Deploy Jetson AppImage to hardware, verify module starts and connects to CSI camera
  • Deploy Pi AppImage to hardware, verify module starts and connects to CSI camera
  • Follow up with SDK team on missing Linux arm64 prebuilt binaries in viamconan

@seanavery seanavery marked this pull request as draft February 19, 2026 20:17
@seanavery seanavery changed the title [RSDK-11420] - Use conan for jetson targets [RSDK-11420] - Use conan for cpp-sdk dep Mar 24, 2026
@seanavery seanavery marked this pull request as ready for review March 25, 2026 13:52
@seanavery seanavery requested a review from hexbabe March 25, 2026 13:54
@seanavery
Copy link
Collaborator Author

NOTE: need to upload new pi base image with ssl

@seanavery seanavery requested a review from oliviamiller March 25, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant