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

return type 'std::__1::cv_status' must match previous return type 'std::__1::cv_status::__lx' when lambda expression has unspecified explicit return type

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.4.11
    • Affects Version/s: 3.4.7
    • Component/s: Build
    • None
    • Fully Compatible
    • ALL
    • Platforms 2017-11-13

      mongodb 3.4.7 fails to build on OS X 10.8 with the compiler "Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)" from Xcode 5.1.1; here is a build log:

      https://build.macports.org/builders/ports-10.8_x86_64_legacy-builder/builds/35112/steps/install-port/logs/stdio

      src/mongo/db/operation_context.cpp:335:13: error: return type 'std::__1::cv_status' must match previous return type 'std::__1::cv_status::__lx' when lambda expression has unspecified explicit return type
                  return cv.wait_until(m, deadline.toSystemTimePoint());
                  ^
      src/mongo/db/operation_context.cpp:340:9: error: return type 'stdx::cv_status' (aka 'std::__1::cv_status') must match previous return type 'std::__1::cv_status::__lx' when lambda expression has unspecified explicit return type
              return cvWaitUntilWithClockSource(clockSource, cv, m, deadline);
              ^
      src/mongo/db/operation_context.cpp:366:12: error: no viable conversion from 'const std::__1::cv_status::__lx' to 'StatusWith<stdx::cv_status>'
          return waitStatus;
                 ^~~~~~~~~~
      

      The same version builds fine on OS X 10.9 with the compiler "Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)" from Xcode 6.2. Here is that build log:

      https://build.macports.org/builders/ports-10.9_x86_64-builder/builds/34415/steps/install-port/logs/stdio

      The same version also builds fine on OS X 10.7 with clang 3.9.1 as installed by MacPorts. Here is that build log:

      https://build.macports.org/builders/ports-10.7_x86_64_legacy-builder/builds/40825/steps/install-port/logs/stdio

      If necessary, we can tell MacPorts to build mongodb with a newer clang on OS X 10.8 as well, but previous versions of mongodb built fine on OS X 10.8 with clang from Xcode so I wanted to let you know in case this is a bug.

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            ryandesign Ryan Schmidt
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: