Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
master
-
None
-
None
-
VS 2019 + Windows Server 2016
Description
Hi All,
We tried to build Mesos on Windows with VS2019. It failed to build due to error C2666 with /std:c++latest on Windows using MSVC. It can be reproduced on latest reversion e5a78a7 on master branch. Could you please take a look at this isssue? Thanks a lot!
Reproduce steps:
- git clone https://github.com/apache/mesos.git F:\apache\mesos
- Open a VS 2019 x64 command prompt as admin and browse to F:\apache\mesos
- mkdir build_amd64 && pushd build_amd64
- cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DENABLE_LIBEVENT=1 -DHAS_AUTHENTICATION=0 -DPATCHEXE_PATH="F:\tools\gnuwin32\bin" -T host=x64 ..
- set CL=/std:c++latest
- msbuild /maxcpucount:4 /p:Platform=x64 /p:Configuration=Debug Mesos.sln /t:Rebuild
error:
slave_tests.cpp
F:\gitP\apache\mesos\build_amd64\3rdparty\googletest-1.8.0\src\googletest-1.8.0\googletest\include\gtest/gtest.h(1392,1): error C2666: 'boost::variant<JSON::Null,JSON::String,JSON::Number,boost::recursive_wrapper<JSON::Object>,boost::recursive_wrapper<JSON::Array>,JSON::Boolean>::operator ==': 3 overloads have similar conversions
F:\gitP\apache\mesos\build_amd64\3rdparty\boost-1.65.0\src\boost-1.65.0\boost/blank.hpp(58,13): note: could be 'bool boost::operator ==(const boost::blank &,const boost::blank &)' [found using argument-dependent lookup]
F:\gitP\apache\mesos\3rdparty\stout\include\stout/json.hpp(699,13): note: or 'bool JSON::operator ==(const JSON::Value &,const JSON::Value &)' [found using argument-dependent lookup]
F:\gitP\apache\mesos\build_amd64\3rdparty\boost-1.65.0\src\boost-1.65.0\boost/variant/variant.hpp(2310,10): note: or 'bool boost::variant<JSON::Null,JSON::String,JSON::Number,boost::recursive_wrapper<JSON::Object>,boost::recursive_wrapper<JSON::Array>,JSON::Boolean>::operator ==(const boost::variant<JSON::Null,JSON::String,JSON::Number,boost::recursive_wrapper<JSON::Object>,boost::recursive_wrapper<JSON::Array>,JSON::Boolean> &) const' [synthesized expression 'y == x']
F:\gitP\apache\mesos\build_amd64\3rdparty\boost-1.65.0\src\boost-1.65.0\boost/blank.hpp(58,13): note: or 'bool boost::operator ==(const boost::blank &,const boost::blank &)' [synthesized expression 'y == x']
F:\gitP\apache\mesos\3rdparty\stout\include\stout/json.hpp(699,13): note: or 'bool JSON::operator ==(const JSON::Value &,const JSON::Value &)' [synthesized expression 'y == x']
F:\gitP\apache\mesos\build_amd64\3rdparty\boost-1.65.0\src\boost-1.65.0\boost/variant/variant.hpp(2271,10): note: or 'void boost::variant<JSON::Null,JSON::String,JSON::Number,boost::recursive_wrapper<JSON::Object>,boost::recursive_wrapper<JSON::Array>,JSON::Boolean>::operator ==<T1>(const U &) const' [synthesized expression 'y == x']
with
[
T1=int,
U=int
]
F:\gitP\apache\mesos\build_amd64\3rdparty\googletest-1.8.0\src\googletest-1.8.0\googletest\include\gtest/gtest.h(1392,1): note: while trying to match the argument list '(const T1, const T2)'
with
[
T1=int
]
and
[
T2=JSON::Value
]
F:\gitP\apache\mesos\build_amd64\3rdparty\googletest-1.8.0\src\googletest-1.8.0\googletest\include\gtest/gtest.h(1421): note: see reference to function template instantiation 'testing::AssertionResult testing::internal::CmpHelperEQ<T1,T2>(const char *,const char *,const T1 &,const T2 &)' being compiled
with
[
T1=int,
T2=JSON::Value
]
F:\gitP\apache\mesos\src\tests\slave_tests.cpp(1452): note: see reference to function template instantiation 'testing::AssertionResult testing::internal::EqHelper<false>::Compare<int,JSON::Value>(const char *,const char *,const T1 &,const T2 &)' being compiled
with
[
T1=int,
T2=JSON::Value
]
F:\gitP\apache\mesos\src\tests\slave_tests.cpp(1452): note: see reference to function template instantiation 'testing::AssertionResult testing::internal::EqHelper<false>::Compare<int,JSON::Value>(const char *,const char *,const T1 &,const T2 &)' being compiled
with
[
T1=int,
T2=JSON::Value
]
F:\gitP\apache\mesos\build_amd64\3rdparty\googletest-1.8.0\src\googletest-1.8.0\googletest\include\gtest/gtest.h(1392,11): error C2088: '==': illegal for struct
Attachments
Attachments
Issue Links
- duplicates
-
MESOS-10219 1.11.0 does not build on Windows
- Accepted