# Internal compiler error in SimpleITK while building Slicer with latest VS2015 compiler

**URL:** <https://discourse.slicer.org/t/internal-compiler-error-in-simpleitk-while-building-slicer-with-latest-vs2015-compiler/4053>\
**Category:** Development\
**Created:** [September 10, 2018, 7:46pm UTC](https://discourse.slicer.org/t/internal-compiler-error-in-simpleitk-while-building-slicer-with-latest-vs2015-compiler/4053 "2018-09-10T19:46:14Z")\
**Posts on this page:** 2\
**Page:** 1

<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:** [September 10, 2018, 7:46pm UTC](https://discourse.slicer.org/t/internal-compiler-error-in-simpleitk-while-building-slicer-with-latest-vs2015-compiler/4053/1 "2018-09-10T19:46:14Z")

</div>

I’ve recently updated my VS2015 compiler (used in VS2017 IDE) to “Microsoft ® Build Engine version 15.8.168+ga8fba1ebd7 for .NET Framework”. With this compiler, I often get compiler crash while trying to build SimpleITK’s sitkScalarConnectedComponentImageFilter:

```
  sitkScalarConnectedComponentImageFilter.cxx

c:\d\s4r\itkv4\modules\segmentation\connectedcomponents\include\itkconnectedcomponentfunctorimagefilter.hxx(41): fatal error C1001: An internal error has occurred in the compiler. [C:\D\S4R\SimpleITK-build\SimpleITK-build\Code\BasicFilters\src\SimpleITK_ITKConnectedComponents.vcxproj] [C:\D\S4R\SimpleITK-build\SimpleITK.vcxproj] [C:\D\S4R\SimpleITK.vcxproj]
 
      (compiler file 'msc1.cpp', line 1518)
 
       To work around this problem, try simplifying or changing the program near the locations listed above.

```

See full logs here: [https://pastebin.com/giSZD6T2](https://pastebin.com/giSZD6T2)

I’ve never had this problem on other computers with VS2017 IDE / VS2015 toolset version “Microsoft ® Build Engine version 15.7.180.61344 for .NET Framework”.

Has anyone else come across this issue?

@blowekamp do you have any suggestion?

---

<div class="post-metadata">

**Author:** ![blowekamp](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/blowekamp/32/1386_2.png) [@blowekamp](https://discourse.slicer.org/u/blowekamp)\
**Post date:** [September 10, 2018, 8:03pm UTC](https://discourse.slicer.org/t/internal-compiler-error-in-simpleitk-while-building-slicer-with-latest-vs2015-compiler/4053/2 "2018-09-10T20:03:31Z")

</div>

ITK had a report of issues with VS 2017 15.8.0:

> **[Visual Studio VS 2017 15.8.0: Internal compiler error with NumericTraits](https://discourse.itk.org/t/visual-studio-vs-2017-15-8-0-internal-compiler-error-with-numerictraits/1205)**
>
> Just for your information: I have filed a bug report here https://developercommunity.visualstudio.com/content/problem/312703/vs-1580-internal-compiler-error.html - since itk’s NumericTraits::max() seem to cause a problem. Best regards, sophonet
