Skip to content
PiinfraDevOps3 files · +141 −3

Build a rattler-build recipe for runai-model-streamer with Bazel C++ core

Session from conda-forge-agent-traces on Hugging Face by xhochy · BSD-3-Clause · condensed by Coders Talk

12msession
0interventions
GOAL

Create a conda-forge recipe (rattler-build) for the Python package runai-model-streamer, building the Bazel-based C++ core from the upstream git repo since PyPI ships no sdist, using cel-expr-python-feedstock as bazel inspiration.

  1. Prompt · +0
    Write a rattler-build recipe for runai-model-streamer, built from the git repo (no sdist on PyPI), using bazel inspiration from cel-expr-python-feedstock. Use the conda-forge skill and test locally.
  2. Agent did · +0m
    Read the conda-forge skill, cloned runai-model-streamer and cel-expr-python-feedstock, mapped the cpp/ bazel build and py/ setup.py, and confirmed the core libstreamer.so has no AWS/Azure/GCP deps and can run on the local linux-aarch64 host.
  3. Agent did · +2m
    Confirmed pytorch CPU builds exist for linux-aarch64/linux-64, verified core build dep tree is clean, and read the full cpp/WORKSPACE to plan patching out the devcontainer-specific toolchain.
  4. Agent did · +5m
    Generated a git-based patch to strip the custom cross-toolchain and AWS/Azure/GCP fetches from WORKSPACE, then wrote recipe.yaml, build.sh, and the patch file into recipes/runai-model-streamer/.
  5. Fail · +7m
    First build attempt with tests skipped failed: utils/semver/semver.cc member names major/minor collided with glibc sys/types.h macros under conda's sysroot.
  6. Agent did · +8m
    Generated patch 0002 to #undef major/minor macros in semver.h, added it to the recipe, and reran the build.
  7. Fail · +8m
    Build got further but failed at link time: cc/freeres/freeres.cc called __gnu_cxx::__freeres(), a symbol only present in the static libstdc++.a, unresolvable against conda's dynamic libstdc++.
  8. Agent did · +8m
    Patched freeres.cc to a no-op for dynamic linking, rebuilt successfully producing a real aarch64 ELF .so, verified all runai_* symbols load via ctypes, then ran the full test suite with pytorch which passed.
  9. Outcome · +12m
    conda-smithy lint passed ('in fine form'); committed 5 files (recipe.yaml, build.sh, 3 patches, 91 insertions) to the runai-model-streamer branch, not pushed.
VERDICT

Next time I'd tell the agent upfront that the target build host is linux-aarch64 (not macOS) so it skips the Docker/cross-compile detour and gets straight to patching the WORKSPACE. The two patches that actually did the work were the semver major/minor #undef fix and the freeres.cc no-op for dynamic libstdc++ — both were glibc/sysroot mismatches invisible from just reading the source, only found by actually running rattler-build and reading the link errors.

I tried this · 0

Discussion · 0

How Builds work