[SERVER-29511] MongoDB failed to build due to error C2512: 'boost::unordered::unordered_set<mongo::LogicalSessionId,mongo::LogicalSessionId::Hash,std::equal_to<T>,std::allocator<T>>': no appropriate default constructor available Created: 08/Jun/17 Updated: 30/Oct/23 Resolved: 12/Jun/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | None |
| Fix Version/s: | 3.5.9 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | KarenHuang [X] | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Steps To Reproduce: | *Environment: * Reproduce steps: Acutal result: |
| Participants: |
| Description |
|
MongoDB failed to buid due to error C2512: 'boost::unordered::unordered_set<mongo::LogicalSessionId,mongo::LogicalSessionId::Hash,std::equal_to<T>,std::allocator<T>>': no appropriate default constructor available. This issue is caused by revision 4c3337ahttps://github.com/mongodb/mongo/commit/4c3337abe512a37c8e4cb22e16eafcd04bc5bd3a Could you pleaes help to take a look at this? Thanks in advance! Some investigate on my side: // Advance time to first refresh point, check that refresh happens, and If we change the code as below. There is no error reported. |
| Comments |
| Comment by Mark Benvenuto [ 08/Jun/17 ] | |
|
Actually, this was caught by are internal continuous integration system with VS 2015. The "unknown compiler version" messages were unrelated. The commit as been reverted: https://github.com/mongodb/mongo/commit/12e54a966bde02389224b78db6500978ca68a54e | |
| Comment by Andrew Morrow (Inactive) [ 08/Jun/17 ] | |
|
Also, is there a reason that you are building the master branch of MongoDB? It is under active development, so it will be found to be broken at times, and the resulting binaries should definitely not be used for production work. If you want to run MongoDB, it would be much better to download one of the pre-built packages from https://www.mongodb.com/download-center. | |
| Comment by Mark Benvenuto [ 08/Jun/17 ] | |
|
I can only reproduce this error if I try compiling MongoDB with VS 2017 (which required several patches). It does not reproduce with VS 2015 Update 3. Try running "python buildscripts\scons.py" instead of the install scons. The scons included in our source tree will never try to use VS 2017 at this time. | |
| Comment by Eric Milkie [ 08/Jun/17 ] | |
|
From these messages in the log, they suggest you are not actually using VS 2015's compiler:
This message is output by Boost headers when you are running a Visual Studio compiler that is newer than the ones it can detect – for example, this message appears when you are compiling with Visual Studio 2017. |