Change:
Trying to build Rust 1.63.0 it fails with the error below:
Hm, so I can't immediately reproduce -- can you say more about what sources you're using to build? is the tarball I used to make an attempt at reproducing. You might also want to check if you've enabled the use of vendored sources ( should contain vendor = true under [build]).
We are using $ md5sum /package/pkg/rustc-1.63.0-0/build/rustc-1.63.0- /package/pkg/rustc-1.63.0-0/build/rustc-1.63.0- We did not have that in our build script. It worked without in the past. Could you refer me to further details, why it’s needed?
That tarball should be content equivalent to .xz, just with gzip compression. I don't see why we would've broken a workflow that worked in the past. Can you link me to the build script you're using? --frozen is passed if we detect that you're running either with . Rustbuild checks for sudo , while our Python script has a slightly different check . Maybe your environment changed in such a way that the Python check isn't true while the rustbuild check is? That would explain the error here. (Setting vendor = true in will override the detection logic here and just enable using the vendored sources from the tarball).
The files are in , and it’s merge/pull request $ git clone $ cd pkg-scripts $ git checkout add-rustc-1.63.0-0-with-cbindgen-0.24.3 $ sudo rustc-1.63.0- # … is what we use. should work in non-MarIuX environment (our distribution). Adapt in the script to your liking.
(Edited last comment.)
It looks like you were previously on 1.61, right? landed in 1.62, which introduced the difference[^1] between handling in and the Rust component for whether we're running inside sudo (as you do). I suspect that difference made us start using vendoring (though not sure), or stop, but either way, it's likely the cause of your problem. I'm going to go ahead and mark this as E-easy -- we should likely move the Rust code to use the same getuid() == 0 check. I believe we can do that with and appropriately cfg that if needed (based on what CI complains about). [^1]: that I pointed out in
Yes, we did. Thank you for the analysis. If you want us to test anything, please tell us.
Once merges (and we release a new nightly ~24 hours after that) it'd be great to retest with a nightly src tarball in your environment to confirm this is fixed, but also fine to just wait until the next stable release including it and file a new bug if not. That'll be 1.64, releasing September 22nd. (I marked the PR as beta-backport).

Discussion:
def check_vendored_status(self): """Check that vendoring is configured properly""" <ins> # keep this consistent with the equivalent check in rustbuild: # https://github.com/rust-lang/rust/blob/a8a33cf27166d3eabaffc58ed3799e054af3b0c6/src/bootstrap/lib.rs#L399-L405 </ins> if 'SUDO_USER' in os.environ and not self.use_vendored_sources: if os.getuid() == 0: self.use_vendored_sources = True

let src = config.src.clone(); let out = config.out.clone(); <ins> #[cfg(unix)] // keep this consistent with the equivalent check in x.py: // https://github.com/rust-lang/rust/blob/a8a33cf27166d3eabaffc58ed3799e054af3b0c6/src/bootstrap/bootstrap.py#L796-L797 </ins> let is_sudo = match env::var_os("SUDO_USER") { <del> Some(sudo_user) => match env::var_os("USER") { Some(user) => user != sudo_user, None => false, }, </del> <ins> Some(_sudo_user) => { let uid = unsafe { libc::getuid() }; uid == 0 } </ins> None => false, }; <ins> #[cfg(not(unix))] let is_sudo = false; </ins> let ignore_git = config.ignore_git; let rust_info = channel::GitInfo::new(ignore_git, &src);