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
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.
- +0Prompt · +0Write 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.
- +0mAgent did · +0mRead 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.
- +2mAgent did · +2mConfirmed 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.
- +5mAgent did · +5mGenerated 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/.
- +7mFail · +7mFirst 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.
- +8mAgent did · +8mGenerated patch 0002 to #undef major/minor macros in semver.h, added it to the recipe, and reran the build.
- +8mFail · +8mBuild 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++.
- +8mAgent did · +8mPatched 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.
- +12mOutcome · +12mconda-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.
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.