...
BugZero found this defect 2744 days ago.
MongoDB failed to buid due to error C2512: 'boost::unordered::unordered_set,std::allocator>': 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 hitRefresh; auto refreshFuture = hitRefresh.get_future(); // Advance time to first refresh point, check that refresh happens, and // that it includes both our records sessions()->setRefreshHook([&hitRefresh](LogicalSessionIdSet sessions) -> LogicalSessionIdSet { hitRefresh.set_value(sessions.size()); return {}; }); If we change the code as below. There is no error reported. stdx::promiseint> hitRefresh;* to stdx::promiseLogicalSessionId> hitRefresh;*
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 – for example, this message appears when you are compiling with Visual Studio 2017.
*Environment: * Windows Sever 2012 R2 + VS2015 Update 3 + MongoDB master branch latest revision Reproduce steps: 1. git clone -c core.autocrlf=true https://github.com/mongodb/mongo D:\MongoDB\src 2. Open a VS 2015 x64 command prompt and browse to D:\MongoDB\src 3. pip.exe install -r .\buildscripts\requirements.txt 4. scons all -j4 Acutal result: src\mongo\db\logical_session_cache_test.cpp(247): error C2512: 'boost::unordered::unordered_set,std::allocator>': no appropriate default constructor available with [ T=mongo::LogicalSessionId ] src\mongo\db\logical_session_cache_test.cpp(247): note: Constructor for class 'boost::unordered::unordered_set,std::allocator>' is declared 'explicit' with [ T=mongo::LogicalSessionId ] scons: *** [build\opt\mongo\db\logical_session_cache_test.obj] Error 2