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 163 forks source link

src/setup_links.py --force #60

Closed HefnySco closed 7 years ago

HefnySco commented 7 years ago

I downloaded latest version of webrtcbuilds and ran the following :

build.sh -b 50 -t linux

________ running '/usr/bin/python src/setup_links.py' in '/mnt/vdb/webrtcbuilds/out'
Dangerous actions:
Planning to remove file: third_party/BUILD.gn
Planning to remove directory: testing
Planning to remove directory: third_party/binutils
Planning to remove directory: third_party/boringssl
Planning to remove directory: third_party/colorama
Planning to remove directory: third_party/drmemory
Planning to remove directory: third_party/expat
Planning to remove directory: third_party/ffmpeg
Planning to remove directory: third_party/instrumented_libraries
Planning to remove directory: third_party/jsoncpp
Planning to remove directory: third_party/libjpeg
Planning to remove directory: third_party/libjpeg_turbo
Planning to remove directory: third_party/libsrtp
Planning to remove directory: third_party/libudev
Planning to remove directory: third_party/libyuv
Planning to remove directory: third_party/lss
Planning to remove directory: third_party/ocmock
Planning to remove directory: third_party/openh264
Planning to remove directory: third_party/openmax_dl
Planning to remove directory: third_party/opus
Planning to remove directory: third_party/proguard
Planning to remove directory: third_party/protobuf
Planning to remove directory: third_party/sqlite
Planning to remove directory: third_party/usrsctp
Planning to remove directory: third_party/yasm
Planning to remove directory: third_party/zlib
Planning to remove directory: tools/clang
Planning to remove directory: tools/generate_library_loader
Planning to remove directory: tools/generate_stubs
Planning to remove directory: tools/gn
Planning to remove directory: tools/gyp
Planning to remove directory: tools/mb
Planning to remove directory: tools/memory
Planning to remove directory: tools/protoc_wrapper
Planning to remove directory: tools/python
Planning to remove directory: tools/swarming_client
Planning to remove directory: tools/valgrind
Planning to remove directory: tools/vim
Planning to remove directory: tools/win
Planning to remove directory: tools/xdisplaycheck
Planning to remove directory: build
Planning to remove directory: buildtools
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                      A C T I O N     R E Q I R E D
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Because chromium/src is transitioning to Git (from SVN), we needed to
change the way that the WebRTC standalone checkout works. Instead of
individually syncing subdirectories of Chromium in SVN, we're now
syncing Chromium (and all of its DEPS, as defined by its own DEPS file),
into the `chromium/src` directory.

As such, all Chromium directories which are currently pulled by DEPS are
now replaced with a symlink into the full Chromium checkout.

To avoid disrupting developers, we've chosen to not delete your
directories forcibly, in case you have some work in progress in one of
them :).

ACTION REQUIRED:
Before running `gclient sync|runhooks` again, you must run:
src/setup_links.py --force

Which will replace all directories which now must be symlinks, after
prompting with a summary of the work-to-be-done.

Error: Command '/usr/bin/python src/setup_links.py' returned non-zero exit status 1 in /mnt/vdb/webrtcbuilds/out
vsimon commented 7 years ago

Thanks, I'll try to repro for this...

running ./build.sh -b 50 -t linux with:

one other thing comes to mind is depot_tools, what is that revision?

cd depot_tools
git log -1 --oneline
HefnySco commented 7 years ago
cd depot_tools
git log -1 --oneline
9e8fb0e Add --cache-dir argument to gclient.
vsimon commented 7 years ago

Repro'ed and added doing the action required (setup_links), please reopen if there's still an issue with this.

HefnySco commented 7 years ago

Thank you for your effort. It passed. Now I have this:

