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

The ninja builder fails to link on Windows with `LNK1561: entry point must be defined`

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0, 4.4.7
    • Affects Version/s: None
    • Component/s: Build
    • None
    • Fully Compatible
    • v4.4
    • Dev Platform 2020-12-14, Dev Platform 2020-12-28, Dev Platform 2021-01-11

      As of a week or so (haven't found the exact offending commit), using ninja on Windows fails to link the executables with the following error:

      E:\workspace\mongo>buildscripts\scons.py --jlink=4 --ssl --win-version-min=win10 --detect-odr-violations --install-mode=hygienic --dbg=on --opt=off CPPPATH="D:/workspace/libs/snmp/include D:/workspace/libs/sasl/include" LIBPATH="D:/workspace/libs/snmp/lib D:/workspace/libs/sasl/lib" MONGO_GIT_HASH="unknown" MONGO_VERSION="0.0.0" VARIANT_DIR=ninja --build-tools=next --ninja generate-ninja
      ...
      E:\workspace\mongo>ninja install-mongo
      ...
      [53/104] Linking build\ninja\mongo\shell\mongo.exe
      FAILED: build/ninja/mongo/shell/mongo.exe
      link @build\ninja\mongo\shell\mongo.exe.rsp
         Creating library build\ninja\mongo\shell\mongo.lib and object build\ninja\mongo\shell\mongo.exp
      LINK : fatal error LNK1561: entry point must be defined
      [84/104] Compiling build\ninja\mongo\db\index_builds_coordinator.obj
      ninja: build stopped: subcommand failed.
      

      The same problem doesn't exist when using scons directly:

      E:\workspace\mongo>buildscripts\scons.py --jlink=4 --ssl --win-version-min=win10 --detect-odr-violations --install-mode=hygienic --dbg=on --opt=off CPPPATH="D:/workspace/libs/snmp/include D:/workspace/libs/sasl/include" LIBPATH="D:/workspace/libs/snmp/lib D:/workspace/libs/sasl/lib" MONGO_GIT_HASH="unknown" MONGO_VERSION="0.0.0" VARIANT_DIR=ninja --build-tools=next install-mongo
      

            Assignee:
            daniel.moody@mongodb.com Daniel Moody
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: