[SERVER-36695] MongoDB failed when build on MSVC on windows Created: 16/Aug/18  Updated: 27/Oct/23  Resolved: 16/Aug/18

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

Type: Bug Priority: Major - P3
Reporter: QuellaZhang [X] Assignee: Unassigned
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File mongodb.patch    
Operating System: ALL
Steps To Reproduce:

Repro:
 1. git clone -c core.autocrlf=true https://github.com/mongodb/mongo D:\MongoDB\src
 2. Open a VS 2017 x64 command prompt and browse to D:\MongoDB\src
 3. pip.exe install -r .\buildscripts\requirements.txt
 4. set CL=/wd4756 /wd4056
 5. scons all -j4

Failures:
 D:\MongoDB\src\src\mongo/db/ftdc/collector.h(61): error C2039: 'string': is not a member of 'std'
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\include\vector(19): note: see declaration of 'std'
D:\MongoDB\src\src\mongo/db/ftdc/collector.h(61): error C3646: 'name': unknown override specifier
D:\MongoDB\src\src\mongo/db/ftdc/collector.h(61): error C2059: syntax error: ')'
D:\MongoDB\src\src\mongo/db/ftdc/collector.h(61): error C2238: unexpected token(s) preceding ';'
Unknown compiler version - please run the configure tests and report the results
D:\MongoDB\src\src\mongo\db\ftdc\collector.cpp(73): error C2039: 'name': is not a member of 'mongo::FTDCCollectorInterface'
D:\MongoDB\src\src\mongo/db/ftdc/collector.h(50): note: see declaration of 'mongo::FTDCCollectorInterface'

Participants:

 Description   

Build MongoDB on msvc failed with error C2039, C3646, C2059, C2238. this issue can be reproduced from master revision 65bfd4b. Could you please help take a look at this? Noted that this issue only found when compiles with unreleased vctoolset, that next release of MSVC will have this behavior.



 Comments   
Comment by QuellaZhang [X] [ 17/Aug/18 ]

Thanks Andrew! We apply patch to support MongoDB building with VS2017,  I will attach this patch. After apply this patch, you can repro this issue.mongodb.patch

Thank you very much!

Comment by Andrew Morrow (Inactive) [ 16/Aug/18 ]

MongoDB doesn't currently support building with VS2017. You will need to build with VS2015. Updates to support VS2017 will arrive with MongoDB 4.2.

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