vsimon / webrtcbuilds

Getting started with WebRTC natively is no easy picnic. The goal of webrtcbuilds is to provide a single standalone WebRTC static library and package.
BSD 3-Clause "New" or "Revised" License
202 stars 164 forks source link

fatal: The remote end hung up unexpectedly #76

Closed o3661606 closed 6 years ago

o3661606 commented 6 years ago

$ ./build.sh -b branch-heads/60 -t android -c arm64

Host OS: mac Target OS: android Target CPU: arm64 Checking webrtcbuilds dependencies Checking depot-tools Building branch: branch-heads/60 Building revision: 6294a7eb71c891e9ea41273a7a94113f6802d0da Associated revision number: 18252 Checking out WebRTC revision (this will take awhile): 6294a7eb71c891e9ea41273a7a94113f6802d0da Running: gclient root Running: gclient config --spec 'solutions = [ { "url": "https://webrtc.googlesource.com/src.git", "managed": False, "name": "src", "deps_file": "DEPS", "custom_deps": {}, }, ] target_os = ["android", "unix"] ' Running: gclient sync --nohooks --with_branch_heads

src/examples/androidtests/third_party/gradle (ERROR)

[0:00:22] Started. [0:00:22]

____ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/external/github.com/gradle/gradle.git /Users/danny/Downloads/webrtcbuilds-master/out/src/examples/androidtests/third_party/_gclient_gradle_nKx125' in '/Users/danny/Downloads/webrtcbuilds-master/out' [0:00:22] Cloning into '/Users/danny/Downloads/webrtcbuilds-master/out/src/examples/androidtests/third_party/_gclient_gradle_nKx125'... [0:00:23] fatal: remote error: want e6b08dfae6525b5a8d069ac48c52b08d86aa47d2 not valid [0:00:23] fatal: The remote end hung up unexpectedly

____ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/external/github.com/gradle/gradle.git /Users/danny/Downloads/webrtcbuilds-master/out/src/examples/androidtests/third_party/_gclient_gradle_nKx125' in '/Users/danny/Downloads/webrtcbuilds-master/out' [0:00:23] Cloning into '/Users/danny/Downloads/webrtcbuilds-master/out/src/examples/androidtests/third_party/_gclient_gradle_nKx125'... [0:00:24] fatal: remote error: want e6b08dfae6525b5a8d069ac48c52b08d86aa47d2 not valid [0:00:24] fatal: The remote end hung up unexpectedly

____ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/external/github.com/gradle/gradle.git /Users/danny/Downloads/webrtcbuilds-master/out/src/examples/androidtests/third_party/_gclient_gradle_nKx125' in '/Users/danny/Downloads/webrtcbuilds-master/out' [0:00:25] Cloning into '/Users/danny/Downloads/webrtcbuilds-master/out/src/examples/androidtests/third_party/_gclient_gradle_nKx125'... [0:00:26] fatal: remote error: want e6b08dfae6525b5a8d069ac48c52b08d86aa47d2 not valid [0:00:26] fatal: The remote end hung up unexpectedly

____ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/external/github.com/gradle/gradle.git /Users/danny/Downloads/webrtcbuilds-master/out/src/examples/androidtests/third_party/_gclient_gradle_nKx125' in '/Users/danny/Downloads/webrtcbuilds-master/out' [0:00:28] Cloning into '/Users/danny/Downloads/webrtcbuilds-master/out/src/examples/androidtests/third_party/_gclient_gradle_nKx125'... [0:00:28] fatal: remote error: want e6b08dfae6525b5a8d069ac48c52b08d86aa47d2 not valid [0:00:28] fatal: The remote end hung up unexpectedly Traceback (most recent call last): File "/Users/danny/Downloads/webrtcbuilds-master/depot_tools/gclient_scm.py", line 899, in _Clone self._Run(clone_cmd, options, cwd=self._root_dir, retry=True) File "/Users/danny/Downloads/webrtcbuilds-master/depot_tools/gclient_scm.py", line 1203, in _Run gclient_utils.CheckCallAndFilterAndHeader(cmd, env=env, kwargs) File "/Users/danny/Downloads/webrtcbuilds-master/depot_tools/gclient_utils.py", line 314, in CheckCallAndFilterAndHeader return CheckCallAndFilter(args, kwargs) File "/Users/danny/Downloads/webrtcbuilds-master/depot_tools/gclient_utils.py", line 560, in CheckCallAndFilter rv, args, kwargs.get('cwd', None), None, None) CalledProcessError: Command 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/external/github.com/gradle/gradle.git /Users/danny/Downloads/webrtcbuilds-master/out/src/examples/androidtests/third_party/_gclient_gradle_nKx125' returned non-zero exit status 128 in /Users/danny/Downloads/webrtcbuilds-master/out

