New issue
Advanced search Search tips

Issue 628961 link

Starred by 5 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

subprocess.CalledProcessError in landmines.py after "fetch chromium"

Project Member Reported by michae...@chromium.org, Jul 18 2016

Issue description

Following the depot_tools tutorial, `fetch chromium` ends with an error on my Windows 10 system.

Non-Googlers can avoid this by first setting DEPOT_TOOLS_WIN_TOOLCHAIN=0 as described in the Windows build instructions[1]. This is not obvious, since the first instruction in that doc is to check out Chromium. The error message should be more useful.

Googlers should run `download_from_google_storage --config` *after* running fetch, meaning they would run fetch, then encounter this error, then run gclient sync again. Again, the error message should be more useful, or there should be some command to run *before* fetch that would bypass the error altogether. (Running `download_from_google_storage --config` before `fetch` results in an error on my machine (The system cannot find the path specified) even though Python is installed.)

The output was:

D:\dev\projects\chromium\c>fetch chromium
Running: 'D:\dev\projects\chromium\depot_tools\python276_bin\python.exe' 'D:\dev\projects\chromium\depot_tools\gclient.py' root
Running: 'D:\dev\projects\chromium\depot_tools\python276_bin\python.exe' 'D:\dev\projects\chromium\depot_tools\gclient.py' config --spec 'solutions = [
  {
    "url": "https://chromium.googlesource.com/chromium/src.git",
    "managed": False,
    "name": "src",
    "deps_file": ".DEPS.git",
    "custom_deps": {},
  },
]
'
Running: 'D:\dev\projects\chromium\depot_tools\python276_bin\python.exe' 'D:\dev\projects\chromium\depot_tools\gclient.py' sync
Error: Command 'D:\\dev\\projects\\chromium\\depot_tools\\python276_bin\\python.exe src/build/landmines.py' returned non-zero exit status 1 in D:\dev\projects\chromium\c
Traceback (most recent call last):
  File "D:\dev\projects\chromium\depot_tools\\fetch.py", line 353, in <module>
    sys.exit(main())
  File "D:\dev\projects\chromium\depot_tools\\fetch.py", line 348, in main
    return run(options, spec, root)
  File "D:\dev\projects\chromium\depot_tools\\fetch.py", line 342, in run
    return checkout.init()
  File "D:\dev\projects\chromium\depot_tools\\fetch.py", line 142, in init
    self.run_gclient(*sync_cmd)
  File "D:\dev\projects\chromium\depot_tools\\fetch.py", line 76, in run_gclient
    return self.run(cmd_prefix + cmd, **kwargs)
  File "D:\dev\projects\chromium\depot_tools\\fetch.py", line 66, in run
    return subprocess.check_output(cmd, **kwargs)
  File "D:\dev\projects\chromium\depot_tools\python276_bin\lib\subprocess.py", line 573, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '('D:\\dev\\projects\\chromium\\depot_tools\\python276_bin\\python.exe', 'D:\\dev\\projects\\chromium\\depot_tools\\gclient.py', 'sync')' returned non-zero exit status 2


[1] https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md
 
Cc: aga...@chromium.org
Components: -Infra Infra>Client>Chrome Infra>SDK
Labels: Infra-DX
It does appear we could do a better job of an error message, here. 
Components: -Build
Cc: -aga...@chromium.org iannucci@chromium.org
+iannucci for landmines
Status: Available (was: Untriaged)
Cc: jonr...@chromium.org
Would it be possible to either have the error message updated, or to find an appropriate spot in the documentation to address this? (Such as https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up)

Without details on the error, a developer is stuck looking at the current notes. Then re-running fetch on an empty directory. This takes quite a while to sort out.


Cc: scottmg@chromium.org
This hits WebRTC users as well, as it's very easy to miss setting the environment variable. I think the user experience for such a thing is really bad (and environment variables are so 1990, they should never be used if possible).

What about moving to an implementation like the one for the new Mac toolchain?
It's looking for a Google-workstation specific directory on the machine instead: https://cs.chromium.org/chromium/src/build/mac/should_use_hermetic_xcode.py?rcl=0&l=13

I'm sure there must be a similar way to do that reliably on Windows? Even if it adds a little maintenance to keep this up to date, it's a huge benefit for the community out there.

If we can't, we should at least add a friendlier error message. See https://bugs.chromium.org/p/webrtc/issues/detail?id=6489 for an example of a lot time wasted trying to figure out what was wrong.
Cc: machenb...@chromium.org
 Issue 647557  has been merged into this issue.
The merged into bug was about this happening for V8 too.
Cc: -iannucci@chromium.org iannu...@google.com

Sign in to add a comment