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

DistributionAndProjections compile error with MSVC 14.32.31326

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Hide
      • Make sure you have MSVC 14.32.31326 installed: Microsoft (R) C/C++ Optimizing Compiler Version 19.32.31329 for x64

       C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.32.31326\bin\HostX64\x64\cl.EXE

      • git checkout 4287c36
      • cd src\mongo\db\modules\enterprise
      • git checkout 63797e1
      • cd ..\..\..\..\..
      • buildscripts\scons.py --dbg=on --ssl --win-version-min=win10 --link-model=object CPPPATH="c:/mongodb/libs/sasl/include c:/mongodb/libs/snmp/include" LIBPATH="c:/mongodb/libs/sasl/lib c:/mongodb/libs/snmp/lib" MONGO_GIT_HASH="unknown" MONGO_VERSION="6.1.0" --ninja generate-ninja{}
      • ninja build\debug\mongo\db\query\optimizer\explain.obj
      Show
      Make sure you have MSVC 14.32.31326 installed: Microsoft (R) C/C++ Optimizing Compiler Version 19.32.31329 for x64   C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.32.31326\bin\HostX64\x64\cl.EXE git checkout 4287c36 cd src\mongo\db\modules\enterprise git checkout 63797e1 cd ..\..\..\..\.. buildscripts\scons.py --dbg=on --ssl --win-version-min=win10 --link-model=object CPPPATH="c:/mongodb/libs/sasl/include c:/mongodb/libs/snmp/include" LIBPATH="c:/mongodb/libs/sasl/lib c:/mongodb/libs/snmp/lib" MONGO_GIT_HASH="unknown" MONGO_VERSION="6.1.0" --ninja generate-ninja{ } ninja build\debug\mongo\db\query\optimizer\explain.obj
    • Dev Platform 2022-07-11, Dev Platform 2022-07-25

      Updating to the latest version of the compiler for MSVC 2022 cause a compilation error:
      [1667/4591] Compiled build\debug\mongo\db\query\optimizer\explain.obj

      FAILED: build/debug/mongo/db/query/optimizer/explain.obj
      cl @build\debug\mongo\db\query\optimizer\explain.obj.rsp
      src\mongo\db\query\optimizer\explain.cpp(1691,32): error C2039: '_type': is not a member of 'mongo::optimizer::properties::DistributionAndProjections'
      if (distr1._type < distr2._type) {
      ^
      C:\mongodb\mongo\src\mongo/db/query/optimizer/props.h(233): note: see declaration of 'mongo::optimizer::properties::DistributionAndProjections'
      struct DistributionAndProjections
      { src\mongo\db\query\optimizer\explain.cpp(2257): note: see reference to class template instantiation 'mongo::optimizer::ExplainGeneratorTransporter<version>' being compiled }
      ;
      

      around the code https://github.com/mongodb/mongo/blob/afc52bea57c8edb8769efa67c01ebbde5a87f50d/src/mongo/db/query/optimizer/explain.cpp#L1688-L1693

       

      Investigate the relevant code related to the newer compiler.

            Assignee:
            alex.neben@mongodb.com Alex Neben
            Reporter:
            daniel.moody@mongodb.com Daniel Moody
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: