Log compilation chromium under Windows, Memo

Source: Internet
Author: User

Compiled under Windows Chromium, time: 20170619,

Official address:https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md

I. System requirements:

1.64-bit machine, at least 8GB of memory, recommended 16GB or more. (I use the WIN10 64-bit virtual machine, memory according to 8G);

2. At least 100GB of hard disk storage space, formatted as NTFS. FAT32 does not support files larger than 4GB, while git downloads may have 20gb+ files;

3. Visual Studio Update 3;

4. win7+ (I compile with the Win10, there may be a hole here, described below);

Two. System configuration:

1. Install Visual Studio Update3 and install window SDK 14393, vs. three options to install Visual C + + including Mfc,universal Windows Apps Development tools > Tools (1.4.1) and Windows SDK (10.0.14393);

2.14393 of the SDK installation to install debugging Tools for Windows, I started the installation, I do not know why did not install this, fixed the next, only;

Three. Install Depot_tools:

1. Download depot_tools Bundle, then unzip, address: Https://storage.googleapis.com/chrome-infra/depot_tools.zip;

2. Place the Depot_tools at the beginning of the PATH environment variable, at least in front of your installed Python and git , because depot_tools will download python, if it's behind the python you installed, Some unexpected problems may occur;

3. Add the environment variable depot_tools_win_toolchainand set it to 0;

4. Open Cmd.exe, run Gclient, in the first run, Gclient will install the necessary components such as python/msysgit;

Four. Get the source code:

1. Open cmd, in the location where you want to place the source code, create the Chromium folder and enter,mkdir chromium && CD chromium;

2. fetch chromium;

PS: Here is a question, I use the WIN10 with the default Windows Defender is open, at this time after downloading the source code will appear:

  1. Traceback (most recent):
  2. File "D:\git\google\depot_tools\gclient_scm.py", line 965, in _clone
  3. Os.path.join (Self.checkout_path, '. Git '))
  4. File "D:\git\google\depot_tools\gclient_utils.py", line 158, in Safe_rename
  5. Os.rename (old, new)
  6. Windowserror: [Error 5]
  7. [0:22:25] _____ removing non-empty tmp dir D:\google\_gclient_src_byzfvs
  8. ----------------------------------------
  9. Traceback (most recent):
  10. File "D:\git\google\depot_tools\gclient.py", line 2378, in <module>
  11. Sys.exit (Main (sys.argv[1:]))
  12. File "D:\git\google\depot_tools\gclient.py", line 2364, in main
  13. Return Dispatcher.execute (Optionparser (), argv)
  14. File "D:\git\google\depot_tools\subcommand.py", line 252, in Execute
  15. Return command (parser, args[1:])
  16. File "D:\git\google\depot_tools\gclient.py", line 2117, in Cmdsync
  17. RET = client. Runondeps (' Update ', args)
  18. File "D:\git\google\depot_tools\gclient.py", line 1568, in Runondeps
  19. Work_queue.flush (revision_overrides, command, args, options=self._options)
  20. File "D:\git\google\depot_tools\gclient_utils.py", line 1112, in run
  21. Self.item.run (*self.args, **self.kwargs)
  22. File "D:\git\google\depot_tools\gclient.py", line 867, in run
  23. File_list)
  24. File "D:\git\google\depot_tools\gclient_scm.py", line 166, in RunCommand
  25. Return getattr (Self, command) (options, args, file_list)
  26. File "D:\git\google\depot_tools\gclient_scm.py", line +, in update
  27. Self._clone (revision, URL, options)
  28. File "D:\git\google\depot_tools\gclient_scm.py", line 965, in _clone
  29. Os.path.join (Self.checkout_path, '. Git '))
  30. File "D:\git\google\depot_tools\gclient_utils.py", line 158, in Safe_rename
  31. Os.rename (old, new)
  32. Windowserror: [Error 5]
  33. Traceback (most recent):
  34. File "D:\git\google\depot_tools\\fetch.py", line 353, in <module>
  35. Sys.exit (Main ())
  36. File "D:\git\google\depot_tools\\fetch.py", line 348, in main
  37. Return run (options, spec, root)
  38. File "D:\git\google\depot_tools\\fetch.py", line 342, in run
  39. Return Checkout.init ()
  40. File "D:\git\google\depot_tools\\fetch.py", line 142, in Init
  41. Self.run_gclient (*sync_cmd)
  42. File "D:\git\google\depot_tools\\fetch.py", line +, in Run_gclient
  43. Return Self.run (Cmd_prefix + cmd, **kwargs)
  44. File "D:\git\google\depot_tools\\fetch.py", line +, in run
  45. Return Subprocess.check_output (cmd, **kwargs)
  46. File "D:\git\google\depot_tools\python276_bin\lib\subprocess.py", line 573, in Check_output
  47. Raise Calledprocesserror (Retcode, cmd, output=output)
  48. Subprocess. Calledprocesserror:command ' (' D:\\git\\google\\depot_tools\\python276_bin\\python.exe ', ' D:\\git\\google\\depot_ tools\\gclient.py ', ' sync ', '--no-history ') ' returned Non-zero exit status 1

Such a problem, mainly to kill soft intercept caused by the deletion of files directory failure, disable the Windefender is good, other killing soft may have similar situation, please note that the reference https://bugs.chromium.org/p/chromium/ issues/detail?id=464132)

3. After the source code download succeeds, CD src, enter the SRC directory;

Five. Compile (the most anticipated time is up):

1. First Use the default compilation method, using the GN Gen Out/default, will create the Out/default directory in the SRC directory, and configure the files required for compiling;

2. Compile chrome with the ninja-c out\default Chrome command line, and you'll need to wait a long time;

PS: At the time of compiling with ninja, I showed up here.

ninja:entering directory ' Out/default '
Ninja:error: '. /.. /native_client/toolchain/mac_x86/pnacl_newlib/bin/x86_64-nacl-objcopy ', needed by ' irt_x64/obj/ppapi/native_ Client/nacl_irt_debuglink.inputdeps.stamp ', missing and no known rule to make it

This similar error, in the SRC directory using cmd to perform gclient sync, successfully resolved, refer to Https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/tQGuR7Ur0i8;

3. Compile and run the Chrome.exe under Default.

Log compilation chromium under Windows, Memo

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.