`./mach vendor rust` fails with "Could not find 'cargo' on your $PATH." on Windows (MozBuild)
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox84 fixed)
| Tracking | Status | |
|---|---|---|
| firefox84 | --- | fixed |
People
(Reporter: Dexter, Assigned: rstewart)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Running the ./mach vendor rust fails on Windows 10 (MozillaBuild), while the ./mach cargo check works just fine. The vendoring command fails with the following error:
./mach vendor rust
Error running mach:
['vendor', 'rust']
The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file vendor| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.
If filing a bug, please include the full output of mach, including this error
message.
The details of the failure are as follows:
FileNotFoundError: [Errno 2] Could not find 'cargo' on your $PATH.
File "d:\mozilla-unified\python/mozbuild/mozbuild/vendor/mach_commands.py", line 145, in vendor_rust
vendor_command.vendor(**kwargs)
File "d:\mozilla-unified\python/mozbuild\mozbuild\vendor\vendor_rust.py", line 464, in vendor
cargo = self._ensure_cargo()
File "d:\mozilla-unified\python/mozbuild\mozbuild\vendor\vendor_rust.py", line 193, in _ensure_cargo
cargo = self.get_cargo_path()
File "d:\mozilla-unified\python/mozbuild\mozbuild\vendor\vendor_rust.py", line 76, in get_cargo_path
raise OSError(errno.ENOENT, "Could not find 'cargo' on your $PATH.")
Sentry is attempting to send 0 pending error messages
Waiting up to 2 seconds
Press Ctrl-Break to quit
| Assignee | ||
Comment 1•5 years ago
•
|
||
You need to have a build environment for mach vendor rust to work/to be able to find your configured CARGO. After you've configured/built (mach configure/mach build), do you still get the mach vendor rust error?
| Reporter | ||
Comment 2•5 years ago
|
||
(In reply to Ricky Stewart from comment #1)
You need to have a build environment for
mach vendor rustto work/to be able to find your configuredCARGO. After you've configured/built (mach configure/mach build), do you still get themach vendor rusterror?
Oh! Yes, that makes it work. I wish there was a clearer error message about that :-) But at least now I'm unblocked, thank you Ricky!
| Assignee | ||
Comment 3•5 years ago
|
||
Updated•5 years ago
|
Comment 5•5 years ago
|
||
| bugherder | ||
Description
•