mars icon indicating copy to clipboard operation
mars copied to clipboard

Mars failed to build with "error C2182: '__dmb': this use of 'void' is not valid" with MSVC on Windows arm64ec

Open YangYang129 opened this issue 3 years ago • 0 comments

Mars failed to build with "ops_msvc_x86.hpp(46,17): error C2182: '__dmb': this use of 'void' is not valid" with MSVC on Windows arm64ec. I add patch and disable it. Not sure if this is appropriate. Could you please help look at this issue? Patch Attachment: Mars_ARM64EC_C2182.patch.log

Versions and configuration OS: Windows Server 2022 Datacenter VS: Visual Studio 2019(16.11.19) Repro steps:

  1. set VSCMD_SKIP_SENDTELEMETRY=1 & "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=arm64
  2. git clone https://github.com/Tencent/mars F:\mars
  3. git -C "F:\mars" apply f:\Mars_ARM64EC_C2182.patch --ignore-space-change --ignore-whitespace --whitespace=nowarn
  4. cd F:\mars\mars
  5. cmake -G "Visual Studio 16 2019" -A ARM64EC -DCMAKE_SYSTEM_VERSION=10.0.22618.0 -DCMAKE_BUILD_TYPE=Release ..
  6. msbuild /m /p:Platform=ARM64EC /p:Configuration=Release /p:PlatformToolset=v142 mars.sln /t:Rebuild

Note: If delete step 3 of apply this patch, the following errors are displayed:

15>F:\mars\mars\boost/atomic/detail/ops_msvc_x86.hpp(46,17): error C2182: '__dmb': this use of 'void' is not valid (compiling source file F:\mars\mars\boost\libs\atomic\src\lockpool.cpp) [F:\mars\mars\build_arm64ec\boost\mars-boost.vcxproj]
         Unknown compiler version - please run the configure tests and report the results
    15>F:\mars\mars\boost/atomic/detail/ops_msvc_x86.hpp(46,17): error C2365: '__dmb': redefinition; previous definition was 'function' (compiling source file F:\mars\mars\boost\libs\atomic\src\lockpool.cpp) [F:\mars\mars\build_arm64ec\boost\mars-boost.vcxproj]

YangYang129 avatar Sep 20 '22 07:09 YangYang129