Closed
Description
When I run gyp on winpty.gyp
, it outputs this nonsensical error message:
C:\rprichard\proj\winpty\winpty>..\gyp\gyp winpty.gyp
gyp: Could not automatically locate src directory. This isa temporary Chromium
feature that will be removed. Use--depth as a workaround.
I'm speculating, but I think the deal is:
- Chromium's gyp files use a
DEPTH
variable. - Somehow,
DEPTH
needs to be set, and it can be set by hand with a--depth
argument. - That's cumbersome, though, so in 2009, a hack went into gyp to autodetect a
DEPTH
value by looking for the first source file whose absolute path contains asrc
component. If it can't find an appropriateDEPTH
setting, then gyp aborts, because there's something wrong with your Chromium checkout.
The immediate work-around for this error is to pass --depth
with (I think?) any arbitrary value:
..\gyp\gyp winpty.gyp --depth .
It's dumb, but if I add a src
directory, then gyp
will Just Work. So, maybe I'll reorganize the source tree someday.
It might make sense to look for a gyp alternative, too, especially given that Chromium seems to be switching away from gyp toward gn. Alternatives to gyp include:
- Check in VC project files
- CMake (Could CMake replace the Makefiles? Need to consider MSYS, MSYS2, and Cygwin.)
Metadata
Metadata
Assignees
Labels
No labels
Activity