Skip to content

gyp generates inscrutable error message on winpty.gyp #51

Closed
@rprichard

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 a src component. If it can't find an appropriate DEPTH 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.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions