Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-64757

Improve error messages when scons fails to generate-ninja on Windows

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.3.2, 4.4.14, 5.0.8, 6.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • v5.3, v5.0, v4.4
    • Dev Platform 2022-04-04, Dev Platform 2022-04-18

      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.

       

            Assignee:
            richard.samuels@mongodb.com Richard Samuels (Inactive)
            Reporter:
            richard.samuels@mongodb.com Richard Samuels (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: