Re: [chromium-discuss] cannot build on Ubuntu - "can't cd to app"

58 views
Skip to first unread message

Nico Weber

unread,
Jun 27, 2010, 8:20:59 PM6/27/10
to phli...@gmail.com, Chromium-dev
(Moving to chromium-dev)

On Sun, Jun 27, 2010 at 4:55 PM, Phlip <phli...@gmail.com> wrote:
> Chromiums:
> Every step here is documented, somewhere, but not all together. Most of the
> steps appear at http://dev.chromium.org/developers/how-tos/get-the-code
> The platform is Linux 2.6.32-22-generic #33-Ubuntu, with all the stuff
> installed from ./src/build/install-build-deps.sh.
> First, expand the tarball, and move its deep src folder into our work folder
> (disregard the .gclient stuff inside the tarball - wouldn't it be wrong?):
>   $ tar xf chromium.r50706.tgz
>   $ mkdir chromium
>   $ mv home/chrome-svn/tarball/chromium/src chromium/
>   `home/chrome-svn/tarball/chromium/src' -> `chromium/src'
> The documentation does not seem to state whether CHROMIUM_ROOT is required,
> or simply illustrates the documentation. It would seem, with so many depot
> tools running around, they could configure this themselves:
>   $ cd chromium/
>   /chromium$ export CHROMIUM_ROOT=`pwd`
> Now expand the tools, and put them on the path:
>   /chromium$ tar xf ../depot_tools.tar.gz
>   /chromium$ export PATH=`pwd`/depot_tools:"$PATH"
> Link to the svn source drop, and build the .mk files:
>   /chromium$ export GYP_GENERATORS=make
>   /chromium$ gclient config http://src.chromium.org/svn/trunk/src
>   /chromium$ gclient runhooks --force
> Aaand pull the trigger:
>   /chromium$ cd src
>   /chromium/src$ make
>   webkit/test_shell_common.target.mk:8: warning: overriding commands for
> target `out/Debug/plugins/libnpapi_layout_test_plugin.so'
>   third_party/WebKit/WebKit/chromium/DumpRenderTree.target.mk:39: warning:
> ignoring old commands for target
> `out/Debug/plugins/libnpapi_layout_test_plugin.so'
>     ACTION Generating resources from resources/app_resources.grd
> out/Debug/obj/gen/app/app_resources/grit/app_resources.h
>   cd: 1: can't cd to app
>   python: can't open file '../tools/grit/grit.py': [Errno 2] No such file or
> directory
>   make: *** [out/Debug/obj/gen/app/app_resources/grit/app_resources.h] Error
> 2
>   /chromium/src$
> I can get that error via any combination of "gclient sync" and whatnot. And
> the documentation reliably fails to specify in which folder to run each
> command. Some seem to be in src and some above it.
> And what of the deep path inside chromium.r50706.tgz? Do the docs cover it?
> Should I emulate it on my hard drive?
> --
>  Phlip
>  http://c2.com/cgi/wiki?ZeekLand
>
> --
> Chromium Discussion mailing list: chromium...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-discuss
>

Phlip

unread,
Jun 30, 2010, 8:06:36 AM6/30/10
to Chromium-dev
Bump?

I tried this on chromium.r50962.tgz and got the same result.

If I go in after this myself, to what file should I start adding trace
statements?

On Jun 27, 5:20 pm, Nico Weber <tha...@chromium.org> wrote:
> (Moving to chromium-dev)
>
>
>
> On Sun, Jun 27, 2010 at 4:55 PM, Phlip <phlip2...@gmail.com> wrote:
> > Chromiums:
> > Every step here is documented, somewhere, but not all together. Most of the
> > steps appear athttp://dev.chromium.org/developers/how-tos/get-the-code
> > The platform is Linux 2.6.32-22-generic #33-Ubuntu, with all the stuff
> > installed from ./src/build/install-build-deps.sh.
> > First, expand the tarball, and move its deep src folder into our work folder
> > (disregard the .gclient stuff inside the tarball - wouldn't it be wrong?):
> >   $ tar xf chromium.r50706.tgz
> >   $ mkdir chromium
> >   $ mv home/chrome-svn/tarball/chromium/src chromium/
> >   `home/chrome-svn/tarball/chromium/src' -> `chromium/src'
> > The documentation does not seem to state whether CHROMIUM_ROOT is required,
> > or simply illustrates the documentation. It would seem, with so many depot
> > tools running around, they could configure this themselves:
> >   $ cd chromium/
> >   /chromium$ export CHROMIUM_ROOT=`pwd`
> > Now expand the tools, and put them on the path:
> >   /chromium$ tar xf ../depot_tools.tar.gz
> >   /chromium$ export PATH=`pwd`/depot_tools:"$PATH"
> > Link to the svn source drop, and build the .mk files:
> >   /chromium$ export GYP_GENERATORS=make
> >   /chromium$ gclient confighttp://src.chromium.org/svn/trunk/src
> > Chromium Discussion mailing list: chromium-disc...@chromium.org

Evan Martin

unread,
Jun 30, 2010, 11:09:52 AM6/30/10
to phli...@gmail.com, Chromium-dev
On Wed, Jun 30, 2010 at 5:06 AM, Phlip <phli...@gmail.com> wrote:
>> >   /chromium$ export GYP_GENERATORS=make
>> >   /chromium$ gclient confighttp://src.chromium.org/svn/trunk/src
>> >   /chromium$ gclient runhooks --force
>> > Aaand pull the trigger:
>> >   /chromium$ cd src
>> >   /chromium/src$ make

It looks like you might have skipped step 6 on the tarball bootstrap
instructions (gclient sync --force):
http://dev.chromium.org/developers/how-tos/get-the-code
I've never bootstrapped from a tarball so I don't know what's exactly
wrong, but the missing directory bit makes me suspect files are
missing.

PS: At this point r50706 (your tarball) is over 500 commits behind trunk.

Phlip

unread,
Jun 30, 2010, 11:25:48 AM6/30/10
to Evan Martin, Chromium-dev
> >> >   /chromium$ gclient confighttp://src.chromium.org/svn/trunk/src
> >> >   /chromium$ gclient runhooks --force

> It looks like you might have skipped step 6 on the tarball bootstrap
> instructions (gclient sync --force):

> ...but the missing directory bit makes me suspect files are missing.

The app folder is right there. Are any lower folders also supposed to
have their own app folders too?

> PS: At this point r50706 (your tarball) is over 500 commits behind trunk.

sync --force gets the HEAD of trunk, but it also didn't work.

I'm gonna blast in an app folder into every folder and see if that
fixes anything! C-:

--
 Phlip
 http://c2.com/cgi/wiki?ZeekLand

Evan Martin

unread,
Jun 30, 2010, 11:33:24 AM6/30/10
to Phlip, Chromium-dev
On Wed, Jun 30, 2010 at 8:25 AM, Phlip <phli...@gmail.com> wrote:
>> ...but the missing directory bit makes me suspect files are missing.
>
> The app folder is right there. Are any lower folders also supposed to
> have their own app folders too?

Here's the failing output:

> > ACTION Generating resources from resources/app_resources.grd
> > out/Debug/obj/gen/app/app_resources/grit/app_resources.h
> > cd: 1: can't cd to app
> > python: can't open file '../tools/grit/grit.py': [Errno 2] No such file or
> > directory

I think what is happening is:
- to run the ACTION
- we cd into the directory where the action lives (involves an /app/)
- and then since the cd failed, the relative path for the python script is wrong

You can run make with an additional "V=1" flag to see the command
lines that were run. We should be creating these directories on our
own.

Nico Weber

unread,
Jun 30, 2010, 11:34:16 AM6/30/10
to phli...@gmail.com, Evan Martin, Chromium-dev
On Wed, Jun 30, 2010 at 8:25 AM, Phlip <phli...@gmail.com> wrote:

That's not a good idea :-)

Many people have built chromium successfully by following the
instructions. Maybe start over and make sure you follow the
instructions closely?

Nico

ps: The app folder it seems to be complaining about is
out/Debug/obj/gen/app, which is a folder that should be created by the
built system.
Is tools/grit/griy.py in your path?

>
> --
>  Phlip
>  http://c2.com/cgi/wiki?ZeekLand
>
> --

> Chromium Developers mailing list: chromi...@chromium.org


> View archives, change email options, or unsubscribe:

>    http://groups.google.com/a/chromium.org/group/chromium-dev
>

Nico Weber

unread,
Jun 30, 2010, 11:35:02 AM6/30/10
to phli...@gmail.com, Evan Martin, Chromium-dev
Do any of $CHROMIUM_ROOT's parent directories contain spaces in their names?

Phlip

unread,
Jun 30, 2010, 11:51:34 AM6/30/10
to Nico Weber, Evan Martin, Chromium-dev
> Do any of $CHROMIUM_ROOT's parent directories contain spaces in their names?

omg I've been dev-ing, including with crappy scripts like make,
including KDE & Mozilla, for 25 years!

obligatory metasignal --> C-;

Uh, no.

Same answer to "Many people have built chromium". I think I have
special personal magnetic fields that f--- computers up. Oh, also I
have Python 2.6.5. Is 2.5 required? Some Python version ticks are
fishy...

Your app folder is there: out/Debug/obj/gen/app/app_resources/grit/

I am now starting another gclient sync --force

>> Is tools/grit/griy.py in your path?

The depot_tools are on the path, so the loader can see gclient. And
tools/grit/grit.py is available, if one cd-s into src/app and hits
../tools/grit/grit.py, so I didn't think that would matter.

When I add grit.py's neighbors to the path...

export PATH=`pwd`/tools/grit:"$PATH"

I get the same error.

Oh, and :

$ cat .gclient
solutions = [
{ "name" : "src",
"url" : "http://src.chromium.org/svn/trunk/src",
"custom_deps" : {
},
"safesync_url": ""
},
]

I ain't gonna turn the WebKit tests off because _they_ are what I'm
trying to get to!

--
Phlip
http://c2.com/cgi/wiki?ZeekLand

Nico Weber

unread,
Jun 30, 2010, 12:00:46 PM6/30/10
to Phlip, Evan Martin, Chromium-dev

Your .gclient file is in chromium, not chromium/src, right? (If it is
in chromium/src, try cding to chromium/src/src and run make from there
;-) ).

Phlip

unread,
Jun 30, 2010, 12:08:21 PM6/30/10
to Nico Weber, Evan Martin, Chromium-dev
> Your .gclient file is in chromium, not chromium/src, right?

The instructions don't seem to always specify from which folder to run
things, but .glient is above src, and src contains src/app, src/tools,
etc.

--
Phlip
http://c2.com/cgi/wiki?ZeekLand

Phlip

unread,
Jun 30, 2010, 12:47:27 PM6/30/10
to Evan Martin, Chromium-dev
> It looks like you might have skipped step 6 on the tarball bootstrap
> instructions (gclient sync --force):

Someone said I could replace that with runhooks.

After running sync --force, and getting zillions of Us and As, I get this again:


~/projects/chromium/src$ make V=1

webkit/test_shell_common.target.mk:8: warning: overriding commands for target `out/Debug/plugins/libnpapi_layout_test_plugin.so'
third_party/WebKit/WebKit/chromium/DumpRenderTree.target.mk:39: warning: ignoring old commands for target `out/Debug/plugins/libnpapi_layout_test_plugin.so'
  export LD_LIBRARY_PATH=/home/phlip/projects/chromium/src/out/Debug/lib.host:/home/phlip/projects/chromium/src/out/Debug/lib.target:$LD_LIBRARY_PATH; cd app; mkdir -p /home/phlip/projects/chromium/src/out/Debug/obj/gen/app/app_resources/grit /home/phlip/projects/chromium/src/out/Debug/obj/gen/app/app_resources; python ../tools/grit/grit.py -i resources/app_resources.grd build -o "/home/phlip/projects/chromium/src/out/Debug/obj/gen/app/app_resources"

cd: 1: can't cd to app
python: can't open file '../tools/grit/grit.py': [Errno 2] No such file or directory
make: *** [out/Debug/obj/gen/app/app_resources/grit/app_resources.h] Error 2


So should I, for example, try a much older tgz? (and would the current build tools match it?


> PS: At this point r50706 (your tarball) is over 500 commits behind trunk.

--
 Phlip
 http://c2.com/cgi/wiki?ZeekLand

Evan Martin

unread,
Jun 30, 2010, 1:09:05 PM6/30/10
to phli...@gmail.com, Nico Weber, Chromium-dev
On Wed, Jun 30, 2010 at 9:08 AM, Phlip <phli...@gmail.com> wrote:
>> Your .gclient file is in chromium, not chromium/src, right?
>
> The instructions don't seem to always specify from which folder to run
> things, but .glient is above src, and src contains src/app, src/tools,
> etc.

Definitely run make with V=1 and let us know what command is failing.
Definitely don't try creating random extra directories or copying
files around; they will make diagnosing the problem harder.

Evan Martin

unread,
Jun 30, 2010, 1:19:19 PM6/30/10
to phli...@gmail.com, Chromium-dev
On Wed, Jun 30, 2010 at 9:47 AM, Phlip <phli...@gmail.com> wrote:
> cd app; mkdir -p
> /home/phlip/projects/chromium/src/out/Debug/obj/gen/app/app_resources/grit
> /home/phlip/projects/chromium/src/out/Debug/obj/gen/app/app_resources;
> python ../tools/grit/grit.py -i resources/app_resources.grd build -o
> "/home/phlip/projects/chromium/src/out/Debug/obj/gen/app/app_resources"
> cd: 1: can't cd to app

So it's saying the very first thing it's doing is trying to cd to app.
Do you have an "app" subdirectory in your current ("src") directory?

Evan Martin

unread,
Jun 30, 2010, 1:20:02 PM6/30/10
to phli...@gmail.com, Chromium-dev

Arg, my mail is wonky today and I'm getting threads out of order, sorry. :(

You said upthread you do have an "app" directory. So why is "cd" failing?

Reply all
Reply to author
Forward
0 new messages