Building webrtc for Mac Yosemite

531 views
Skip to first unread message

Ignacio Avellino

unread,
Feb 26, 2015, 5:19:55 PM2/26/15
to discuss...@googlegroups.com
Hi !

I'm having some trouble building webrtc on my Mac (Yosemite, 10.10.2)

I'm following the instructions provided in: http://www.webrtc.org/native-code/development

The error arises when I run:
$ fetch webrtc

The terminal output:
Running: /usr/local/opt/python/bin/python2.7 /Users/xxx/yyy/depot_tools/gclient.py config --spec 'solutions = [
  {
    "managed": False,
    "name": "src",
    "url": "https://chromium.googlesource.com/external/webrtc.git",
    "custom_deps": {},
    "deps_file": "DEPS",
    "safesync_url": "",
  },
]
'
Running: /usr/local/opt/python/bin/python2.7 /Users/xxx/yyy/depot_tools/gclient.py sync

Syncing projects: 100% (3/3), done.                      


________ running '/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c import os,sys;script = os.path.join("trunk","check_root_dir.py");_ = os.system("%s %s" % (sys.executable,script)) if os.path.exists(script) else 0' in '/Users/xxx/yyy/tst'


________ running '/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u src/sync_chromium.py --target-revision 2c3ffb2355a27c32f45e508ef861416b820c823b' in '/Users/xxx/yyy/tst'
Running "gclient sync --force --revision src@2c3ffb2355a27c32f45e508ef861416b820c823b --gclientfile .gclient.tmp --delete_unversioned_trees --reset --upstream" in /Users/xxx/yyy/tst/src/chromium
Traceback (most recent call last):
  File "src/sync_chromium.py", line 156, in <module>
    sys.exit(main())
  File "src/sync_chromium.py", line 147, in main
    ret = subprocess.call(args, cwd=opts.chromium_dir, env=env)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
Error: Command /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u src/sync_chromium.py --target-revision 2c3ffb2355a27c32f45e508ef861416b820c823b returned non-zero exit status 1 in /Users/xxx/yyy/tst
Traceback (most recent call last):
  File "/Users/xxx/yyy/depot_tools/fetch.py", line 334, in <module>
    sys.exit(main())
  File "/Users/xxx/yyy/depot_tools/fetch.py", line 330, in main
    return run(options, spec, root)
  File "/Users/xxx/yyy/depot_tools/fetch.py", line 324, in run
    return checkout.init()
  File "/Users/xxx/yyy/depot_tools/fetch.py", line 169, in init
    super(GclientGitSvnCheckout, self).init()
  File "/Users/xxx/yyy/depot_tools/fetch.py", line 136, in init
    self.run_gclient(*sync_cmd)
  File "/Users/xxx/yyy/depot_tools/fetch.py", line 76, in run_gclient
    return self.run(cmd_prefix + cmd, **kwargs)
  File "/Users/xxx/yyy/depot_tools/fetch.py", line 66, in run
    return subprocess.check_call(cmd, **kwargs)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '('/usr/local/opt/python/bin/python2.7', '/Users/xxx/yyy/depot_tools/gclient.py', 'sync')' returned non-zero exit status 2


From the line "OSError: [Errno 2] No such file or directory" it seems that there is a path is wrong. it's trying to execute the following command:

$ gclient sync --force --revision src@2c3ffb2355a27c32f45e508ef861416b820c823b --gclientfile .gclient.tmp --delete_unversioned_trees --reset --upstream

on the directory: /Users/xxx/yyy/tst/src/chromium

And this seems to fail. If I do this myself on the terminal, on the correct folder, the code executes
$ cd src/chromium
$ gclient sync
--force --revision src@2c3ffb2355a27c32f45e508ef861416b820c823b --gclientfile .gclient.tmp --delete_unversioned_trees --reset --upstream

