2

Steps I followed for build of webRTC in UBUNTU env.

Check out the code:

 gclient config https://webrtc.googlecode.com/svn/trunk
 echo "target_os = ['android', 'unix']" >> .gclient
 gclient sync --nohooks

Generate ninja makefiles:

cd trunk

 $./build/install-build-deps-android.sh
 $. build/android/envsetup.sh
 Defaulting GYP_GENERATORS to ninja

 $gclient runhooks
 $android_gyp

result of android_gyp:

GYP_GENERATORS set to 'ninja'
Updating projects from gyp files...
gyp: /home/user/webRTC/trunk/chrome/chrome_resources.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/tools/android/findbugs_plugin/findbugs_plugin.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/sql/sql.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/tools/android/android_tools.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/sync/sync.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/sandbox/sandbox.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/net/net.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/media/media.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/ipc/ipc.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/gpu/gpu.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/components/components_tests.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/base/base.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/breakpad/breakpad.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/base/android/jni_generator/jni_generator.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/third_party/cacheinvalidation/cacheinvalidation.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/remoting/remoting.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/chrome/chrome.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/android_webview/android_webview.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/mojo/mojo.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/content/content_shell_and_tests.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/ui/ui_unittests.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/webkit/renderer/compositor_bindings/compositor_bindings_tests.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/cc/cc_tests.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/third_party/WebKit/public/all.gyp not found (cwd: /home/user/webRTC/trunk)

Build and Install Demo app:

$ ninja -C out/Debug video_demo_apk
ninja: Entering directory 'out/Debug'
ninja: error: unknown target 'AppRTCDemo'

please let me know if I've donw any steps wrong. I think android_gyp is giving problem, but donno.

Note: I'm using Ubuntu(VMware) on my windows OS

No_Rulz
  • 2,679
  • 1
  • 20
  • 33
parul
  • 363
  • 1
  • 6
  • 16

2 Answers2

6

here are my notes for building the AppRTCDemo on Ubuntu 12.04.4, obviously your directories may be slightly different.

## building webrtc

# install dependencies:
sudo apt-get install git git-svn subversion g++ python libnss3-dev libasound2-dev libpulse-dev libjpeg62-dev libxv-dev libgtk2.0-dev libexpat1-dev lib32asound2-dev ia32-libs

# create a working directory:
mkdir -p ~/git/working

cd ~/git/working

# get the depottools:
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

# Add depot_tools to your PATH:
echo "PATH=\$PATH:$HOME/git/working/depot_tools" >> ~/.bash_aliases
echo "export PATH" >> ~/.bash_aliases
. ~/.bash_aliases

# get the WebRTC source:
gclient config http://webrtc.googlecode.com/svn/trunk

# configure for android:
echo "target_os = ['android', 'unix']" >> .gclient

# synchronize:
gclient sync --nohooks

# set up env variables:
source ~/git/working/trunk/build/android/envsetup.sh

# install new dependencies:
sudo ~/git/working/trunk/build/./install-build-deps-android.sh
sudo ~/git/working/trunk/build/./install-build-deps.sh

# Set up webrtc-related GYP variables:
export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 libjingle_java=1 $GYP_DEFINES"

# generate the build scripts:
gclient runhooks

# install find_depot_tools dummy file:
wget -O ~/git/working/trunk/build/find_depot_tools.py http://webrtc.googlecode.com/svn/trunk/webrtc/build/find_depot_tools.py

# build the Debug version of the AppRTCDemo:
ninja -C out/Debug AppRTCDemo
Andy Ericksen
  • 121
  • 1
  • 4
  • You have posted some 32-bit what are those packages for? If a user is Ubuntu 64-bit user should he be installing the same package? if not please comment it there. –  May 05 '14 at 16:44
  • 1
    `2014-05-05 19:08:44 ERROR 404: Not Found.` - last line before ninja -C is failing the url file find_depot_tools.py is missing as a result its not working can you please update? –  May 05 '14 at 17:10
  • Used the file from here: https://github.com/adobe/chromium/blob/master/tools/find_depot_tools.py , and then again tried `ninja -C trunk/out/Debug AppRTCDemo` but still failing by saying : `ninja error: unknown target 'AppRTCDemo'` –  May 05 '14 at 17:15
  • 1
    Go to the trunk folder; run "webrtc/build/gyp_webrtc" before the ninja build command. And if AppRTCDemo is still unknown, just run "ninja -C out/Debug". – radium22 May 06 '14 at 17:59
  • The original find_depot_tools.py can be found here: https://code.google.com/p/webrtc/source/browse/trunk/webrtc/build/find_depot_tools.py?spec=svn5512&r=5512 The solution works well, thanks – eyal-lezmy May 14 '14 at 11:35
1

I got the same ninja: error: unknown target 'AppRTCDemo' error on Mac. To resolve this error, I had to specify a valid demo app. For iOS its AppRTCMobile instead of AppRTCDemo as stated in the docs.

ninja -C out/Debug-sim32 AppRTCMobile

The RTC Mobile demo exists in the gclient checkout: src/webrtc/examples/objc

https://chromium.googlesource.com/external/webrtc/+/master/webrtc/examples/objc/AppRTCMobile/

gtzilla
  • 1,265
  • 1
  • 16
  • 21