Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-8686

Mesos build failed with /permissive- + MSVC on windows

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.0
    • Component/s: build
    • Labels:
    • Environment:

      VS2017 15.5.7 + windows server 2016

      Description

      Mesos(master branch) failed with error C2276 when build with permissive- with MSVC, this should be source issue, the code is trying to use a member function of a dependent base class. 

      Noted that this issue only found when compiles with unreleased vctoolset, that next release of MSVC will have this behavior.

       

      On line#528 and #529 of "D:\Mesos\src\3rdparty\libprocess\src\tests\benchmarks.cpp"

          dispatch(self(), &Self::_handler).then(

              defer(self(), &Self::handler<T>, data));

       

      Should be

          dispatch(this->self(), &Self::_handler).then(

              defer(this->self(), &Self::handler<T>, data));

       

      Failures like

      D:\Mesos\src\3rdparty\libprocess\src\tests\benchmarks.cpp(566): error C2276: '&': illegal operation on bound member function expression

       

      Environment:

      VS2017 15.5.7 + windows server 2016

       

      Repro steps:

      1. git clone -c core.autocrlf=true https://github.com/apache/mesos D:\mesos\src
      2. cd d:\mesos\src
      3. .\bootstrap.bat
      4. cd..
      5. set CL=/D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING /permissive-
      6. mkdir build_x64 && pushd build_x64
      7. cmake ..\src -G "Visual Studio 15 2017 Win64" -DCMAKE_SYSTEM_VERSION=10.0.16299.0 -DENABLE_LIBEVENT=1 -DHAS_AUTHENTICATION=0 -DPATCHEXE_PATH="C:\gnuwin32\bin" -T host=x64
      8. msbuild Mesos.sln /p:Configuration=Debug /p:Platform=x64 /maxcpucount:4 /t:Rebuild

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                andschwa Andrew Schwartzmeyer
                Reporter:
                PhoebeHui PhoebeHui
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: