Skip to content

Conversation

@vbendeb
Copy link

@vbendeb vbendeb commented Oct 8, 2025

cros_sdk is the ChromeOS build environment which is a close match for Debian Linux distros.

Tested by building opentitantool in ChromeOS SDK environment.

Change-Id: Ic50e8cf57b6758fb1053a390e919beeefaabe7be

@vbendeb
Copy link
Author

vbendeb commented Oct 8, 2025

This adds cros_sdk to the list of distributions supporting llvm toolchain builds.

@hcallahan-lowrisc
Copy link
Contributor

I have also had the same issue with this module trying to run on a distro I care about (NixOS). I found that bumping to the latest version of the module (1.5.0) fixes the problem for me, as the logic to determine valid distributions has been overhauled.
Might this be a solution for cros_sdk as well? It would be nice to fix this in a way which doesn't require carrying a patch.

@vbendeb
Copy link
Author

vbendeb commented Oct 9, 2025

@hcallahan-lowrisc how did you bump the version of the module, is it not determined by Bazel configuration (in which case it should have been updated for everybody)?

@hcallahan-lowrisc
Copy link
Contributor

Oh I haven’t merged anything yet, just found that fix worked locally. Your PR reminded me.
Does 1.5.0 work for your platform?

@vbendeb
Copy link
Author

vbendeb commented Oct 9, 2025

Oh I haven’t merged anything yet, just found that fix worked locally. Your PR reminded me. Does 1.5.0 work for your platform?

I have not tried it, what do I need to change for that? (I am not as bazel literate as I would like to be :)

@vbendeb
Copy link
Author

vbendeb commented Oct 9, 2025

And one more thing: changing the major version of the package needs to be thoroughly tested, this patch is very light wave and is guaranteed not to affect anybody else

@hcallahan-lowrisc
Copy link
Contributor

Oh I haven’t merged anything yet, just found that fix worked locally. Your PR reminded me. Does 1.5.0 work for your platform?

I have not tried it, what do I need to change for that? (I am not as bazel literate as I would like to be :)

You can test it just by bumping the version, i.e. this diff and then re-running bazel commands will update the lockfile automatically:

-bazel_dep(name = "toolchains_llvm", version = "1.1.2")
+bazel_dep(name = "toolchains_llvm", version = "1.5.0")

And one more thing: changing the major version of the package needs to be thoroughly tested, this patch is very light wave and is guaranteed not to affect anybody else

We discussed this informally today, and this module is only used to provide a llvm toolchain for rust bindgen. Updating the module should not change the toolchain, it is the just the infrastructure used to fetch it, so it should be a no-op in practice. I'm happy to confirm that is the case if the change is viable for you too.

@vbendeb
Copy link
Author

vbendeb commented Oct 10, 2025

This version bump did not work for me. Here's the patch

$ git diff MODULE.bazel
diff --git a/MODULE.bazel b/MODULE.bazel
index 810acda8b0..47d8e0df12 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -35,7 +35,7 @@ archive_override(
 # Dependencies:
 bazel_dep(name = "rules_rust", version = "0.59.2")
 bazel_dep(name = "rules_rust_bindgen", version = "0.59.2")
-bazel_dep(name = "toolchains_llvm", version = "1.1.2")
+bazel_dep(name = "toolchains_llvm", version = "1.5.0")
 
 # Overrides and patches:
 single_version_override(

and this is the build error log:

https://pastebin.com/vKZEfn46

cros_sdk is the ChromeOS build environment which is a close match for
Debian Linux distros.

Tested by building opentitantool in ChromeOS SDK environment.

Change-Id: Ic50e8cf57b6758fb1053a390e919beeefaabe7be
Signed-off-by: Vadim Bendebury <[email protected]>
Copy link
Contributor

@hcallahan-lowrisc hcallahan-lowrisc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I will try to get this fixed upstream so we can go to the latest release and no longer need to carry a patch.

@vbendeb-lang
Copy link
Contributor

LGTM, I will try to get this fixed upstream so we can go to the latest release and no longer need to carry a patch.

Let me know if you want me to try your fix in ChromeOS chroot build environment.

@hcallahan-lowrisc
Copy link
Contributor

LGTM, I will try to get this fixed upstream so we can go to the latest release and no longer need to carry a patch.

Let me know if you want me to try your fix in ChromeOS chroot build environment.

I sent you a message on Slack 👍

@cfrantz
Copy link
Contributor

cfrantz commented Oct 21, 2025

The test failures aren't related to the content of this change; both tests pass locally.

@cfrantz cfrantz merged commit ff05f6d into lowRISC:earlgrey_1.0.0 Oct 21, 2025
92 of 98 checks passed
@jwnrt jwnrt added the CherryPick:master This PR should be cherry-picked to master label Feb 6, 2026
@lowrisc-ci
Copy link

lowrisc-ci bot commented Feb 6, 2026

Backport failed for master, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin master
git worktree add -d .worktree/backport-28456-to-master origin/master
cd .worktree/backport-28456-to-master
git switch --create backport-28456-to-master
git cherry-pick -x cbe89842d3c17ee1f0ed92c237cb51243c1d629d

@lowrisc-ci lowrisc-ci bot added the Manually CherryPick This PR should be manually cherry picked. label Feb 6, 2026
@lowrisc-ci
Copy link

lowrisc-ci bot commented Feb 6, 2026

Backport failed for master, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin master
git worktree add -d .worktree/backport-28456-to-master origin/master
cd .worktree/backport-28456-to-master
git switch --create backport-28456-to-master
git cherry-pick -x cbe89842d3c17ee1f0ed92c237cb51243c1d629d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CherryPick:master This PR should be cherry-picked to master Manually CherryPick This PR should be manually cherry picked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants