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