Skip to content

Building scripting now uses depot tools from $PATH env variable #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 15, 2014
Merged

Conversation

wouldgo
Copy link
Contributor

@wouldgo wouldgo commented Feb 12, 2014

Hi,

as I stated in #72 here is the fix on the python issue.

I'm open to review my work.

wouldgo and others added 6 commits February 11, 2014 23:33
…b/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/depot_tools:/usr/local/apache-maven/bin env-varible, resolving "File node-webrtc/tools/depot_tools/gclient.py, line 1926, in <module>" issue. Plus put options to sync following as reported https://code.google.com/p/webrtc/issues/detail?id=2790
…b/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/depot_tools:/usr/local/apache-maven/bin env-varible, resolving "File node-webrtc/tools/depot_tools/gclient.py, line 1926, in <module>" issue. Plus put options to sync following as reported https://code.google.com/p/webrtc/issues/detail?id=2790
@piranna
Copy link
Contributor

piranna commented Feb 12, 2014

i downloaded your code and after executing it, it passed the point of previous tries and started to compile things. Also, it downloaded a lot of useless resources (WebRTC logo? Wav files? WTF?!?!) but at one point I got

Hook 'download_from_google_storage --directory --recursive --num_threads=10 --no_auth --bucket chromium-webrtc-resources trunk/resources' took 98.86 secs

________ running '/usr/bin/python trunk/webrtc/build/gyp_webrtc -Dextra_gyp_flag=0' in '/home/piranna/Dropbox/Proyectos/node-webrtc/third_party/libwebrtc'
Error: Command /usr/bin/python trunk/webrtc/build/gyp_webrtc -Dextra_gyp_flag=0 returned non-zero exit status 1 in /home/piranna/Dropbox/Proyectos/node-webrtc/third_party/libwebrtc
ERROR at //build/config/linux/pkg_config.gni:31:17: Script returned non-zero exit code.
    pkgresult = exec_script("//build/config/linux/pkg-config.py",
                ^----------
Current dir: /home/piranna/Dropbox/Proyectos/node-webrtc/third_party/libwebrtc/trunk/out/gn_build.Release/
Command: python /home/piranna/Dropbox/Proyectos/node-webrtc/third_party/libwebrtc/trunk/build/config/linux/pkg-config.py libudev
Returned 1 and printed out:

Could not run pkg-config.

Generating gyp files from GN...

gclient sync -D --force --verbose -j1 finished
For gclient sync -D --force --verbose -j1 something went wrong: error code 2, signal null.
    Try to run build script with --verbose option to find the possible problem.

After executing the command myself by hand (luckily it now it's shown! :-) ) it told me

[piranna@Latitude:~/Dropbox/Proyectos/node-webrtc/third_party/libwebrtc/trunk/out/gn_build.Release]
 > python /home/piranna/Dropbox/Proyectos/node-webrtc/third_party/libwebrtc/trunk/build/config/linux/pkg-config.py libudev
Package libudev was not found in the pkg-config search path.
Perhaps you should add the directory containing `libudev.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libudev' found
Could not run pkg-config.

After searching on internet, it seems I was missing the libudev-dev package, now the command says

[piranna@Latitude:~/Dropbox/Proyectos/node-webrtc/third_party/libwebrtc/trunk/out/gn_build.Release]
 > python /home/piranna/Dropbox/Proyectos/node-webrtc/third_party/libwebrtc/trunk/build/config/linux/pkg-config.py libudev
[[], [], ["udev"], [], []]

After that I relaunched the command (without removing the files from the previous one) and got similar messages, fixed installing packages libdrm, libgconf2-dev, libgcrypt11-dev, libpci-dev and libxtst-dev... one by one #pleaseKillMe

After installing all of them it started to compile everything, and due to the time it wasted I believe it calculated the last digit of Pi too, but finally it finished to compile and the tests passed successfully.

The next time I'll invoke to Cthulhu, it will be easier.

The great news are, finally I got to exec one of the tests of WebP2P.io, my WebRTC handshake library, on Node.js:

[piranna@Latitude:~/Dropbox/Proyectos/WebP2P.io]
 > node test/1peer.js 

1 peer
  ✔ No options
  ✔ Connect to PubNub

Tests completed in 1982 milliseconds.
3 tests of 3 passed.

Dude, I own you a 🍺 ;-)

@modeswitch
Copy link

Hrm, those prereqs aren't listed here http://www.webrtc.org/reference/getting-started/prerequisite-sw. The build script should do a check for those before anything is downloaded.

@piranna
Copy link
Contributor

piranna commented Feb 12, 2014

The info you've pointed is totally outdated. For example, since several
months ago the recomended way to build it is with gyp, not with the shell
script. This dependencies were not required some weeks ago, that's why it's
more annoying... :-/

Send from my Samsung Galaxy Note II
El 12/02/2014 22:15, "Alan K" [email protected] escribió:

Hrm, those prereqs aren't listed here
http://www.webrtc.org/reference/getting-started/prerequisite-sw. The
build script should do a check for those before anything is downloaded.

Reply to this email directly or view it on GitHubhttps://github.com//pull/75#issuecomment-34918610
.

@modeswitch
Copy link

OK, well my comment about checking during the build process before we start downloading stuff is still relevant. Also, I'm not sure how to get rid of those extraneous files (images, etc) but that would be nice also.

@modeswitch modeswitch added this to the 0.1 milestone Feb 14, 2014
@@ -14,10 +14,11 @@
, LIB_WEBRTC_DIR = LIB_DIR + '/libwebrtc'
, TOOLS_DIR = PROJECT_DIR + '/tools'
, TOOLS_DEPOT_TOOLS_DIR = TOOLS_DIR + '/depot_tools'
, GCLIENT = TOOLS_DEPOT_TOOLS_DIR + '/gclient'
, GCLIENT = 'gclient'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the script has downloaded depot_tools, will this command find it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, the key fact is that for the build execution environment I append the folder

@piranna
Copy link
Contributor

piranna commented Feb 15, 2014

Yes: look that TOOLS_DEPOT_TOOLS_DIR is being added to the path... In fact, I believe this is the reason why now it works, since now all the depot tools are on the path and can be found (but this doesn't means I doesn't believe this feels hacky, but if it's a gclient issue and there's no other solution...).

modeswitch pushed a commit that referenced this pull request Feb 15, 2014
Building scripting now uses depot tools from $PATH env variable
@modeswitch modeswitch merged commit 53a2ebc into node-webrtc:develop Feb 15, 2014
@ghost
Copy link

ghost commented Feb 15, 2014

@piranna @modeswitch Thanks for the work on this

FYI my final list of deps on Ubuntu 13.10 was :

libdrm-dev
libgconf2-dev
libgcrypt11-dev
libpci-dev
libxtst-dev
g++ (>= 4.2)
python (>= 2.4)
libnss3-dev >= 3.12
libasound2-dev
libpulse-dev
libjpeg62-dev
libxv-dev
libgtk2.0-dev
libexpat1-dev

N.B libdrm-dev not libdrm

@piranna
Copy link
Contributor

piranna commented Feb 15, 2014

You are welcome :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants