Operational Defect Database

BugZero found this defect 2454 days ago.

MongoDB | 391564

[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

Last update date:

10/30/2023

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

3.5.9

Description:

Info

MongoDB failed to buid due to error C2512: 'boost::unordered::unordered_set&lt;mongo::LogicalSessionId,mongo::LogicalSessionId::Hash,std::equal_to&lt;T&gt;,std::allocator&lt;T&gt;&gt;': 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: The related code in logical_seesion_cache_test.cpp stdx::promise&lt;int&gt; hitRefresh; auto refreshFuture = hitRefresh.get_future(); // Advance time to first refresh point, check that refresh happens, and // that it includes both our records sessions()-&gt;setRefreshHook(&#91;&amp;hitRefresh&#93;(LogicalSessionIdSet sessions) -&gt; LogicalSessionIdSet { hitRefresh.set_value(sessions.size()); return {}; }); If we change the code as below. There is no error reported. stdx::promise&lt;int&gt; hitRefresh;* to stdx::promise&lt;LogicalSessionId&gt; hitRefresh;*

Top User Comments

mark.benvenuto commented on Thu, 8 Jun 2017 14:02:20 +0000: 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 acm commented on Thu, 8 Jun 2017 13:41:12 +0000: 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. mark.benvenuto commented on Thu, 8 Jun 2017 13:38:00 +0000: 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. milkie commented on Thu, 8 Jun 2017 12:57:23 +0000: From these messages in the log, they suggest you are not actually using VS 2015's compiler: Unknown compiler version - please run the configure tests and report the results This message is output by Boost headers when you are running a Visual Studio compiler that is newer than the ones it can detect &#8211; for example, this message appears when you are compiling with Visual Studio 2017.

Additional Resources / Links

Share:

BugZero Risk Score

Coming soon

Status

Closed

Have you been affected by this bug?

cost-cta-background

Do you know how much operational outages are costing you?

Understand the cost to your business and how BugZero can help you reduce those costs.

Discussion

Login to read and write comments.

Have you ever...

had your data corrupted from a

VMware

bug?

Search:

...