You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "QuellaZhang (Jira)" <ji...@apache.org> on 2022/02/16 08:26:00 UTC

[jira] [Created] (MESOS-10236) [/std:c++latest][MSVC] Mesos failed to build due to error C2440 with /std:c++latest on Windows using MSVC

QuellaZhang created MESOS-10236:
-----------------------------------

             Summary: [/std:c++latest][MSVC] Mesos failed to build due to error C2440 with /std:c++latest on Windows using MSVC
                 Key: MESOS-10236
                 URL: https://issues.apache.org/jira/browse/MESOS-10236
             Project: Mesos
          Issue Type: Bug
          Components: build
    Affects Versions: master
         Environment: VS 2019 + Windows Server 2016
            Reporter: QuellaZhang
         Attachments: build.log

Hi All,

We tried to build Mesos on Windows with VS2019. It failed to build due to error C2440 with /std:c++latest on Windows using MSVC. It can be reproduced on latest reversion 97d9a40 on master branch. Could you please take a look at this isssue? Thanks a lot!

Reproduce steps:
# git clone https://github.com/apache/mesos 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 /Zc:char8_t-
# set _CL_= /D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING %_CL_%
# msbuild /maxcpucount:4 /p:Platform=x64 /p:Configuration=Debug Mesos.sln /t:Rebuild

error:
F:\gitP\apache\mesos\build_amd64\3rdparty\protobuf-3.5.0\src\protobuf-3.5.0\src\google\protobuf\compiler\objectivec\objectivec_helpers.cc(618,1): error C2440: 'return': cannot convert from 'int' to 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
F:\gitP\apache\mesos\build_amd64\3rdparty\protobuf-3.5.0\src\protobuf-3.5.0\src\google\protobuf\compiler\objectivec\objectivec_helpers.cc(746,1): error C2440: 'return': cannot convert from 'int' to 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
F:\gitP\apache\mesos\build_amd64\3rdparty\protobuf-3.5.0\src\protobuf-3.5.0\src\google\protobuf\compiler\objectivec\objectivec_helpers.cc(818,1): error C2440: 'return': cannot convert from 'int' to 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'F:\gitP\apache\mesos\build_amd64\CMakeFiles\c2387485d1f3dbc1b6a74fd6bcbf1c42\protobuf-3.5.0-mkdir.rule;F:\gitP\apache\mesos\build_amd64\CMakeFiles\c2387485d1f3dbc1b6a74fd6bcbf1c42\protobuf-3.5.0-download.rule;F:\gitP\apache\mesos\build_amd64\CMakeFiles\c2387485d1f3dbc1b6a74fd6bcbf1c42\protobuf-3.5.0-update.rule;F:\gitP\apache\mesos\build_amd64\CMakeFiles\c2387485d1f3dbc1b6a74fd6bcbf1c42\protobuf-3.5.0-patch.rule;F:\gitP\apache\mesos\build_amd64\CMakeFiles\c2387485d1f3dbc1b6a74fd6bcbf1c42\protobuf-3.5.0-configure.rule;F:\gitP\apache\mesos\build_amd64\CMakeFiles\c2387485d1f3dbc1b6a74fd6bcbf1c42\protobuf-3.5.0-build.rule;F:\gitP\apache\mesos\build_amd64\CMakeFiles\c2387485d1f3dbc1b6a74fd6bcbf1c42\protobuf-3.5.0-install.rule;F:\gitP\apache\mesos\build_amd64\CMakeFiles\391b5defe1e7774ea47783fbd33671f6\protobuf-3.5.0-complete.rule;F:\gitP\apache\mesos\build_amd64\CMakeFiles\3e040e27eb7e35ec141c0982bf4a7993\protobuf-3.5.0.rule;F:\gitP\apache\mesos\3rdparty\CMakeLists.txt' exited with code 1.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)