# Compile error rebuilding Slicer

**URL:** <https://discourse.slicer.org/t/compile-error-rebuilding-slicer/6194>\
**Category:** Development\
**Created:** [March 18, 2019, 7:33pm UTC](https://discourse.slicer.org/t/compile-error-rebuilding-slicer/6194 "2019-03-18T19:33:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lorensen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lorensen/32/31_2.png) [@Lorensen](https://discourse.slicer.org/u/Lorensen)\
**Post date:** [March 18, 2019, 7:33pm UTC](https://discourse.slicer.org/t/compile-error-rebuilding-slicer/6194/1 "2019-03-18T19:33:29Z")

</div>

Folks,

I’m building Slicer HEAD in a fresh directory  
c++ (GCC) 8.2.0  
cmake version 3.14.0  
ubuntu 14.04

I get the following compile error:  
[100%] Relocate \_sysconfigdata.py and update pybuilddir.txt  
Segmentation fault (core dumped)  
make[5]: \*\*\* [bin/pybuilddir.txt] Error 139  
make[4]: \*\*\* [CMakeBuild/python/CMakeFiles/update\_sysconfig.dir/all] Error 2  
make[3]: \*\*\* [all] Error 2  
make[2]: \*\*\* [python-prefix/src/python-stamp/python-build] Error 2  
make[1]: \*\*\* [CMakeFiles/python.dir/all] Error 2  
make: \*\*\* [all] Error 2

---

<div class="post-metadata">

**Author:** ![Lorensen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lorensen/32/31_2.png) [@Lorensen](https://discourse.slicer.org/u/Lorensen)\
**Post date:** [March 19, 2019, 8:21pm UTC](https://discourse.slicer.org/t/compile-error-rebuilding-slicer/6194/2 "2019-03-19T20:21:25Z")

</div>

Has anyone else had this problem? Has anyone built Slicer with gcc 8.2?

---

<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:** [March 19, 2019, 9:01pm UTC](https://discourse.slicer.org/t/compile-error-rebuilding-slicer/6194/3 "2019-03-19T21:01:04Z")

</div>

In Slicer’s mantis bug tracker there is issue [4612](https://issues.slicer.org/view.php?id=4612) which appears to match the problem you are having and is still listed as an open issue.

> 0004612: Build error with GCC/G++ 8.2.0  
> When building Slicer Git Master with GCC/G++ 8.2.0, the build fails with a segmentation fault:

---

<div class="post-metadata">

**Author:** ![Lorensen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lorensen/32/31_2.png) [@Lorensen](https://discourse.slicer.org/u/Lorensen)\
**Post date:** [March 19, 2019, 9:18pm UTC](https://discourse.slicer.org/t/compile-error-rebuilding-slicer/6194/4 "2019-03-19T21:18:32Z")

</div>

James, thanks for the response.

Bill

---

<div class="post-metadata">

**Author:** ![Lorensen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lorensen/32/31_2.png) [@Lorensen](https://discourse.slicer.org/u/Lorensen)\
**Post date:** [March 21, 2019, 5:24am UTC](https://discourse.slicer.org/t/compile-error-rebuilding-slicer/6194/5 "2019-03-21T05:24:38Z")

</div>

@jamesobutler I applied the suggested fix in [issue 4612](https://issues.slicer.org/view.php?id=4612).

Slicer compiled and runs fine.

How do we get that fix into slicer?

Bill

---

<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:** [March 21, 2019, 6:30am UTC](https://discourse.slicer.org/t/compile-error-rebuilding-slicer/6194/6 "2019-03-21T06:30:10Z")

</div>

If the fix that worked for you was updating Slicer’s python from 2.7.13 to a version that is \<3.0 and \>=2.7.15 that is great to hear.

Work is scheduled to move Slicer to python 3 and this is happening starting this Monday. See

> [@Updating slicer to work with python 3](https://discourse.slicer.org/t/updating-slicer-to-work-with-python-3/4662/3):
>
> This past week, we were busy modernizing the Slicer code base. See [C++11 modernization, update to ITK5, removal of obsolete Qt4 and VTK7 support](https://discourse.slicer.org/t/c-11-modernization-update-to-itk5-removal-of-obsolete-qt4-and-vtk7-support/6165) This delayed the transition to Python 3. The associated effort will be resumed on March 25th. In the mean time, here is a work-in-progress topic based on some preliminary work from @ihnorton Cc: @bpaniagua @Andinet_Enquobahrie

It seems like python 3.6.5 and later also has the fix. So the transition to python 3 next week will be the likely path to how the issue will be resolved in Slicer.

---

<div class="post-metadata">

**Author:** ![Lorensen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lorensen/32/31_2.png) [@Lorensen](https://discourse.slicer.org/u/Lorensen)\
**Post date:** [March 21, 2019, 11:23am UTC](https://discourse.slicer.org/t/compile-error-rebuilding-slicer/6194/7 "2019-03-21T11:23:53Z")

</div>

I can wait for the update to python3. I’ll use the python2 fix for now.

Thanks
