You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Zhaojun (Jira)" <ji...@apache.org> on 2024/05/11 02:15:00 UTC
[jira] [Created] (MESOS-10242) [MSVC] Mesos failed to build due to error C2039: 'cgroupsV2': is not a member of 'mesos::internal::tests::ContainerizerTest'
Zhaojun created MESOS-10242:
-------------------------------
Summary: [MSVC] Mesos failed to build due to error C2039: 'cgroupsV2': is not a member of 'mesos::internal::tests::ContainerizerTest<mesos::internal::slave::MesosContainerizer>'
Key: MESOS-10242
URL: https://issues.apache.org/jira/browse/MESOS-10242
Project: Mesos
Issue Type: Bug
Environment: The commit of Mesos we used: 5d6d386
VS version: VS 2022 17.9.5
OS: Windows Server 2022
Reporter: Zhaojun
Attachments: image-2024-05-11-09-50-42-947.png
Mesos failed to build with MSVC on Windows due to below errors:
src\tests\mesos.cpp(868,52): error C2039: 'cgroupsV2': is not a member of 'mesos::internal::tests::ContainerizerTest<mesos::internal::slave::MesosContainerizer>'
src\tests\containerizer\memory_isolator_tests.cpp(155,37): error C2653: 'cgroups': is not a class or namespace name.
Repro steps:
# git clone [https://github.com/apache/mesos] C:\gitP\apache
# set _CL_=/D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING /D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS /wd4061
# mkdir C:\gitP\apache\mesos\build_amd64 and cd /d C:\gitP\apache\mesos\build_amd64
# set PATH=C:\Program Files\Git\usr\bin;%PATH%
# cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.22621.0 -DENABLE_LIBEVENT=1 -DHAS_AUTHENTICATION=0 -DPATCHEXE_PATH="C:\Program Files\Git\usr\bin" -T host=x64 ..
# msbuild /maxcpucount:4 /p:Platform=x64 /p:Configuration=Debug Mesos.sln /t:Rebuild
Note:
I tried to add '#ifdef __linux__' and '#endif' to file [https://github.com/apache/mesos/blob/master/src/tests/containerizer/memory_isolator_tests.cpp#L153:L167] to wrap lines 153-167 and update file [https://github.com/apache/mesos/blob/master/src/tests/mesos.cpp], move the code '#endif // __linux__' on line 865 to line 880, the errors disappeared.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)