[SERVER-38176] MongoDB failed to buid with /permissive- performance on MSVC Created: 16/Nov/18  Updated: 29/Oct/23  Resolved: 01/Feb/19

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

Type: Task Priority: Major - P3
Reporter: QuellaZhang [X] Assignee: Henrik Edin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

VS 2017 + Windows Server 2016 + MongoDB master branch latest revision


Attachments: Text File mongodb.patch    
Issue Links:
Duplicate
is duplicated by SERVER-33112 Implement InjectThirdPartyEnvironment... Closed
Backwards Compatibility: Fully Compatible
Sprint: Dev Tools 2019-02-11
Participants:

 Description   

MongoDB failed to buid with /permissive- performance on MSVC. We use latest version of MongoDB to test VS copmlier. And we know building MongoDB with VS 2017 is currently not supported, so we apply patch to support this, I attach this patch. Could you please help to take a look at this? Thanks in advance!

  1. repro steps:
     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. git apply mongodb.patch
     4. pip.exe install -r .\buildscripts\requirements.txt
     5. scons all -j4 CXXFLAGS="/wd4756 /wd4056 /permissive-"

Failures:
network_interface_factory.cpp
Unknown compiler version - please run the configure tests and report the results
D:\MongoDB\src\src\mongo/util/future.h(1430): error C3861: 'SharedState': identifier not found
D:\MongoDB\src\src\mongo/util/future.h(1441): error C3861: 'SharedState': identifier not found



 Comments   
Comment by Githook User [ 01/Feb/19 ]

Author:

{'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}

Message: SERVER-38176 Compile with /permissive- on MSVC to make the compiler strictly standard conformant.
Branch: master
https://github.com/mongodb/mongo/commit/66430d75e33827da60195deb317058c71f75e03f

Comment by Githook User [ 01/Feb/19 ]

Author:

{'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}

Message: SERVER-38176 Compile with /permissive- on MSVC and fix deprecated use of std::iterator.
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/73ff4ba8ac960f8e16aa5a313b78726e7718d20e

Comment by Andrew Morrow (Inactive) [ 29/Jan/19 ]

henrik.edin - This work should include removing _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS, _SILENCE_FPOS_SEEKPOS_DEPRECATION_WARNING, and any no-longer-relevant warning suppressions from the top-level SConstruct, to the extent possible without requiring extensive modifications to third party software.

Comment by QuellaZhang [X] [ 04/Dec/18 ]

New error found in the same files "D:\MongoDB\src\src\mongo\util\future.h" on latest version 88bcf42 under /permissive- mode with VS2017.

Failures:

D:\MongoDB\src\src\mongo/util/future.h(1657): error C3861: 'make_intrusive': identifier not found
D:\MongoDB\src\src\mongo/util/future.h(1657): error C3861: 'SharedState': identifier not found

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

QuellaZhang - Please note that we are right in the middle of our upgrade to VS 2017 and C++17, so we will almost certainly be fixing this. Thanks for reporting it. We really think it is fantastic that Microsoft uses the MongoDB codebase as a test case for the compiler, and we are excited to get upgraded to VS2017.

Comment by QuellaZhang [X] [ 16/Nov/18 ]

Please ignore that horizontal line in repro steps 5, and it's '/permissive-' not '/permissive'. I don't know why it is displayed like this. I try lots of times.

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