Summary: | build-webkit --chromium --ninja should show a better error message when ninja is missing | ||
---|---|---|---|
Product: | WebKit | Reporter: | Eric Seidel (no email) <eric> |
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | dpranke, robert, thakis |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Description
Eric Seidel (no email)
2012-12-10 01:40:40 PST
With a link to ninja of course: http://martine.github.com/ninja/ :) Now that I look at the code, my analysis was probably wrong. Here's the ninja discovery code from Tools/Scripts/webkitdirs.pm: # Find ninja. my $ninjaPath; if (commandExists('ninja')) { $ninjaPath = 'ninja'; } elsif (-e 'Source/WebKit/chromium/depot_tools/ninja') { $ninjaPath = 'Source/WebKit/chromium/depot_tools/ninja'; } else { die "ninja not found. Install chromium's depot_tools by running update-webkit first\n"; } ninja is a bash script in depot_tools, and that should always be found. Robert, does Source/WebKit/chromium/depot_tools exist on your box? (If not, do you know how `update-webkit --chromium` manages to find gclient?) Here's the ninja bash script in depot_tools: #!/bin/bash # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. OS="$(uname -s)" THIS_DIR="$(dirname "${0}")" if [ "${OS}" = "Linux" ]; then exec "${THIS_DIR}/ninja-linux64" "$@" elif [ "${OS}" = "Darwin" ]; then exec "${THIS_DIR}/ninja-mac" "$@" elif [[ ${OS} == CYGWIN* ]]; then exec cmd.exe /c `cygpath -t windows $0`.exe "$@" elif [[ ${OS} == MINGW32* ]]; then cmd.exe //c $0.exe "$@" else echo "Unsupported OS ${OS}" exit 1 fi exec will probably print something like "don't know how to exec ninja-linux64" on a 32bit linux, and that diagnostic should certainly be better -- but it looks like this script isn't even called, so we need to figure out why that's not happening first. (In reply to comment #2) > ninja is a bash script in depot_tools, and that should always be found. Robert, does Source/WebKit/chromium/depot_tools exist on your box? (If not, do you know how `update-webkit --chromium` manages to find gclient?) Turns out I had a very old depot_tools from a couple of years ago in my path. I got rid of that and progressed to the message you suggest here: > exec will probably print something like "don't know how to exec ninja-linux64" I think https://code.google.com/p/chromium/wiki/UsingALinuxChroot may work for me as my chroot is very old and not 64-bit. I will try it when I get the chance. I will still be able to build with Makefiles though once ninja becomes default though right? I just need to pass an extra build flag? We should just check in a linux32 binary to handle your case. :) ninja is very tiny. (In reply to comment #3) > (In reply to comment #2) > I will still be able to build with Makefiles though once ninja becomes default though right? I just need to pass an extra build flag? Yes --no-ninja will work. I believe --make exists to and will work in your case (or I'll make sure it does before I land!) (In reply to comment #4) > We should just check in a linux32 binary to handle your case. :) ninja is very tiny. Dunno, the 32bit user base is also very tiny, and it's another binary for me to build when updating ninja. I'll make the ninja shell script print something nicer on 32bit for now. And yes, make will still work for now, but it might go away eventually. https://codereview.chromium.org/11485007/ is adding a friendlier message. We ended up needing a 32bit ninja binary for the 32bit bots anyway ( :-/ ), so that's now checked in. https://codereview.chromium.org/11485007 will make the error message friendlier for non-mac/win/linux platforms. I think this is all done. |