# Build error with SimpleFastMutexLock

**URL:** https://discourse.itk.org/t/build-error-with-simplefastmutexlock/1393
**Category:** Engineering
**Created:** [November 2, 2018, 5:41pm UTC](https://discourse.itk.org/t/build-error-with-simplefastmutexlock/1393 "2018-11-02T17:41:58Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![melrobin](https://discourse.itk.org/user_avatar/discourse.itk.org/melrobin/32/277_2.png) [@melrobin](https://discourse.itk.org/u/melrobin)
#### Post date: [November 2, 2018, 5:41pm UTC](https://discourse.itk.org/t/build-error-with-simplefastmutexlock/1393/1 "2018-11-02T17:41:58Z")

</div>

In trying to build I get this error in generating one particular XML file:  
[33%] Generating …/…/itkVnlForwardFFTImageFilter.xml  
/home/melrobin/packages/ITK/build/Wrapping/itkFFTWGlobalConfiguration.cxx:38:18: error:  
no type named ‘SimpleFastMutexLock’ in namespace ‘itk’  
typedef itk::SimpleFastMutexLock itkSimpleFastMutexLock;  
~~~~~ ^  
1 error generated.

Any ideas on what to do?

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [November 2, 2018, 6:45pm UTC](https://discourse.itk.org/t/build-error-with-simplefastmutexlock/1393/2 "2018-11-02T18:45:25Z")

</div>

There was a recent [patch](https://github.com/InsightSoftwareConsortium/ITK/commit/b56b8cc34e74a09e4fec35a72f5183406238168a) which deprecated `itk::SimpleFastMutexLock` and some other classes. I guess that this needs to be handled in Python wrappings too. I will look into it. Thanks for reporting!

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [November 2, 2018, 6:54pm UTC](https://discourse.itk.org/t/build-error-with-simplefastmutexlock/1393/3 "2018-11-02T18:54:36Z")

</div>

It looks like there was a leftover wrapping for `SimpleFastMutexLock`. Let’s see if [this](http://review.source.kitware.com/#/c/23863/) fixes it. Can you also try this fix locally @melrobin?

---

<div class="post-metadata">

### Author: ![melrobin](https://discourse.itk.org/user_avatar/discourse.itk.org/melrobin/32/277_2.png) [@melrobin](https://discourse.itk.org/u/melrobin)
#### Post date: [November 2, 2018, 7:01pm UTC](https://discourse.itk.org/t/build-error-with-simplefastmutexlock/1393/4 "2018-11-02T19:01:13Z")

</div>

It may have fixed this, but I’m not sure because some other stuff is broken:  
/home/melrobin/packages/ITK/build/Wrapping/itkLabelSetMorphBaseImageFilter.cxx:26:78: error:  
template argument for non-type template parameter must be an expression  
…itk::Image\< signed short,2 \>, itk::Image\< signed short,2 \> \> itkLabelSet…  
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~  
/home/melrobin/packages/ITK/Modules/Remote/LabelErodeDilate/include/itkLabelSetMorphBaseImageFilter.h:45:38: note:  
template parameter is declared here  
template\< typename TInputImage, bool doDilate,  
^  
/home/melrobin/packages/ITK/build/Wrapping/itkLabelSetMorphBaseImageFilter.cxx:27:78: error:  
template argument for non-type template parameter must be an expression  
…itk::Image\< signed short,2 \>, itk::Image\< signed short,2 \> \>::Pointer it…  
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~  
/home/melrobin/packages/ITK/Modules/Remote/LabelErodeDilate/include/itkLabelSetMorphBaseImageFilter.h:45:38: note:  
template parameter is declared here  
template\< typename TInputImage, bool doDilate,

I’m not sure if this is the same problem though.

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [November 2, 2018, 7:19pm UTC](https://discourse.itk.org/t/build-error-with-simplefastmutexlock/1393/5 "2018-11-02T19:19:05Z")

</div>

That is certainly not the same problem. That is related to [LabelErodeDilate](https://github.com/InsightSoftwareConsortium/LabelErodeDilate) remote module. Do you need that module? If not, you could just disable it (set `Module_LabelErodeDilate` to `OFF`) in CMake configure step.

---

<div class="post-metadata">

### Author: ![melrobin](https://discourse.itk.org/user_avatar/discourse.itk.org/melrobin/32/277_2.png) [@melrobin](https://discourse.itk.org/u/melrobin)
#### Post date: [November 2, 2018, 7:22pm UTC](https://discourse.itk.org/t/build-error-with-simplefastmutexlock/1393/6 "2018-11-02T19:22:53Z")

</div>

OK, I disabled and am rebuilding.

---

<div class="post-metadata">

### Author: ![melrobin](https://discourse.itk.org/user_avatar/discourse.itk.org/melrobin/32/277_2.png) [@melrobin](https://discourse.itk.org/u/melrobin)
#### Post date: [November 2, 2018, 9:28pm UTC](https://discourse.itk.org/t/build-error-with-simplefastmutexlock/1393/7 "2018-11-02T21:28:13Z")

</div>

Still building, but I would say that the fix worked.

---

<div class="post-metadata">

### Author: ![jhlegarreta](https://discourse.itk.org/user_avatar/discourse.itk.org/jhlegarreta/32/476_2.png) [@jhlegarreta](https://discourse.itk.org/u/jhlegarreta)
#### Post date: [November 2, 2018, 9:41pm UTC](https://discourse.itk.org/t/build-error-with-simplefastmutexlock/1393/8 "2018-11-02T21:41:08Z")

</div>

The wrapping of the classes is [probably not accurate](https://github.com/InsightSoftwareConsortium/LabelErodeDilate/commit/d52c6dd2c9206b5b400d178f581243760e685c67).

I cannot open an issue on the repository, would it would be nice if anybody who has the rights did it.

---

<div class="post-metadata">

### Author: ![melrobin](https://discourse.itk.org/user_avatar/discourse.itk.org/melrobin/32/277_2.png) [@melrobin](https://discourse.itk.org/u/melrobin)
#### Post date: [November 2, 2018, 9:42pm UTC](https://discourse.itk.org/t/build-error-with-simplefastmutexlock/1393/9 "2018-11-02T21:42:25Z")

</div>

The build completed and the fix did work. I do not believe that I as a regular user can open one up.

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [November 5, 2018, 2:02pm UTC](https://discourse.itk.org/t/build-error-with-simplefastmutexlock/1393/10 "2018-11-05T14:02:57Z")

</div>

I enabled [issues](https://github.com/InsightSoftwareConsortium/LabelErodeDilate/issues) on that repository. I hesitated to do so earlier, because it is a fork of @richard.beare’s [repo](https://github.com/richardbeare/LabelErodeDilate).

---

<div class="post-metadata">

### Author: ![phcerdan](https://discourse.itk.org/user_avatar/discourse.itk.org/phcerdan/32/286_2.png) [@phcerdan](https://discourse.itk.org/u/phcerdan)
#### Post date: [November 13, 2018, 8:29pm UTC](https://discourse.itk.org/t/build-error-with-simplefastmutexlock/1393/11 "2018-11-13T20:29:22Z")

</div>

I would recommend to delete the wrapping of the base class: `itkLabelSetMorphBaseImageFilter`. Opened issue: [https://github.com/InsightSoftwareConsortium/LabelErodeDilate/issues/12](https://github.com/InsightSoftwareConsortium/LabelErodeDilate/issues/12)

---

<div class="post-metadata">

### Author: ![jhlegarreta](https://discourse.itk.org/user_avatar/discourse.itk.org/jhlegarreta/32/476_2.png) [@jhlegarreta](https://discourse.itk.org/u/jhlegarreta)
#### Post date: [November 18, 2018, 11:25pm UTC](https://discourse.itk.org/t/build-error-with-simplefastmutexlock/1393/12 "2018-11-18T23:25:10Z")

</div>

The wrapping issue has been fixed 🚀 🎆 🎉 in [https://github.com/InsightSoftwareConsortium/LabelErodeDilate](https://github.com/InsightSoftwareConsortium/LabelErodeDilate) master.

Thanks both @phcerdan and @matt.mccormick.
