Cargo.py target is empty on linux source code build

Description of the issue:
Build does not work on macos or linux from the source code.

npm run build
yields an error.

Steps to Reproduce (add as many as necessary): 1. 2. 3.
Follow instructions

and

Actual Result (gifs and screenshots are welcome!):

ninja -C /home/richard/brave/brave-browser/src/out/linux_Component_x86 brave -k 1
ninja: Entering directory /home/richard/brave/brave-browser/src/out/linux_Component_x86' [28/55726] ACTION //brave/build/rust:rust_lib_cargo_build(//build/toolchain/linux:clang_x86) FAILED: brave_rust/out/x86/release/libbrave_rust.a python3 ../../brave/script/cargo.py --rustup_path=../../brave/build/rustup/ --cargo_path=../../brave/build/rustup/ --manifest_path=../../brave/build/rust/Cargo.toml --build_path=brave_rust/out/x86 --target= --toolchain= --is_debug=false --rust_flags= error: target was empty None Traceback (most recent call last): File "../../brave/script/cargo.py", line 101, in <module> sys.exit(main()) File "../../brave/script/cargo.py", line 95, in main build(parse_args()) File "../../brave/script/cargo.py", line 70, in build raise e File "../../brave/script/cargo.py", line 67, in build subprocess.check_call(cargo_args, env=env) File "/home/richard/.linuxbrew/Cellar/[email protected]/3.8.6/lib/python3.8/subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cargo', 'build', '--release', '--manifest-path=../../brave/build/rust/Cargo.toml', '--target-dir=brave_rust/out/x86', '--target=']' returned non-zero exit status 101. [61/55726] CXX clang_x64/obj/third_party/abseil-cpp/absl/strings/cord/cord.o ninja: build stopped: subcommand failed. null null npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] build: node ./build/commands/scripts/commands.js build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/richard/.npm/_logs/2021-08-11T04_53_47_619Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: npm --prefix src/brave run build --
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/richard/.npm/_logs/2021-08-11T04_53_47_640Z-debug.log
Expected result:

Build succeeds and I can use a source geneated version of brave browser.

Reproduces how often:
100% of the teime
Operating System and Brave Version(See the About Brave page in the main menu):
latest version of brave
from source code
OS is Ubuntu_Focal
Additional Information:

We are evaluating if we can use brave browser for our project, and this is my preferred browser.
But we need to be able to build from the source.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.