[SERVER-42604] MongoDB third_party\boost failed due to "error C2039: 'value': is not a member of 'boost::proto'" under /permissive- + MSVC Created: 02/Aug/19  Updated: 14/Aug/19  Resolved: 14/Aug/19

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: Andrew Morrow (Inactive)
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Sprint: Dev Tools 2019-08-12, Dev Tools 2019-08-26
Participants:

 Description   

Hi All,

MongoDB third_party\boost failed due to "error C2039: 'value': is not a member of 'boost::proto'" under /permissive- mode when built on MSVC. Could you please help take a look at this? Thanks in advance!

Related to Boost/proto PR: https://github.com/boostorg/proto/pull/2. Verified if removed the Boost workaround for MSVC, MongoDB can build successfully too.

You can repro this issue as the steps below:
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. set CL=/permissive-
4. pip.exe install --user -r .\etc\pip\dev-requirements.txt
5. python.exe buildscripts/scons.py all -j4

Error info:

D:\MongoDB\src\src\third_party\boost-1.70.0\boost/proto/generate.hpp(239,20): error C2039: 'value': is not a member of 'boost::proto'
 proto::value(that.proto_expr_) = proto::value(e);
 ^
D:\MongoDB\src\src\third_party\boost-1.70.0\boost/proto/generate.hpp(32): note: see declaration of 'boost::proto'
namespace boost { namespace proto
D:\MongoDB\src\src\third_party\boost-1.70.0\boost/proto/generate.hpp(239,20): note: This diagnostic occurred in the compiler generated function 'Extends<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<MemberClass::* >,boost::proto::argsns_::term<MemberClass::* >::arity>> boost::proto::pod_generator<Extends>::operator ()(const boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<MemberClass::* >,boost::proto::argsns_::term<MemberClass::* >::arity> &) const'
 proto::value(that.proto_expr_) = proto::value(e);
 ^
D:\MongoDB\src\src\third_party\boost-1.70.0\boost/proto/generate.hpp(252): note: see reference to class template instantiation 'boost::proto::pod_generator<Extends>' being compiled
 };
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\include\chrono(670): note: see reference to class template instantiation 'std::chrono::duration<double,std::ratio<1,1>>' being compiled
 constexpr chrono::duration<double> _Ten_days_d\{_Ten_days};
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\include\chrono(178): note: see reference to class template instantiation 'std::chrono::duration<__int64,std::nano>' being compiled
 using rep = typename _Duration::rep;
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\include\chrono(648): note: see reference to class template instantiation 'std::chrono::time_point<std::chrono::steady_clock,std::chrono::steady_clock::duration>' bei



 Comments   
Comment by Andrew Morrow (Inactive) [ 14/Aug/19 ]

QuellaZhang - I'm closing this issue, since I'm unable to reproduce this (our build uses permissive- and works), and haven't heard any additional details from you. Please feel free to follow up with additional information that will help us understand the issue if you would like us to take another look.

Comment by Andrew Morrow (Inactive) [ 12/Aug/19 ]

QuellaZhang - Do you have any follow-up information per my prior comments?

Comment by Andrew Morrow (Inactive) [ 08/Aug/19 ]

QuellaZhang - Thank you for the report. I'm a little puzzled by your repro instructions because a few things don't entirely fit together for me.

  • Second, we build with VS 2017 as our toolchain of record in our CI system since around January, and have not encountered this or any similar error.
  • Third, I do not understand the instruction to set CL=/permissive-. The setting for /permissive- is unconditionally enabled by the MongoDB build system per the above commit. Additionally, our build system doesn't accept CL as a command line argument, nor does it propagate environment variables down to the toolchain invocation. I'd expect any such an argument to the compiler to be provided via CCFLAGS=... on the command line or similar.

Of course, we are very interested in any situation where MongoDB does not correctly build with the Microsoft toolchain. If you could please provide additional context we are happy to help figure out what is causing this breakage and work to find a resolution.

Comment by Danny Hatcher (Inactive) [ 05/Aug/19 ]

Thanks for reporting this issue. We'll look into it.

Generated at Thu Feb 08 05:00:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.