QuellaZhang created MESOS-10212:
-----------------------------------
Summary: [/std:c++latest][MSVC] Mesos failed to build due to error
C2666 with /std:c++latest on Windows using MSVC
Key: MESOS-10212
URL: https://issues.apache.org/jira/browse/MESOS-10212
Project: Mesos
Issue Type: Bug
Components: build
Affects Versions: master
Environment: VS 2019 + Windows Server 2016
Reporter: QuellaZhang
Attachments: build.7z
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:
F:\gitP\apache\mesos\3rdparty\stout\include\stout/gtest.hpp(88,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 (compiling source file
F:\gitP\apache\mesos\3rdparty\stout\tests\json_tests.cpp)
[F:\gitP\apache\mesos\build_amd64\3rdparty\stout\tests\stout-tests.vcxproj]
F:\gitP\apache\mesos\3rdparty\stout\include\stout/gtest.hpp(88,18): error
C2088: '==': illegal for struct (compiling source file
F:\gitP\apache\mesos\3rdparty\stout\tests\json_tests.cpp)
[F:\gitP\apache\mesos\build_amd64\3rdparty\stout\tests\stout-tests.vcxproj]
F:\gitP\apache\mesos\3rdparty\stout\include\stout/gtest.hpp(88,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 (compiling source file
F:\gitP\apache\mesos\3rdparty\stout\tests\protobuf_tests.cpp)
[F:\gitP\apache\mesos\build_amd64\3rdparty\stout\tests\stout-tests.vcxproj]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)