# 3D slicer Windows 10 Build Fail (only SimpleITK project)

**URL:** https://discourse.slicer.org/t/3d-slicer-windows-10-build-fail-only-simpleitk-project/6727
**Category:** Development
**Created:** [May 8, 2019, 3:41am UTC](https://discourse.slicer.org/t/3d-slicer-windows-10-build-fail-only-simpleitk-project/6727 "2019-05-08T03:41:35Z")
**Posts on this page:** 15
**Page:** 2

<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 10, 2019, 2:55pm UTC](https://discourse.slicer.org/t/3d-slicer-windows-10-build-fail-only-simpleitk-project/6727/21 "2019-05-10T14:55:35Z")

</div>

> [@jamesobutler](#):
>
> but I don’t see the backported commit in the github master-410 branch. Maybe it was only done in the SVN master-410 branch?

Good catch. The sync of svn maintenance branch with GitHub is not automated. Should be good now.

---

<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 10, 2019, 3:11pm UTC](https://discourse.slicer.org/t/3d-slicer-windows-10-build-fail-only-simpleitk-project/6727/22 "2019-05-10T15:11:39Z")

</div>

For reference, I also just updated the [ReleaseProcess#Backport\_commit\_into\_release\_branch](https://www.slicer.org/wiki/Documentation/Nightly/Developers/ReleaseProcess#Backport_commit_into_release_branch) guide

---

<div class="post-metadata">

### Author: ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)
#### Post date: [May 10, 2019, 6:09pm UTC](https://discourse.slicer.org/t/3d-slicer-windows-10-build-fail-only-simpleitk-project/6727/23 "2019-05-10T18:09:23Z")

</div>

I deleted the SimpleITK folders from my C:/S4D directory, fetched the latest from Slicer master-410 branch, configured the cmake project again in Cmake GUI and built again. SimpleITK began building correctly and the project has now officially built successfully. 🎉

@jcfr [https://github.com/Slicer/Slicer/commit/ebce522e0cb99a5e312800c6f01bc49e237942da](https://github.com/Slicer/Slicer/commit/ebce522e0cb99a5e312800c6f01bc49e237942da) Works well in the master-410 branch. I did notice that the comment for the tag line is incorrect. Technically

```auto
"e52c9ab047b514ef9584fef475e0ed416ad8fa4a" # slicer-v1.2.0-2019-02-27-dc5c1a1 (based of v1.1.0 tag)

```

should be

```auto
"e52c9ab047b514ef9584fef475e0ed416ad8fa4a" # slicer-v1.1.0-2018-03-21-dbc8dfe (based of v1.1.0 tag)

```

but not a big deal.

---

<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 10, 2019, 6:23pm UTC](https://discourse.slicer.org/t/3d-slicer-windows-10-build-fail-only-simpleitk-project/6727/24 "2019-05-10T18:23:35Z")

</div>

> [@jamesobutler](#):
>
> SimpleITK began building correctly and the project has now officially built successfully

👍

> [@jamesobutler](#):
>
> well in the master-410 branch. I did notice that the comment for the tag line is incorrect.

Thanks for reporting. This is now fixed.

---

<div class="post-metadata">

### Author: ![Saima](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Saima](https://discourse.slicer.org/u/Saima)
#### Post date: [July 19, 2019, 4:38am UTC](https://discourse.slicer.org/t/3d-slicer-windows-10-build-fail-only-simpleitk-project/6727/25 "2019-07-19T04:38:24Z")

</div>

Hi James,  
I am building slicer in release mode.

Specifications:  
Slicer 4.10 which I downloaded thorugh  
svn co [http://svn.slicer.org/Slicer4/branches/Slicer-4-10](http://svn.slicer.org/Slicer4/branches/Slicer-4-10) Slicer-r28257 -r 28257  
cmake 3.14.6 msvc 2017  
VS 2017 community edition

cmake configuration:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/d/bdfc09f1c947a14ae1bf1d18b498228ae0f2cf99.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/a/2abbb7818e39ab73aa6ee6609559abc37b570cf4.png)

Qt 5.11.0 with msvc 2017 x64 with qtwebengine and qt script

Then I run the slicer.sln in release mode with x64 selected in the active solution platform of vs 2017  
build failed:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/e/7e6ce14381b7ced6d24a301337cb5c58575fda17.jpeg)

Error list

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/c/0c12e7f1fe114d161ed68fdc04a4c5f68009acaf.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/6/c6348861dc06fc5669381276fe52453db346f054.jpeg)

Need help to build the slicer what am I doing wrong. can t understand.  
cmake configurations

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/d/7d0df50cc67a31a08aac4e9afa1731d97e656d73.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/e/feb3f227c6420a5120e61e37c2c6eac11a546369.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/7/a7a0a999cd228c626e0b684d2f3eca7cf7c9b43f.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/3/f3f073d4c9fb2b6be05516b8effbdd9c1a96dfb3.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/c/bca38fc5febfa142911ee9ae385fbb14bb22877e.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/0/4042d4be740969ba40075899fb1feefcc42bca86.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/6/e6d74909f252acfd41def506ad7d89f8f4212440.png)

---

<div class="post-metadata">

### Author: ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)
#### Post date: [July 19, 2019, 10:52am UTC](https://discourse.slicer.org/t/3d-slicer-windows-10-build-fail-only-simpleitk-project/6727/26 "2019-07-19T10:52:46Z")

</div>

@Saima Please read and follow the build instructions carefully (see [https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build\_Instructions#Common\_Prerequisites\_2](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build_Instructions#Common_Prerequisites_2)).

You have to use Qt 5.10.X or earlier, such as 5.9 series, when building Slicer on Windows. You mixed Qt Webengine for MSVC 2017 with MSVC 2015 which is what you specified when you set “v140” as the toolset. That refers to building as MSVC 2015 even though you might be using the Visual Studio 2017 IDE.

---

<div class="post-metadata">

### Author: ![Saima](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Saima](https://discourse.slicer.org/u/Saima)
#### Post date: [July 24, 2019, 5:22am UTC](https://discourse.slicer.org/t/3d-slicer-windows-10-build-fail-only-simpleitk-project/6727/27 "2019-07-24T05:22:31Z")

</div>

Hi Andras,  
Which slicer patch should be used for building I am using:

I downloaded the slicer using the following on git cmd:

svn co [http://svn.slicer.org/Slicer4/branches/Slicer-4-10](http://svn.slicer.org/Slicer4/branches/Slicer-4-10) Slicer-r28257 -r 28257

cmake 3.15 with visual studio 15 2017 and v140 and x64

qt 5.10.0 with msvc 2015 x64

I am runing into lot of build errors.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/1/01fc2e451133f06fb4f709b76d0cfd12fd439d48.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/8/18db28883a143fd8609cda3a9ab78eb29d93e189.png)

What am I missing.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/3/030c751f75e0f7b55fe819122719350ddc78a1e7.png)

Please help me in building the slicer. I am following all the things dont know what I am missing.

visual studio:  
Environment variable VTK\_ROOT is set to:  
46\>  
46\> C:\Users\22374464\Slicer 4.8.1\lib\Slicer-4.8\python2.7\site-packages\vtk  
46\>  
46\> For compatibility, CMake is ignoring the variable.  
46\>This warning is for project developers. Use -Wno-dev to suppress it.  
46\>  
46\>CMake Error at CMakeLists.txt:844 (find\_package):  
46\> Could not find a configuration file for package “VTK” that is compatible  
46\> with requested version “8”.  
46\>  
46\> The following configuration files were considered but not accepted:  
46\>  
46\> C:/D/S4D/VTK-build/VTKConfig.cmake, version: 8.2.0 (32bit)  
46\>  
46\>  
46\>  
46\>-- Configuring incomplete, errors occurred!  
46\>See also “C:/D/S4D/Slicer-build/CMakeFiles/CMakeOutput.log”.  
46\>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: “cmd.exe” exited with code 1.  
46\>Done building project “Slicer.vcxproj” – FAILED.  
47\>------ Build started: Project: ALL\_BUILD, Configuration: Debug x64 ------  
47\>Building Custom Rule C:/D/S4/CMakeLists.txt  
========== Build: 28 succeeded, 19 failed, 0 up-to-date, 0 skipped ==========

---

<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 24, 2019, 8:24pm UTC](https://discourse.slicer.org/t/3d-slicer-windows-10-build-fail-only-simpleitk-project/6727/28 "2019-07-24T20:24:01Z")

</div>

Please try to build the latest trunk version of Slicer in source folder C:\D\S4, binary folder C:\D\S4D by specifying all parameters via command-line arguments (as described in “Alternative option” section [here](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build_Instructions#Windows_2)).

---

<div class="post-metadata">

### Author: ![Saima](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Saima](https://discourse.slicer.org/u/Saima)
#### Post date: [July 25, 2019, 5:39am UTC](https://discourse.slicer.org/t/3d-slicer-windows-10-build-fail-only-simpleitk-project/6727/29 "2019-07-25T05:39:33Z")

</div>

how to get the latest trunk version of slicer. Please help.

---

<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 25, 2019, 7:16pm UTC](https://discourse.slicer.org/t/3d-slicer-windows-10-build-fail-only-simpleitk-project/6727/30 "2019-07-25T19:16:41Z")

</div>

If you checkout the repository using either SVN or git, you will get the latest version of the main branch by default. You need this version. The main branch is called “trunk” according to SVN terminology and “master” according to git terminology.

---

<div class="post-metadata">

### Author: ![Saima](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Saima](https://discourse.slicer.org/u/Saima)
#### Post date: [July 28, 2019, 11:16am UTC](https://discourse.slicer.org/t/3d-slicer-windows-10-build-fail-only-simpleitk-project/6727/31 "2019-07-28T11:16:31Z")

</div>

Hi Andras,  
I used the latest trunk version of slicer. downloaded as:  
svn co [GitHub - NA-MIC/svn.slicer.org-Slicer4: Archive of source code originally available at svn.slicer.org/Slicer4](http://svn.slicer.org/Slicer4/trunk)  
I am getting no errors this time but getting alot of warnings.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/a/8a5301144c2329932836855c6585f5776b7c8472.png)

Is this because I didnt run it using the command prompt.

---

<div class="post-metadata">

### Author: ![Saima](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Saima](https://discourse.slicer.org/u/Saima)
#### Post date: [July 29, 2019, 2:54am UTC](https://discourse.slicer.org/t/3d-slicer-windows-10-build-fail-only-simpleitk-project/6727/32 "2019-07-29T02:54:36Z")

</div>

Successfully build with release mode

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/7/d7e84d6b1776c310f9b1ff88629a0e91c24a2402.png)

but dont know what the warnings are about. Could you please tell me why I am getting warnings.

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: [July 29, 2019, 3:10am UTC](https://discourse.slicer.org/t/3d-slicer-windows-10-build-fail-only-simpleitk-project/6727/33 "2019-07-29T03:10:24Z")

</div>

In a software application that is built from many libraries in several different build environments, it is usually not practically feasible to eliminate build warnings (especially when they are in external libraries). You can ignore the warnings.

---

<div class="post-metadata">

### Author: ![Saima](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Saima](https://discourse.slicer.org/u/Saima)
#### Post date: [July 29, 2019, 3:15am UTC](https://discourse.slicer.org/t/3d-slicer-windows-10-build-fail-only-simpleitk-project/6727/34 "2019-07-29T03:15:34Z")

</div>

how to build in debug mode. Should I just change the mode in the visual studio to debug and then do build\_all

---

<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 29, 2019, 3:19am UTC](https://discourse.slicer.org/t/3d-slicer-windows-10-build-fail-only-simpleitk-project/6727/35 "2019-07-29T03:19:55Z")

</div>

You can use the same source code folder (C:\D\S4) but you need to create a completely separate build tree for debug-mode and release-mode builds.

[Previous page](https://discourse.slicer.org/t/3d-slicer-windows-10-build-fail-only-simpleitk-project/6727.md?page=1)
