Ensure installation of cross-build packages before the build script runs#366
Open
agriyakhetarpal wants to merge 4 commits into
Open
Ensure installation of cross-build packages before the build script runs#366agriyakhetarpal wants to merge 4 commits into
agriyakhetarpal wants to merge 4 commits into
Conversation
ryanking13
approved these changes
Jun 8, 2026
ryanking13
left a comment
Member
There was a problem hiding this comment.
Thanks. I am okay with this as a workaround, but we should probably upstream the problematic packages and let them use unisolated build instead.
ryanking13
requested changes
Jun 8, 2026
| host_requirements = {req.lower() for req in self.recipe.requirements.host} | ||
|
|
||
| if unisolated_packages & host_requirements: | ||
| get_current_xbuildenv_manager().ensure_cross_build_packages_installed() |
Member
There was a problem hiding this comment.
Hmm, wait. Actually, when building recipes, we don't rely on ensure_cross_build_packages_installed at all.
After building cross-build recipe such as numpy, it should install into the host_site_package as a post build step, so it should be already installed there.
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.
Closes #365
In our builder code, I've added a new method called
_ensure_cross_build_packages_for_host_requirementsto the baseRecipeBuilder, and I am calling it beforeself._build_package(bash_runner)runs.The idea is that we need to check whether the package's declared host requirements, say,
numpyfor RobotRaconteur) intersect withget_unisolated_packages(), and if so (and we are in an xbuildenv), we call our lazy-install machinery established via #302 a little earlier, to ensure that they get installed and the cross-build files are available when the build script runs.I don't think I've found a better way to do this, as our build pipeline is pretty tricky to understand and test in isolation anyway.
There is an explanation in #365 for where this bug comes up in practice.