# C1001: Internal compiler error

**URL:** <https://discourse.slicer.org/t/c1001-internal-compiler-error/29604>\
**Category:** Support\
**Tags:** build\
**Created:** [May 23, 2023, 1:37pm UTC](https://discourse.slicer.org/t/c1001-internal-compiler-error/29604 "2023-05-23T13:37:15Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ngo\_Minh\_Toan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ngo_minh_toan/32/66077_2.png) [@Ngo\_Minh\_Toan](https://discourse.slicer.org/u/Ngo_Minh_Toan)\
**Post date:** [May 23, 2023, 1:37pm UTC](https://discourse.slicer.org/t/c1001-internal-compiler-error/29604/1 "2023-05-23T13:37:16Z")

</div>

I tried to build the latest Slicer on Windows using CMake 3.26.3 and Visual Studio 2022 17.6.1 with the prerequisites have met ([Windows — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/windows.html#install-prerequisites))  
CMake configure and generate the Release build were done without any error  
However, during the Release by Visual Studio there was an error

| 12:18:40:263 | 13\>E:\S\B\VTK\ThirdParty\ioss\vtkioss\private\_copy\_fmt\fmt/ostream.h(32,1): fatal error C1001: Internal compiler error. [E:\S\B\VTK-build\ThirdParty\ioss\vtkioss\ioss.vcxproj] |
| --- | --- |
| 12:18:40:263 | 13\> (compiler file ‘msc1.cpp’, line 1589) |
| then | |
| 12:34:22:973 | 13\>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(248,5): error MSB8066: Custom build for ‘E:\S\B\CMakeFiles\2f3b8b1f079799e3ffdef766991c1db2\VTK-mkdir.rule;E:\S\B\CMakeFiles\2f3b8b1f079799e3ffdef766991c1db2\VTK-download.rule;E:\S\B\CMakeFiles\2f3b8b1f079799e3ffdef766991c1db2\VTK-update.rule;E:\S\B\CMakeFiles\2f3b8b1f079799e3ffdef766991c1db2\VTK-patch.rule;E:\S\B\CMakeFiles\2f3b8b1f079799e3ffdef766991c1db2\VTK-configure.rule;E:\S\B\CMakeFiles\2f3b8b1f079799e3ffdef766991c1db2\VTK-build.rule;E:\S\B\CMakeFiles\2f3b8b1f079799e3ffdef766991c1db2\VTK-create\_egg\_info.rule;E:\S\B\CMakeFiles\2f3b8b1f079799e3ffdef766991c1db2\VTK-generate\_project\_description.rule;E:\S\B\CMakeFiles\2f3b8b1f079799e3ffdef766991c1db2\VTK-install.rule;E:\S\B\CMakeFiles\37951788506b17b75cca77d1d45f0dfb\VTK-complete.rule;E:\S\B\CMakeFiles\9e8337cb89344f33c6ac88b23a164fd9\VTK.rule;E:\S\S\CMakeLists.txt’ exited with code 1. |
| — | — |
| 12:34:22:985 | 13\>Done building project VTK.vcxproj – FAILED. |
| Is there any way to overcome this problem? | |

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [May 23, 2023, 1:55pm UTC](https://discourse.slicer.org/t/c1001-internal-compiler-error/29604/2 "2023-05-23T13:55:41Z")

</div>

I’ve built Slicer on Windows thousands of times but I haven’t run into this issue.

Are you building the latest Slicer `main` branch?

What is the build toolset version?  
Mine is `14.34.31933`, as in the top-level CMakeCache.txt I have a line like this:  
`CMAKE_AR:FILEPATH=C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/lib.exe`

---

<div class="post-metadata">

**Author:** ![Ngo\_Minh\_Toan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ngo_minh_toan/32/66077_2.png) [@Ngo\_Minh\_Toan](https://discourse.slicer.org/u/Ngo_Minh_Toan)\
**Post date:** [May 23, 2023, 3:32pm UTC](https://discourse.slicer.org/t/c1001-internal-compiler-error/29604/3 "2023-05-23T15:32:52Z")

</div>

Thank for the quick response  
I used the git for the Slicer according to the guide [Windows — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/windows.html#install-prerequisites) which is [GitHub - Slicer/Slicer: Multi-platform, free open source software for visualization and image computing.](https://github.com/Slicer/Slicer.git)  
The toolset I used is C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/lib.exe

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [May 23, 2023, 5:01pm UTC](https://discourse.slicer.org/t/c1001-internal-compiler-error/29604/4 "2023-05-23T17:01:32Z")

</div>

New compiler versions often need some time to get stable, so it is usually better not to use the very latest version. You can downgrade to toolset version 14.34, by opening the Visual Studio Installer application, choose Modify, choose “Individual components” tab, and unselect MSVC… build tools (Latest)" and select a 14.34 instead.

You can also open VTK build settings in CMake and disable all modules that refer to IOSS.

@jcfr It seems that this problematic private copy of the `fmt` library has been removed in VTK-9.2.0 (in September 2022). Could we rebase Slicer’s VTK on a recent VTK version? The amount of backported fixes (and the lots more fixes that we have not backported) is becoming a bit worrying.

---

<div class="post-metadata">

**Author:** ![Ngo\_Minh\_Toan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ngo_minh_toan/32/66077_2.png) [@Ngo\_Minh\_Toan](https://discourse.slicer.org/u/Ngo_Minh_Toan)\
**Post date:** [May 23, 2023, 7:14pm UTC](https://discourse.slicer.org/t/c1001-internal-compiler-error/29604/5 "2023-05-23T19:14:38Z")

</div>

I have disabled all modules referring to the IOSS and have successfully built the Slicer without any error  
Thank you

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [May 30, 2023, 7:24pm UTC](https://discourse.slicer.org/t/c1001-internal-compiler-error/29604/7 "2023-05-30T19:24:47Z")

</div>

We got another report at [faild to install the debug and release version of slicer multipy times · Issue #6990 · Slicer/Slicer · GitHub](https://github.com/Slicer/Slicer/issues/6990)

@jcfr we’ll probably get just more and more reports like this (unless Microsoft very quickly releases a new compiler revision). To avoid frustrating many developers, could we upgrade Slicer’s VTK? Recent VTK versions don’t contain the file that crashes the MSVC compiler.

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [May 30, 2023, 7:27pm UTC](https://discourse.slicer.org/t/c1001-internal-compiler-error/29604/8 "2023-05-30T19:27:31Z")

</div>

> Could we rebase Slicer’s VTK on a recent VTK version?

Indeed, a pull-request is being worked on.

---

<div class="post-metadata">

**Author:** ![slicer365](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/slicer365/32/67549_2.png) [@slicer365](https://discourse.slicer.org/u/slicer365)\
**Post date:** [July 17, 2023, 4:54am UTC](https://discourse.slicer.org/t/c1001-internal-compiler-error/29604/9 "2023-07-17T04:54:30Z")

</div>

Can you tell me how to disable all modules referring to the IOSS?  
I met the same problems during rebuilding.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 17, 2023, 5:07pm UTC](https://discourse.slicer.org/t/c1001-internal-compiler-error/29604/10 "2023-07-17T17:07:21Z")

</div>

I would recommend to not mess with the configuration but instead update to the latest Slicer main version.

---

<div class="post-metadata">

**Author:** ![slicer365](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/slicer365/32/67549_2.png) [@slicer365](https://discourse.slicer.org/u/slicer365)\
**Post date:** [July 18, 2023, 12:18am UTC](https://discourse.slicer.org/t/c1001-internal-compiler-error/29604/11 "2023-07-18T00:18:56Z")

</div>

Thank you ,I solved the problem after I changed the MSVC tool to version 14.34
