Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MSVC] Taichi failed with error G030630B7: static assertion failed: Unexpected size #8520

Open
NEIL-smtg opened this issue Apr 24, 2024 · 1 comment

Comments

@NEIL-smtg
Copy link

Describe the bug
We've been using MSVC to build Taichi, and we've recently encountered the following error:

error G030630B7: static_assert failed "Unexpected size"
static_assert(false, "Unexpected size");
^             ~~~~~

Our developer has suggested the compiler that was used needs to implement the Defect Report https://cplusplus.github.io/CWG/issues/2518.html (which has been implemented by MSVC and Clang).

To Reproduce:

  1. Open "x64 Native Tools Command Prompt for VS 2022"
  2. git clone https://github.com/taichi-dev/taichi.git
  3. cd /d C:\gitP\taichi-dev\taichi\bin
  4. copy "C:\gitP\taichi-dev\taichi\bin\clang\bin\clang++.exe" "C:\gitP\taichi-dev\taichi\bin\clang\bin\clang.exe"
  5. python -m pip install --upgrade pip
  6. set PATH=%APPDATA%\Python\Python311\Scripts;C:\gitP\taichi-dev\taichi\bin\llvm\bin;C:\gitP\taichi-dev\taichi\bin\clang\bin;%PATH%
  7. pip3 install --user gitpython
  8. pip3 install --user pybind11
  9. set VSCMD_SKIP_SENDTELEMETRY=1 & "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64
  10. cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.22621.0 -DCMAKE_TOOLCHAIN_FILE=C:\gitP\Microsoft\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DTI_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release -Dgtest_force_shared_crt=TRUE -DPYTHON_EXECUTABLE=C:\Python311\python.exe .. 2>&1
  11. msbuild /m /p:Platform=x64 /p:Configuration=Release taichi.sln /t:Rebuild 2>&1

Expected result:
Build successfully.

Log/Screenshots
Build (1).log (search error G030630B7)

Operating system
Windows server 2022 data center

@StephanTLavavej
Copy link

Note that this involves microsoft/STL#4591 , a very recent change to MSVC's STL. To reproduce this, you'll either need to build and consume our open-source STL, or wait for VS 2022 17.11 Preview 2 to ship which will contain this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Untriaged
Development

No branches or pull requests

2 participants