# Slicer build fails on all platforms

**URL:** https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058
**Category:** Development
**Tags:** build, nightlybuild
**Created:** [August 16, 2019, 1:27pm UTC](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058 "2019-08-16T13:27:34Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)
#### Post date: [August 16, 2019, 1:27pm UTC](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058/1 "2019-08-16T13:27:34Z")

</div>

Hi all,

My clean Slicer builds failed, with undeterministic errors about CTK and/or ITK configuration.  
I checked and the dashboard shows failed build on all platforms  
[http://slicer.cdash.org/index.php?project=SlicerPreview](http://slicer.cdash.org/index.php?project=SlicerPreview)

Since I didn’t see any other possible cause, I reverted [https://github.com/Slicer/Slicer/commit/aa6083015618f425653203df0eae90a4f9df7492](https://github.com/Slicer/Slicer/commit/aa6083015618f425653203df0eae90a4f9df7492)  
and tried again. It has not failed yet but did not get too far either.

Please take a look at this.  
Thanks!

---

<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: [August 16, 2019, 1:43pm UTC](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058/2 "2019-08-16T13:43:47Z")

</div>

@jcfr I don’t think you ever pushed the new branch for [Slicer/ITK](https://github.com/Slicer/ITK) as part of this recent commit [https://github.com/Slicer/Slicer/commit/aa6083015618f425653203df0eae90a4f9df7492](https://github.com/Slicer/Slicer/commit/aa6083015618f425653203df0eae90a4f9df7492)  
.

---

<div class="post-metadata">

### Author: ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)
#### Post date: [August 16, 2019, 2:12pm UTC](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058/3 "2019-08-16T14:12:17Z")

</div>

Yep, the ITK on the Slicer fork branch that Slicer master wants to reference is missing. Pushing that branch will fix.

---

<div class="post-metadata">

### Author: ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)
#### Post date: [August 16, 2019, 2:19pm UTC](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058/4 "2019-08-16T14:19:47Z")

</div>

Thanks for checking!

So it seems no changes are needed in Slicer itself.

Interesting that my windows build errors were not definite… The mac and linux dashboards are much more informative.

---

<div class="post-metadata">

### Author: ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)
#### Post date: [August 16, 2019, 2:22pm UTC](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058/5 "2019-08-16T14:22:41Z")

</div>

… They are all giving the exact same error when I look at CDash?

From the windows build: [CDash](http://slicer.cdash.org/viewBuildError.php?buildid=1671302)

> fatal: reference is not a tree: 35e6f546438557f22e66db25e066499637890214  
> CMake Error at ITK-prefix/tmp/ITK-gitclone.cmake:40 (message):  
> Failed to checkout tag: ‘35e6f546438557f22e66db25e066499637890214’

---

<div class="post-metadata">

### Author: ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)
#### Post date: [August 16, 2019, 2:24pm UTC](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058/6 "2019-08-16T14:24:09Z")

</div>

Right. My local build gave me generic “cmd” errors, sometimes when configuring ITK sometimes when CTK. Not sure why.

---

<div class="post-metadata">

### Author: ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)
#### Post date: [August 16, 2019, 2:28pm UTC](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058/7 "2019-08-16T14:28:32Z")

</div>

So the non-specific cmd error are to be expected, since cmake/VS uses cmd.exe to execute system functions (git, file copies, etc.). To figure out what actually happened, I usually search for `CMake Error` in the build output.

Visual Studio isn’t great with its reporting of these build target errors, and sometimes they get attached to the wrong project.

---

<div class="post-metadata">

### Author: ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)
#### Post date: [August 16, 2019, 2:30pm UTC](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058/8 "2019-08-16T14:30:59Z")

</div>

Anyway, If we get that branch issues fixed in the next few hours, I will re-trigger the nightly builds.

---

<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: [August 16, 2019, 3:20pm UTC](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058/9 "2019-08-16T15:20:14Z")

</div>

> [@jamesobutler](#):
>
> I don’t think you ever pushed the new branch for [Slicer/ITK](https://github.com/Slicer/ITK)

Ooops. Good catch. This should now be fixed.

---

<div class="post-metadata">

### Author: ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)
#### Post date: [August 16, 2019, 3:52pm UTC](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058/10 "2019-08-16T15:52:28Z")

</div>

Great!

Should we retrigger the nightly? My concern is that the extension builds will not finish before the next nightly is scheduled (esp. for windows). If we skip the extensions, then the current nightly download wont have a working extension manager until next morning. I am thinking we just skip for today, so that yesterday’s build will remain on the download page, unless it is critical to see build status today.

---

<div class="post-metadata">

### Author: ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)
#### Post date: [August 16, 2019, 5:58pm UTC](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058/11 "2019-08-16T17:58:50Z")

</div>

I updated and started a build. I’m getting errors like

```
c:\d\s4r\itk\modules\core\common\include\itkThreadSupport.h(59): error C2065: 'ITK_DEFAULT_MAX_THREADS': undeclared identifier [C:\d\S4R\Slicer-build
\Modules\Loadable\Markups\Logic\vtkSlicerMarkupsModuleLogicPythonD.vcxproj] [C:\d\S4R\Slicer.vcxproj]
c:\d\s4r\itk\modules\core\common\include\itkThreadSupport.h(59): error C2131: expression did not evaluate to a constant [C:\d\S4R\Slicer-build\Module
s\Loadable\Markups\Logic\vtkSlicerMarkupsModuleLogicPythonD.vcxproj] [C:\d\S4R\Slicer.vcxproj]

```

Something is still going on.

---

<div class="post-metadata">

### Author: ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)
#### Post date: [August 16, 2019, 6:10pm UTC](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058/12 "2019-08-16T18:10:11Z")

</div>

Can you locate itkConfigure.h in your itk build, and check what it has (if anything) for ITK\_DEFAULT\_MAX\_THREADS? We may need to update the External\_ITK file,

---

<div class="post-metadata">

### Author: ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)
#### Post date: [August 16, 2019, 6:14pm UTC](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058/13 "2019-08-16T18:14:39Z")

</div>

Sorry I reverted again. I’d need to work but have been struggling with this all day so far.

---

<div class="post-metadata">

### Author: ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)
#### Post date: [August 16, 2019, 6:28pm UTC](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058/14 "2019-08-16T18:28:51Z")

</div>

That’s fine, I am going to start a local build to look at this.

---

<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: [August 16, 2019, 8:30pm UTC](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058/15 "2019-08-16T20:30:06Z")

</div>

I also just updated the version of SimleITK, it was failing to build on linux. See [r28446](http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=28446)

---

<div class="post-metadata">

### Author: ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)
#### Post date: [August 19, 2019, 4:38pm UTC](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058/16 "2019-08-19T16:38:32Z")

</div>

Just checked the result of my builds at work, and there is (hopefully) one last issue:

```
  c:\d\s4r\brainstools\brainscommonlib\genericRegistrationHelper.h(506): error C2555: 'itk::MultiModal3DMutualRegistrationHelper<TransformType,Optimi
zerType,FixedImageType,MovingImageType,FitCommonCodeMetricType>::GetMTime': overriding virtual function return type differs and is not covariant from
 'itk::Object::GetMTime' [C:\d\S4R\Slicer-build\E\BRAINSTools\BRAINSCommonLib\BRAINSCommonLib.vcxproj] [C:\d\S4R\Slicer.vcxproj]
  c:\d\slicer\modules\cli\expertautomatedregistration\itkregistrationhelper\itkImageToImageRegistrationMethod.h(147): error C2555: 'itk::ImageToImage
RegistrationMethod<TImage>::GetMTime': overriding virtual function return type differs and is not covariant from 'itk::Object::GetMTime' [C:\d\S4R\Sl
icer-build\Modules\CLI\ExpertAutomatedRegistration\ExpertAutomatedRegistrationLib.vcxproj] [C:\d\S4R\Slicer.vcxproj]
  c:\d\slicer\modules\cli\resampledtivolume\itkDiffusionTensor3DResample.h(78): error C2555: 'itk::DiffusionTensor3DResample<PixelType,PixelType>::Ge
tMTime': overriding virtual function return type differs and is not covariant from 'itk::Object::GetMTime' [C:\d\S4R\Slicer-build\Modules\CLI\Resampl
eDTIVolume\ResampleDTIVolumeLib.vcxproj] [C:\d\S4R\Slicer.vcxproj]
  c:\d\slicer\modules\cli\resampledtivolume\itkTransformDeformationFieldFilter.h(58): error C2555: 'itk::TransformDeformationFieldFilter<double,doubl
e,3>::GetMTime': overriding virtual function return type differs and is not covariant from 'itk::Object::GetMTime' [C:\d\S4R\Slicer-build\Modules\CLI
\ResampleDTIVolume\ResampleDTIVolumeLib.vcxproj] [C:\d\S4R\Slicer.vcxproj]
  c:\d\slicer\modules\cli\resampledtivolume\itkDiffusionTensor3DResample.h(78): error C2555: 'itk::DiffusionTensor3DResample<PixelType,PixelType>::Ge
tMTime': overriding virtual function return type differs and is not covariant from 'itk::Object::GetMTime' [C:\d\S4R\Slicer-build\Modules\CLI\Resampl
eDTIVolume\ResampleDTIVolumeLib.vcxproj] [C:\d\S4R\Slicer.vcxproj]
  c:\d\slicer\modules\cli\resampledtivolume\itkTransformDeformationFieldFilter.h(58): error C2555: 'itk::TransformDeformationFieldFilter<double,doubl
e,3>::GetMTime': overriding virtual function return type differs and is not covariant from 'itk::Object::GetMTime' [C:\d\S4R\Slicer-build\Modules\CLI
\ResampleScalarVectorDWIVolume\ResampleScalarVectorDWIVolumeLib.vcxproj] [C:\d\S4R\Slicer.vcxproj]

```

The dashboard shows this too, and apparently only Windows is affected. Builds on the other two platforms are fine.

---

<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: [August 19, 2019, 4:39pm UTC](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058/17 "2019-08-19T16:39:35Z")

</div>

I see this, too. I’m just testing if replacing `unsigned long` by `ModifiedTimeType` fixes the issue.

---

<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: [August 19, 2019, 4:54pm UTC](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058/18 "2019-08-19T16:54:56Z")

</div>

I’ve pushed a [fix in Slicer](https://github.com/Slicer/Slicer/commit/6ec0ceae9bc4beda25054bf601aed9c8254397aa).

Unfortunately, there is a single use of the old `unsigned long` type in BRAINS, too (BRAINSTools\BRAINSCommonLib\genericRegistrationHelper.hxx and .h).  
@jcfr or @Sam_Horvath could you take care of this?

---

<div class="post-metadata">

### Author: ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)
#### Post date: [August 19, 2019, 5:05pm UTC](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058/19 "2019-08-19T17:05:42Z")

</div>

Sure, I can get that.

---

<div class="post-metadata">

### Author: ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)
#### Post date: [August 19, 2019, 5:50pm UTC](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058/20 "2019-08-19T17:50:57Z")

</div>

PR is up for BRAINSTools, @hjmjohnson

[Next page](https://discourse.slicer.org/t/slicer-build-fails-on-all-platforms/8058.md?page=2)
