Juan Garcia
Juan Garcia

Reputation: 855

gclient sync failed when downloading chromium

I'm doing gclient sync in linux and windows and in both I'm getting the same error after around 15 min.

Traceback (most recent call last):
  File "/home/jgd/dev/depot_tools/gclient.py", line 2295, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/home/jgd/dev/depot_tools/gclient.py", line 2281, in main
    return dispatcher.execute(OptionParser(), argv)
  File "/home/jgd/dev/depot_tools/subcommand.py", line 252, in execute
    return command(parser, args[1:])
  File "/home/jgd/dev/depot_tools/gclient.py", line 2030, in CMDsync
    ret = client.RunOnDeps('update', args)
  File "/home/jgd/dev/depot_tools/gclient.py", line 1340, in RunOnDeps
    work_queue.flush(revision_overrides, command, args, options=self._options)
  File "/home/jgd/dev/depot_tools/gclient_utils.py", line 1047, in run
    self.item.run(*self.args, **self.kwargs)
  File "/home/jgd/dev/depot_tools/gclient.py", line 766, in run
    self.ParseDepsFile()
  File "/home/jgd/dev/depot_tools/gclient.py", line 562, in ParseDepsFile
    gclient_eval.Check(deps_content, filepath, global_scope, local_scope)
  File "/home/jgd/dev/depot_tools/gclient_eval.py", line 240, in Check
    result_scope = _gclient_exec(content, global_scope, filename=path)
  File "/home/jgd/dev/depot_tools/gclient_eval.py", line 185, in _gclient_exec
    _visit_in_module(stmt)
  File "/home/jgd/dev/depot_tools/gclient_eval.py", line 169, in _visit_in_module
    value = _gclient_eval(node.value, global_scope, filename=filename)
  File "/home/jgd/dev/depot_tools/gclient_eval.py", line 146, in _gclient_eval
    return _convert(node_or_string)
  File "/home/jgd/dev/depot_tools/gclient_eval.py", line 145, in _convert
    getattr(node, 'lineno', '<unknown>')))
ValueError: unexpected AST node: <_ast.Num object at 0x1cf5d10> Num(n=1) (file '/home/jgd/dev/jgd/webrtc/src/chromium/src/buildtools/DEPS', line 1)
Error: Command '/usr/bin/python -u src/sync_chromium.py --target-revision 316b880c55452eb694a27ba4d1aa9e74ec9ef342' returned non-zero exit status 1 in /home/jgd/dev/jgd/webrtc

Both are fresh installed and I have no idea about what is happening, it is the first time that this occurs to me. Know anyone how to solve it?

EDIT: The DEPS file that appears in error trace is the following:

recursion = 1
use_relative_paths = True

vars = {
  "git_url": "https://chromium.googlesource.com",

  "clang_format_rev": "0ed791d1387a3c9146ea6c453c646f3c0fc97784",   # r282136
  "libcxx_revision": "b1ece9c037d879843b0b0f5a2802e1e9d443b75a",    # r256621
  "libcxxabi_revision": "0edb61e2e581758fc4cd4cd09fc588b3fc91a653", # r256323
}

deps = {
  "clang_format/script":
      Var("git_url") + "/chromium/llvm-project/cfe/tools/clang-format.git@" +
      Var("clang_format_rev"),
  "third_party/libc++/trunk":
      Var("git_url") + "/chromium/llvm-project/libcxx.git" + "@" +
      Var("libcxx_revision"),
  "third_party/libc++abi/trunk":
      Var("git_url") + "/chromium/llvm-project/libcxxabi.git" + "@" +
      Var("libcxxabi_revision"),
}

AFAIK this is auto-generated.

Upvotes: 1

Views: 2758

Answers (2)

Juan Garcia
Juan Garcia

Reputation: 855

The issue here is the version of Python used. As you can see in command error prompt, the version that I have used is not 2.7+ as recomended in chromium website. Doing the change from Python to Python2.7 solve the issue.

Upvotes: 1

kjellander
kjellander

Reputation: 156

sync_chromium.py was removed back in December, replaced by a more efficient and far smaller download package. I suggest you follow the instructions at https://webrtc.org/native-code/development and get a newer checkout. It should be less likely to have download problems.

Upvotes: 2

Related Questions