Saturday, November 21, 2009

Various Google-Fails When Building Chromium OS

The first step in the Chromium OS build instructions is to run the script make_local_repo.sh. This will build a local repo from which your chroot environment will grab packages. However, this script has a bug where it will not wait for an APT lock. In my case, I was installing another package via apt-get when I ran the script, so it bailed out early when it couldn't get the apt lock, and hosed my repo.

The not-so-helpful error you will get once your local repo is screwed up:
khaki@onion:~/chromium-fake/src/scripts$ ./make_local_repo.sh
Creating repository directory...
Updating chromeos_dev from /home/khaki/chromium-fake/src/package_repo/repo_list_dev.txt...
chroot: cannot run command `reprepro': No such file or directory

It's easy to fix this, just delete the "repo" directory in the Chromium OS root directory (along side "src" and "tools") and then re-run the script.

Also, Google didn't include the full list of prerequisites for running the GClient build tool. If, right after syncing WebKit and WebCore, you get this unhelpful Python traceback error message:

Traceback (most recent call last):
[Snipped here by yours truly.]
File "/home/khakionion/depot_tools/gclient_scm.py", line 195, in _Run
sp = subprocess.Popen(cmd, cwd=cwd, stdout=stdout)
File "/usr/lib/python2.6/subprocess.py", line 621, in __init__
errread, errwrite)
File "/usr/lib/python2.6/subprocess.py", line 1126, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

...Then you don't have Git, which is understandable, because it's not listed in the prerequisites for Chromium or GClient. But, if you're building Chromium OS, you should be calling "gclient sync" with the deps="chromeos,unix" command, making Git a dependency. Easy to miss, because Chromium's instructions don't consider the existence of Chromium OS. If you're using Ubuntu Karmic Koala, a simple "sudo apt-get install git git-core" will fix you up. You don't have to restart anything, just call the same "gclient sync" command you used before, and you'll continue at the first Git command that broke before.

2 comments:

Anonymous said...

thanks for the info about repo dir!

Anonymous said...

Your blog keeps getting better and better! Your older articles are not as good as newer ones you have a lot more creativity and originality now keep it up!