until it fails:
________ running 'download_from_google_storage --no_resume --platform=win32 --no_auth --bucket chromium-gn -s src/buildtools/win/gn.exe.sha1' in '/Users/xxx/yyy/tst/src/chromium'
Traceback (most recent call last):
  File "/Users/xxx/yyy/misc/depot_tools/gclient.py", line 2301, in <module>
    sys.exit(Main(sys.argv[1:]))
  File "/Users/xxx/yyy/misc/depot_tools/gclient.py", line 2289, in Main
    return dispatcher.execute(OptionParser(), argv)
  File "/Users/xxx/yyy/misc/depot_tools/subcommand.py", line 245, in execute
    return command(parser, args[1:])
  File "/Users/xxx/yyy/misc/depot_tools/gclient.py", line 2046, in CMDsync
    ret = client.RunOnDeps('update', args)
  File "/Users/xxx/yyy/misc/depot_tools/gclient.py", line 1531, in RunOnDeps
    self.RunHooksRecursively(self._options)
  File "/Users/xxx/yyy/misc/depot_tools/gclient.py", line 986, in RunHooksRecursively
    hook, cwd=self.root.root_dir, always=True)
  File "/Users/xxx/yyy/misc/depot_tools/gclient_utils.py", line 293, in CheckCallAndFilterAndHeader
    return CheckCallAndFilter(args, **kwargs)
  File "/Users/xxx/yyy/misc/depot_tools/gclient_utils.py", line 488, in CheckCallAndFilter
    **kwargs)
  File "/Users/xxx/yyy/misc/depot_tools/subprocess2.py", line 253, in __init__
    % (str(e), kwargs.get('cwd'), args[0]))
OSError: Execution failed with error: [Errno 2] No such file or directory.
Check that /Users/xxx/yyy/misc/tst/src/chromium or download_from_google_storage exist and have execution permission.

I don't know how to build chromium, how to get across all these errors on compilation. It seems to me that they are related with the current directory that the command is running on, vs where they should run. So it's not finding some files ...

Any help would be very much appreciated and rewarded with a warm virtual hug

—N

Henrik Andreasson

unread,
Feb 27, 2015, 3:23:07 AM2/27/15
to discuss...@googlegroups.com
I have not tried it myself yet, but one of my colleagues states:

Regarding Yosemite, here's how I solved a problem with git svn I ran into after upgrading my MacBook (instructions based on my system, with XCode 6.1.1).

I solved it by adding the following line to ~/.bash_profile:

# Solve problem with git svn on Yosemite.
export PERL5LIB="/Applications/Xcode.app/Contents/Developer/Library/Perl/5.18/darwin-thread-multi-2level"

Then start a new shell (or source .bash_profile), navigate to any git-svn repo (like your WebRTC checkout), run git svn info and it should work again. 
 

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ignacio Avellino

unread,
Mar 3, 2015, 12:03:26 PM3/3/15
to discuss...@googlegroups.com
hi Henrik!

Thank you for your reply.

Nonetheless, it did not solve my problem :(

Any other suggestions are welcome!

—N

Henrik Kjellander

unread,
Mar 4, 2015, 3:14:17 AM3/4/15
to discuss...@googlegroups.com
Here's another Henrik to the rescue: The suggestion henrika@ suggested above only remedies git svn related problems with Yosemite.

I haven't seen your error before, so let's look into your setup.
  1. Can you try to re-install your depot_tools? That seems to be the thing that's not found. https://sites.google.com/a/chromium.org/dev/developers/how-tos/install-depot-tools
  2. Can you share your PATH environment variable's value?
You should never need to cd src/chromium and sync manually, that's taken care of by the sync_chromium.py referenced in the DEPS file, that's being invoked in during the runhooks step of the sync.
After fixing 1) above, can you try to just run gclient sync again in your /Users/xxx/yyy/tst directory?

If that doesn't help. Wipe everything and start over with 'fetch webrtc' again. I know it takes a lot of time and download, but it's the safest way to start over cleanly.

Ignacio Avellino

unread,
Mar 4, 2015, 4:56:16 AM3/4/15
to discuss...@googlegroups.com
Hi Henrik!

Glad you came to the rescue :) THANK YOU!

I don't think that it's a problem of not being able to find the dept_tools, otherwise I would have not been able to execute "fetch" in the first place, it would have not found the executable.

Alright, so I re-installed depot_tools. For the record, "installing" means cloning the git repo, and adding its path to the PATH environment var ... right? There's no compiling, calling "make" or "make install" involved ...

