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

Build failure in overflow_arithmetic.h: constexpr function never produces a constant expression

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 4.2.3
    • Fix Version/s: 4.2.4, 4.3.4
    • Component/s: Build
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.2
    • Steps To Reproduce:
      • Install MacPorts on your High Sierra based (with all available Apple updates) Mac.
      • Run sudo port install mongodb
    • Sprint:
      Dev Platform 2020-02-10

      Description

      The attempt to build MongoDB 4.2.3 on macOS 10.14 (High Sierra) fails:

      :info:build src/mongo/platform/overflow_arithmetic.h:97:16: error: constexpr function never produces a constant expression [-Winvalid-constexpr]
      :info:build constexpr bool mongoSignedMultiplyOverflow64(long lhs, long rhs, long* product) {
      :info:build ^
      :info:build src/mongo/platform/overflow_arithmetic.h:98:12: note: subexpression not valid in a constant expression
      :info:build return __builtin_mul_overflow(lhs, rhs, product);
      :info:build ^
      

      Please also see attached build log and MacPorts ticket 60032

        Attachments

          Activity

            People

            Assignee:
            acm Andrew Morrow
            Reporter:
            mongodb.com@seichter.de Ralph Seichter
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: