[SERVER-31188] MongoDB master fails to compile with Xcode 9/Apple LLVM version 9.0.0 Created: 20/Sep/17  Updated: 27/Oct/23  Resolved: 19/Oct/17

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Mark Benvenuto Assignee: ADAM Martin (Inactive)
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 2017-10-02, Platforms 2017-10-23
Participants:

 Description   

Xcode 9 adds new warnings which S2 fails.

g++ -o build/debug/third_party/s2/util/math/mathutil.o -c -Woverloaded-virtual -Werror=unused-result -Wpessimizing-move -Wredundant-move -Wno-undefined-var-template -std=c++14  -mmacosx-version-min=10.10 -fno-omit-frame-pointer -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -Werror -O0 -Wno-unused-local-typedefs -Wno-unused-function -Wno-unused-private-field -Wno-deprecated-declarations -Wno-tautological-constant-out-of-range-compare -Wno-unused-const-variable -Wno-missing-braces -Wno-inconsistent-missing-override -Wno-potentially-evaluated-expression -fstack-protector-strong -fno-builtin-memcmp -fdiagnostics-color=always -Isrc/third_party/s2 -Isrc/third_party/gflags-2.0/src  -DPCRE_STATIC -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -Isrc/third_party/s2 -Isrc/third_party/boost-1.60.0 -I/opt/mongodbtoolchain/v2/include -Ibuild/debug -Isrc src/third_party/s2/util/math/mathutil.cc
src/third_party/s2/util/math/mathutil.cc:30:24: error: explicit instantiation of 'Round<int, double>' that occurs after an explicit specialization has no effect
      [-Werror,-Winstantiation-after-specialization]
template int MathUtil::Round<int,double>(double x);
                       ^
src/third_party/s2/util/math/mathutil.h:697:24: note: previous template specialization is here
inline int32 MathUtil::Round<int32, double>(double x) {
                       ^
1 error generated.



 Comments   
Comment by Mark Benvenuto [ 19/Oct/17 ]

Talked to billy.donahue, he is building the wrong branch, and so he hit the problem.

Comment by ADAM Martin (Inactive) [ 04/Oct/17 ]

Fixed by SERVER-29887

The issue is caused by a stale build directory after upgrading the compiler.
Please be sure to remove your entire build directory under the source tree after upgrading to a newer version of Xcode.

Generated at Thu Feb 08 04:26:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.