I attempted to run the generate-ninja target on Windows in a Cygwin Terminal (through RDP) with the following scons invocation:
python buildscripts/scons.py --ssl MONGO_DISTMOD=windows CPPPATH="c:/sasl/include c:/snmp/include" LIBPATH="c:/sasl/lib c:/snmp/lib" -j$(( $(grep -c ^processor /proc/cpuinfo) / 2 )) --win-version-min=win10 --ninja generate-ninja
and was greeted to this error message:
scons: done reading SConscript files. scons: Building targets ... scons: *** [build\opt\mongo\db\index\sort_key_generator.obj] Exception : Could not resolve path for cl dependency on node 'build\opt\mongo\db\index\sort_key_generator.ob j' scons: building terminated because of errors. build\opt\mongo\db\index\sort_key_generator.obj failed: Exception : Could not resolve path for cl dependency on node 'build\opt\mongo\db\index\sort_key_generator.obj'
The cause of this error was that I did not run vcvarsall.bat amd64, so scons did not have the correct environment variables set. Can we emit a more helpful error message in this situation?
Dan Moody's suggestion was:
Could not resolve path for $TOOL dependency on node $TARGET, you may need to setup your shell environment for ninja builds.