_``` ___ running '/usr/bin/python src/webrtc/build/gyp_webrtc -Dextra_gyp_flag=0' in '/mnt/vdb/webrtcbuilds/out' Updating projects from gyp files... Hook '/usr/bin/python src/webrtc/build/gyp_webrtc -Dextra_gyp_flag=0' took 11.90 secs Checking WebRTC dependencies ERROR: Only Ubuntu 12.04 (precise), 14.04 (trusty), 14.10 (utopic), 15.04 (vivid) and 15.10 (wily) /mnt/vdb/webrtcbuilds/out/src/build/install-build-deps.sh: line 80: are currently supported: command not found



my original command is: 
`. build.sh -b 50 -t linux -c arm64
`
vsimon commented 7 years ago

From the error it looks like from the time that the branch 50 was cut, ~2016, certain ubuntu distributions existed and WebRTC internally may be checking for those distributions.

ERROR: Only Ubuntu 12.04 (precise), 14.04 (trusty), 14.10 (utopic), 15.04 (vivid) and 15.10 (wily) are currently supported

Do you happen to be using xenial (16.04)?

HefnySco commented 7 years ago

I downgraded the machine to ubuntu 14.04. I compiled many linux on x64 with no problems at all. still the arm64 . build.sh -b 50 -t linux -c arm64

No missing packages, and the packages are up-to-date.

Skipping installation of Chrome OS fonts.
Skipping symbolic links for NaCl.
Patching WebRTC source
Compiling WebRTC
ERROR at //build/config/nacl/config.gni:42:58: Undefined identifier
      "${nacl_toolchain_dir}/${nacl_toolchain_package}/${_nacl_tuple}"
                                                         ^----------

kindly advise.

vsimon commented 7 years ago

I did a little digging, it appears like this bug https://bugs.chromium.org/p/chromium/issues/detail?id=568883, but it also appears from the timestamps that it was fixed before branch 50 was made.

I also tried building with linux/arm64 with latest with:

./build.sh -t linux -c arm64 # build script errors and tells to install the following script
out/src/build/linux/sysroot_scripts/install-sysroot.py --arch=arm64
./build.sh -t linux -c arm64 # continue the build

and that seemed to work. So at this point, I'm still not sure exactly why latest works and branch 50 doesn't but I'm open to ideas.

HefnySco commented 7 years ago

https://cs.chromium.org/chromium/src/build/install-build-deps.sh
./build/install-build-deps.sh  --no-chromeos-fonts 

$ git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
$ export PATH=`pwd`/depot_tools:"$PATH"

export GYP_DEFINES="target_arch=x64 host_arch=x64 build_with_chromium=0 use_openssl=0 use_gtk=0 use_x11=0 include_examples=0 include_tests=1 fastbuild=1 remove_webcore_debug_symbols=1 include_pulse_audio=0 include_internal_video_render=0 clang=1 "

mkdir webrtc-checkout
cd webrtc-checkout

gclient config https://chromium.googlesource.com/external/webrtc.git@branch-heads/50 --name=src
gclient sync --force --with_branch_heads 
gclient sync --force --with_branch_heads --nohooks 

cd src

git checkout branch-heads/50

gclient runhooks 

ninja -C ./out/Release 

These are the exact steps that build branch 50 with no problems at all.

vsimon commented 7 years ago

Thanks for the steps. I see branch 50 builds with target_arch=x64 with no problems at all. I notice this didn't set the target arch to arm64 which is what the -c arm64 argument would do. I wasn't able to build further with these steps with target_arch=arm64 set in the GYP_DEFINES export, have you?

Like:

export GYP_DEFINES="target_arch=arm64 host_arch=x64 build_with_chromium=0 use_openssl=0 use_gtk=0 use_x11=0 include_examples=0 include_tests=1 fastbuild=1 remove_webcore_debug_symbols=1 include_pulse_audio=0 include_internal_video_render=0 clang=1 "
HefnySco commented 7 years ago

When I run

. build.sh -b 50 -t linux 

I got

ERROR: Only Ubuntu 12.04 (precise), 14.04 (trusty),  14.10 (utopic), 15.04 (vivid) and 15.10 (wily) 
/mnt/disks/webrtcbuilds/out/src/build/install-build-deps.sh: line 80: are currently supported: command not found

I was never able to build branch 50 using build.sh :(