This is my PATH
$ echo $PATH
~/Documents/xxx/yyy/misc/depot_tools:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin

When I try running $gclient synch it fails, but that makes sense since my fetch never actually worked, it stopped 10 seconds after it started ... it did not download much.

I wiped everything and tried running $fetch webrtc again; I get the same error:



$ fetch webrtc
Running: /usr/local/opt/python/bin/python2.7 /Users/xxx/yyy/misc/depot_tools/gclient.py config --spec 'solutions = [
  {
    "managed": False,
    "name": "src",
    "custom_deps": {},
    "deps_file": "DEPS",
    "safesync_url": "",
  },
]
'
Running: /usr/local/opt/python/bin/python2.7 /Users/xxx/yyy/misc/depot_tools/gclient.py sync
Syncing projects: 100% (3/3), done.                      

________ running '/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c import os,sys;script = os.path.join("trunk","check_root_dir.py");_ = os.system("%s %s" % (sys.executable,script)) if os.path.exists(script) else 0' in '/Users/xxx/yyy/tst'

________ running '/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u src/sync_chromium.py --target-revision e144d30232209034b82d544926070bb8dc62f6ec' in '/Users/xxx/yyy/tst'
Running "gclient sync --force --revision src@e144d30232209034b82d544926070bb8dc62f6ec --gclientfile .gclient.tmp --delete_unversioned_trees --reset --upstream" in /Users/xxx/yyy/tst/src/chromium
Traceback (most recent call last):
  File "src/sync_chromium.py", line 156, in <module>
    sys.exit(main())
  File "src/sync_chromium.py", line 147, in main
    ret = subprocess.call(args, cwd=opts.chromium_dir, env=env)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
Error: Command /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u src/sync_chromium.py --target-revision e144d30232209034b82d544926070bb8dc62f6ec returned non-zero exit status 1 in /Users/xxx/yyy/tst
Traceback (most recent call last):
  File "/Users/xxx/yyy/misc/depot_tools/fetch.py", line 335, in <module>
    sys.exit(main())
  File "/Users/xxx/yyy/misc/depot_tools/fetch.py", line 330, in main
    return run(options, spec, root)
  File "/Users/xxx/yyy/misc/depot_tools/fetch.py", line 324, in run
    return checkout.init()
  File "/Users/xxx/yyy/misc/depot_tools/fetch.py", line 169, in init
    super(GclientGitSvnCheckout, self).init()
  File "/Users/xxx/yyy/misc/depot_tools/fetch.py", line 136, in init
    self.run_gclient(*sync_cmd)
  File "/Users/xxx/yyy/misc/depot_tools/fetch.py", line 76, in run_gclient
    return self.run(cmd_prefix + cmd, **kwargs)
  File "/Users/xxx/yyy/misc/depot_tools/fetch.py", line 66, in run
    return subprocess.check_call(cmd, **kwargs)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '('/usr/local/opt/python/bin/python2.7', '/Users/xxx/yyy/misc/depot_tools/gclient.py', 'sync')' returned non-zero exit status 2



For me it's failing after 10 seconds I execute fetch :(

Any other suggestions ...? I'm going desperate.

thanks a million in advance! If you're ever in Paris, I owe you a beer ...

—N

Ignacio Avellino

unread,
Mar 4, 2015, 5:43:37 AM3/4/15
to discuss...@googlegroups.com
SOLVED IT!!

When exporting PATH:
THIS IS BAD
PATH=“~/Documents/blah/depot_tools/“:”$PATH"

THIS IS GOOD

PATH=~/Documents/blah/depot_tools/:”$PATH"

If you use quotes, then bash will not replace the "~" with the full path. And my guess is that this path is used inside some python script, which has no idea what "~" means. If you don't quote it, bash will replace "~" with the full path.

Hence the "No such file or directory" error ...

PHEW! This took me a week to figure it out. A more specific error, for instance WHICH file or directory was not found would have been of great help...

Anyhow, than you Henrik(s) for the help!

—N

Sanfy D

unread,
Aug 17, 2018, 5:26:47 PM8/17/18
to discuss-webrtc
THANKS A LOT!!!
Reply all
Reply to author
Forward
0 new messages