# Python Wrapping build error

**URL:** https://discourse.itk.org/t/python-wrapping-build-error/1335
**Category:** Engineering
**Created:** [October 5, 2018, 11:06pm UTC](https://discourse.itk.org/t/python-wrapping-build-error/1335 "2018-10-05T23:06:57Z")
**Posts on this page:** 5
**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: [October 5, 2018, 11:06pm UTC](https://discourse.itk.org/t/python-wrapping-build-error/1335/1 "2018-10-05T23:06:57Z")

</div>

I can build ITK from development sources fine, but when I turn on Python wrapping I get a few errors of the sort:  
[29%] Generating …/…/itkLevelSetNode.xml  
In file included from /home/melrobin/packages/ITK/build/Wrapping/itkLabelContourImageFilter.cxx:16:  
In file included from /home/melrobin/packages/ITK/Modules/Filtering/ImageLabel/include/itkLabelContourImageFilter.h:22:  
/home/melrobin/packages/ITK/Modules/Filtering/ImageLabel/include/itkScanlineFilterCommon.h:136:16: error:  
use of undeclared identifier ‘m\_LineMap’  
MapBegin = m\_LineMap.begin();

How can everything build fine, but wrapping cause these errors?

---

<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: [October 6, 2018, 2:15pm UTC](https://discourse.itk.org/t/python-wrapping-build-error/1335/2 "2018-10-06T14:15:34Z")

</div>

That must have been caused by some recent code refactoring. I will try building with Python wrapping and fix the errors.

> [@melrobin](#):
>
> How can everything build fine, but wrapping cause these errors?

The answer lies in conditional compilation:

> <https://github.com/InsightSoftwareConsortium/ITK/blob/e24e35893be7026c05c14473221498dd2f417873/Modules/Filtering/ImageLabel/include/itkScanlineFilterCommon.h#L482-L484>

---

<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: [October 6, 2018, 5:13pm UTC](https://discourse.itk.org/t/python-wrapping-build-error/1335/3 "2018-10-06T17:13:34Z")

</div>

Does this [patch](http://review.source.kitware.com/#/c/23786/) fix it for you?

---

<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: [October 6, 2018, 8:27pm UTC](https://discourse.itk.org/t/python-wrapping-build-error/1335/4 "2018-10-06T20:27:44Z")

</div>

OK, I’m going to give this a short and reply back.

---

<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: [October 6, 2018, 9:39pm UTC](https://discourse.itk.org/t/python-wrapping-build-error/1335/5 "2018-10-06T21:39:16Z")

</div>

The patch fixed the build problem.
