ninja-build / ninja

a small build system with a focus on speed
https://ninja-build.org/
Apache License 2.0
11.3k stars 1.61k forks source link

can not find build.ninja when run it in windows #2477

Open GreameLee opened 3 months ago

GreameLee commented 3 months ago

I compile it successfully and it shows like:

>python configure.py --bootstrap
bootstrapping ninja...
warning: A compatible version of re2c (>= 0.15.3) was not found; changes to src/*.in.cc will not affect your build.
depfile_parser.cc
lexer.cc
build.cc
build_log.cc
clean.cc
clparser.cc
debug_flags.cc
deps_log.cc
disk_interface.cc
dyndep.cc
dyndep_parser.cc
edit_distance.cc
eval_env.cc
graph.cc
graphviz.cc
json.cc
line_printer.cc
manifest_parser.cc
metrics.cc
missing_deps.cc
parser.cc
state.cc
status_printer.cc
string_piece_util.cc
util.cc
version.cc
subprocess-win32.cc
includes_normalize-win32.cc
msvc_helper-win32.cc
msvc_helper_main-win32.cc
minidump-win32.cc
getopt.c
ninja.cc
Generating code
Finished generating code
wrote build.ninja.
bootstrap complete.  rebuilding...
[35/35] LINK ninja.exe
Generating code
Finished generating code

and run the ninja -help successfully but when run ninja -v it shows:

>ninja -v

ninja: error: loading 'build.ninja': The system cannot find the file specified.
mcprat commented 3 months ago

not sure, but fortunately you don't have to call ninja to rebuild itself, the --bootstrap option does it for you

bootstrap complete. rebuilding...

digit-google commented 3 months ago

ninja -v returning this message is pretty normal. It means you are running Ninja from a directory that does not have a build.ninja file to read from.

The -v is the verbose flag, do you want to run ninja --version instead?