Unbreak the linux python pin; bound xtensor (partial cloud-build fix) - #79
Closed
Nicolas Palpacuer (NickPPC) wants to merge 3 commits into
Closed
Unbreak the linux python pin; bound xtensor (partial cloud-build fix)#79Nicolas Palpacuer (NickPPC) wants to merge 3 commits into
Nicolas Palpacuer (NickPPC) wants to merge 3 commits into
Conversation
bin/setup.sh assumed it would only ever run in canon, which has python3.11.
The Viam cloud build image used by `viam module reload` and `viam module build`
is Debian bullseye, which has no python3.11 package, so the setup step fails
before anything is compiled:
+ sudo apt install -y cmake python3.11 python3.11-venv wget
E: Unable to locate package python3.11
E: Couldn't find any package by glob 'python3.11'
Cloud builds for this module have been failing this way since at least
January 2026. Install the unversioned python3 / python3-venv instead: conan
requires >= 3.6, bullseye ships 3.9, and the venv further down is already
created with whatever python3 resolves to.
GitHub Actions is unaffected: it runs its own apt install inside the
rdk-devenv container, where python3.11 is present.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
viam-cpp-sdk requests an unbounded `xtensor/[>=0.24.3]` whenever cppstd is 17
or higher. That now resolves to xtensor 0.27.1, which itself requires C++20,
so dependency resolution fails outright against conancenter:
xtensor/0.27.1: Invalid: Current cppstd (17) is lower than the required
C++ standard (20).
Exited with code exit status 6
This blocks `viam module reload` in the Viam cloud builder and any local build
via bin/setup.sh. Override the range downstream so it resolves to 0.25.0.
This is a workaround: the real fix belongs in viam-cpp-sdk's
_xtensor_requires(), which should bound its range the way it already does for
the cppstd <= 14 case. Drop this once that lands.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The upstream range was already bounded in viam-cpp-sdk releases/v0.37.0 (PR viamrobotics/viam-cpp-sdk#650), so the removal trigger is bumping the pin off 0.20.1, not waiting on an upstream fix. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
viam module reload/viam module buildhave been failing for this module since at least January 2026, and local builds viabin/setup.share broken too. This PR fixes one cause outright and adds a stopgap for a second. It does not fully restore cloud builds — see Known gap.GitHub Actions is unaffected by either cause, which is why this went unnoticed: CI never calls
bin/setup.sh.Changes
python3/python3-venvon linux instead ofpython3.11/python3.11-venv, and replace the stale canon-only comment with the reason the version must not be pinned.xtensorrange to[>=0.24.3 <0.27]for this module's own dependency graph.1. python3.11 does not exist on the build image — FIXED
bin/setup.shpinnedpython3.11, but the Viam cloud build image is Debian bullseye, which has no such package:The script's own comment explained the drift — "NOTE: this is written under the assumption that it will be built in canon". Canon has python3.11; the cloud builder does not. Safe to unpin: conan needs Python >= 3.6, bullseye ships 3.9, and the venv below is already created with whatever
python3resolves to.Verified in the cloud build log:
2. Unbounded xtensor range resolves to a C++20-only version — STOPGAP
We pin
viam-cpp-sdk/0.20.1, whose recipe requests an unboundedxtensor/[>=0.24.3]at cppstd >= 17. That now resolves to 0.27.1, which itself requires C++20:This is already fixed upstream. viam-cpp-sdk added the matching upper bound in #650, first released in
releases/v0.37.0:So the durable fix is bumping the SDK pin past v0.37.0, which is what
chore/upgrade-viam-depsis trying to do (currently blocked on a separate API migration — the newer SDK removedviam/sdk/resource/reconfigurable.hpp). This override is a stopgap for as long as we stay on 0.20.1, and the comment inconanfile.pysays to delete it when the pin moves.Known gap — cloud builds still fail
The override does not fix the cloud build, because that is not where the build dies.
bin/setup.shclones the SDK and builds it first:That builds the SDK's recipe, so this repo's
conanfile.pyis never consulted and the unbounded range still wins:The override is still needed for this module's own
conan createstep, which fails the same way without it — it is just not sufficient on its own. Constraining the SDK build too would mean injecting[replace_requires]into the conan profile frombin/setup.sh, which writes to the developer's global conan config; that seemed worse than landing the SDK bump.Testing
bash -n bin/setup.shandast.parseonconanfile.pyboth pass.For reviewers
chore/upgrade-viam-depsinstead — that removes the need for it entirely. Cause 1's fix stands on its own either way.conan remote add viamconan --index 0that CI has andsetup.shlacks. Real divergence, but not the cause — version ranges resolve to the newest across all enabled remotes, so adding it still selects 0.27.1. Left alone deliberately.Claude Code Prompts Used
🤖 Generated with Claude Code