Compile error rebuilding Slicer


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 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

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

In Slicer’s mantis bug tracker there is issue 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:

James, thanks for the response.


@jamesobutler I applied the suggested fix in issue 4612.

Slicer compiled and runs fine.

How do we get that fix into slicer?


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

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.

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