Traceback (most recent call last): File "/Users/danny/Downloads/webrtcbuilds-master/depot_tools/gclient.py", line 2836, in sys.exit(main(sys.argv[1:])) File "/Users/danny/Downloads/webrtcbuilds-master/depot_tools/gclient.py", line 2822, in main return dispatcher.execute(OptionParser(), argv) File "/Users/danny/Downloads/webrtcbuilds-master/depot_tools/subcommand.py", line 252, in execute return command(parser, args[1:]) File "/Users/danny/Downloads/webrtcbuilds-master/depot_tools/gclient.py", line 2577, in CMDsync ret = client.RunOnDeps('update', args) File "/Users/danny/Downloads/webrtcbuilds-master/depot_tools/gclient.py", line 1578, in RunOnDeps work_queue.flush(revision_overrides, command, args, options=self._options) File "/Users/danny/Downloads/webrtcbuilds-master/depot_tools/gclient_utils.py", line 1059, in run self.item.run(*self.args, *self.kwargs) File "/Users/danny/Downloads/webrtcbuilds-master/depot_tools/gclient.py", line 932, in run file_list) File "/Users/danny/Downloads/webrtcbuilds-master/depot_tools/gclient_scm.py", line 129, in RunCommand return getattr(self, command)(options, args, file_list) File "/Users/danny/Downloads/webrtcbuilds-master/depot_tools/gclient_scm.py", line 419, in update self._Clone(revision, url, options) File "/Users/danny/Downloads/webrtcbuilds-master/depot_tools/gclient_scm.py", line 907, in _Clone if os.listdir(tmp_dir): OSError: [Errno 2] No such file or directory: '/Users/danny/Downloads/webrtcbuilds-master/out/src/examples/androidtests/third_party/_gclient_gradle_nKx125' Traceback (most recent call last): File "/Users/danny/Downloads/webrtcbuilds-master/depot_tools/fetch.py", line 301, in sys.exit(main()) File "/Users/danny/Downloads/webrtcbuilds-master/depot_tools/fetch.py", line 296, in main return run(options, spec, root) File "/Users/danny/Downloads/webrtcbuilds-master/depot_tools/fetch.py", line 290, in run return checkout.init() File "/Users/danny/Downloads/webrtcbuilds-master/depot_tools/fetch.py", line 133, in init self.run_gclient(sync_cmd) File "/Users/danny/Downloads/webrtcbuilds-master/depot_tools/fetch.py", line 78, in run_gclient return self.run(cmd_prefix + cmd, kwargs) File "/Users/danny/Downloads/webrtcbuilds-master/depot_tools/fetch.py", line 68, in run return subprocess.check_output(cmd, kwargs) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 573, in check_output raise CalledProcessError(retcode, cmd, output=output) subprocess.CalledProcessError: Command '('gclient', 'sync', '--nohooks', '--with_branch_heads')' returned non-zero exit status 1

vsimon commented 6 years ago

Thanks, I'll take a look.

o3661606 commented 6 years ago

FYI, just tested to use the official way as documented in webrtc.org, same issue happens. Probably this is not the problem of your script. However, can you still take a look to see how to 'bypass' this error temporarily?

vsimon commented 6 years ago

Thanks. The error output feels network-related to me, barring any server-side git or network issues which are always possible, are there any client-side global git configurations set like for options prefixed 'http.*' found by looking at git config --global -l?

While looking at this, I now see one of the first things mentioned in the official documentation is that cross-compiling for android is only supported on Linux (link). I tried it on macOS and couldn't make progress after getting errors like lsb_release: command not found, lsb_release being a linux command.

I spun up an ubuntu 16.04 virtualbox VM and tried the ./build.sh -b branch-heads/60 -t android -c arm64 command there and apart from having to type 'y' to agree to an Android Software Development Kit License, the build continued towards completion. Unfortunately, I'm not too familiar with android development to validate things on an android emulator or device, but I would suggest going with a VM route if you are on a Mac.

I might also codify this 'building android only on Linux instruction' in a future commit for non-linux platforms accordingly.

o3661606 commented 6 years ago

I tried on Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-87-generic x86_64) VM. and run with su sudo ./build.sh -b branch-heads/60 -t android -c arm64

I still got the same error, but when i switch to branch-heads/59, it works fine. So i will close this issue.

FYI, my git config user@ubuntu:~$ git config --global -l filter.lfs.smudge=git-lfs smudge -- %f filter.lfs.process=git-lfs filter-process filter.lfs.required=true filter.lfs.clean=git-lfs clean -- %f