libigl icon indicating copy to clipboard operation
libigl copied to clipboard

Libigl failed to build with error C2275, error C2923, error C2672, error C2955 with msvc under /permissive- mode on Windows

Open Zhaojun-Liu opened this issue 2 years ago • 0 comments

Describe the bug

Libigl failed to build with error C2275, error C2923, error C2672, error C2955 with msvc under /permissive- mode on Windows. The commit we use is the latest 3370a3e. Could you please take a look? Thanks.

Platform

  • [x] Windows
  • [ ] macOS
  • [ ] Linux

Repro steps:

  1. git clone https://github.com/libigl/libigl F:\gitP\libigl\libigl
  2. set CL= /permissive-
  3. mkdir F:\gitP\libigl\libigl\build_amd64 and cd F:\gitP\libigl\libigl\build_amd64
  4. cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DBOOST_ROOT=F:\tools\boost_1_70_0\x64 -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_BUILD_TYPE=Release -DLIBIGL_USE_STATIC_LIBRARY=ON -DLIBIGL_COPYLEFT_CGAL=ON -DLIBIGL_COPYLEFT_COMISO=OFF -DCMAKE_JOB_POOLS=pool-linking=1;pool-compilation=2 -DCMAKE_JOB_POOL_COMPILE:STRING=pool-compilation -DCMAKE_JOB_POOL_LINK:STRING=pool-linking -S .. 2>&1
  5. msbuild /m /p:Platform=x64 /p:Configuration=Release /p:BuildInParallel=true libigl.sln /t:Rebuild 2>&1

Expected result:

build successfully.

Actual result:

F:\gitP\libigl\libigl\build_amd64\_deps\boost-src\boost/multiprecision/cpp_int/comparison.hpp(34,106): error C2275: 'boost::multiprecision::backends::cpp_int_base<0,4294967295,boost::multiprecision::signed_magnitude,boost::multiprecision::unchecked,Allocator,false>::const_limb_pointer': expected an expression instead of a type [F:\gitP\libigl\libigl\build_amd64\igl_copyleft_cgal.vcxproj]
F:\gitP\libigl\libigl\build_amd64\_deps\boost-src\boost/multiprecision/cpp_int/comparison.hpp(34,18): error C2923: 'stdext::checked_array_iterator': 'boost::multiprecision::backends::cpp_int_base<0,4294967295,boost::multiprecision::signed_magnitude,boost::multiprecision::unchecked,Allocator,false>::const_limb_pointer' is not a valid template type argument for parameter '_Ptr' [F:\gitP\libigl\libigl\build_amd64\igl_copyleft_cgal.vcxproj]
F:\gitP\libigl\libigl\build_amd64\_deps\boost-src\boost/multiprecision/cpp_int/comparison.hpp(34,18): error C2955: 'stdext::checked_array_iterator': use of class template requires template argument list (compiling source file F:\gitP\libigl\libigl\include\igl\copyleft\cgal\coplanar.cpp) [F:\gitP\libigl\libigl\build_amd64\igl_copyleft_cgal.vcxproj]
F:\gitP\libigl\libigl\build_amd64\_deps\boost-src\boost/multiprecision/cpp_int/comparison.hpp(33,15): error C2672: 'equal': no matching overloaded function found (compiling source file F:\gitP\libigl\libigl\include\igl\copyleft\cgal\coplanar.cpp) [F:\gitP\libigl\libigl\build_amd64\igl_copyleft_cgal.vcxproj]

VS version: VS 2019 (16.11.11) OS: Windows server 2019 Detailed log: build.log

Zhaojun-Liu avatar Jul 14 '22 08:07 Zhaojun-Liu