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

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

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 5.3.2, 4.4.14, 5.0.8, 6.0.0-rc0
    • None
    • None
    • Fully Compatible
    • v5.3, v5.0, v4.4
    • Dev Platform 2022-04-04, Dev Platform 2022-04-18

    Description

      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.

       

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: