Error while building Chromium (Windows)

281 views
Skip to first unread message

Poster Rubin

unread,
May 4, 2021, 3:26:43 AM5/4/21
to Chromium-discuss
Hello everyone, I've just got full chromium source code following the instructions here "https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md" and configured the Visual Studio environment and tried to buiid the "base" target. But I have encountered a problem while executing `autoninja -C out\Default base`.

The error message is 

ninja: Entering directory `out\Default'
[3/957] LINK nasm.exe nasm.exe.pdb
FAILED: nasm.exe nasm.exe.pdb
ninja -t msvc -e environment.x64 -- ..\..\third_party\llvm-build\Release+Asserts\bin\lld-link.exe /OUT:./nasm.exe /nologo -libpath:..\..\third_party\llvm-build\Release+Asserts\lib\clang\13.0.0\lib\windows "-libpath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\ATLMFC\lib\x64" "-libpath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\lib\x64" "-libpath:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "-libpath:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64" "-libpath:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64" "-libpath:C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\um\x64"  /PDB:./nasm.exe.pdb @./nasm.exe.rsp
lld-link: error: unable to find mt.exe in PATH: no such file or directory
[4/957] LIB obj/third_party/protobuf/protobuf_full.lib
ninja: build stopped: subcommand failed.

The output error message seems to show that the program mt.exe is not in my PATH environment variable, but I have already added the container directory of "mt.exe" ("C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64") to my PATH, and the problem still exists.

Can anyone give me some help on this? Thank you very much.

Fumitoshi Ukai (鵜飼文敏)

unread,
May 6, 2021, 8:42:03 PM5/6/21
to rubin...@gmail.com, Chromium-discuss


2021年5月4日(火) 16:26 Poster Rubin <rubin...@gmail.com>:
Did you rerun `gn gen` ?
gn stores environment variables into environment.x64 file, and `ninja -t msvc -e environement.x64` sets environment variables by using the environment.x64 file when invoking the command (lld-link.exe in this case).
 

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

Poster Rubin

unread,
May 28, 2021, 8:41:15 PM5/28/21
to Fumitoshi Ukai (鵜飼文敏), Chromium-discuss
It worked. 

Thank you for your help, now I can use autonijia to build the chromium from source code, good!

Fumitoshi Ukai (鵜飼文敏) <uk...@chromium.org> 于2021年5月7日周五 上午8:41写道:
Reply all
Reply to author
Forward
0 new messages