# Slicer build in linux freezes when building simpleitk

**URL:** <https://discourse.slicer.org/t/slicer-build-in-linux-freezes-when-building-simpleitk/2679>\
**Category:** Development\
**Tags:** build\
**Created:** [April 25, 2018, 12:55am UTC](https://discourse.slicer.org/t/slicer-build-in-linux-freezes-when-building-simpleitk/2679 "2018-04-25T00:55:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![samira](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@samira](https://discourse.slicer.org/u/samira)\
**Post date:** [April 25, 2018, 12:55am UTC](https://discourse.slicer.org/t/slicer-build-in-linux-freezes-when-building-simpleitk/2679/1 "2018-04-25T00:55:35Z")

</div>

Hi All,

I am trying to build Slicer in Ubuntu but it freezes when it’s building SimpleITK. It seems to be working all the time but it doesn’t show any progress.  
I tried building it several times from the scratch but same thing happens every time.  
BTW, I keep everything in the Cmake as default.  
Any suggestions?

Thanks,

---

<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:** [April 25, 2018, 1:14am UTC](https://discourse.slicer.org/t/slicer-build-in-linux-freezes-when-building-simpleitk/2679/2 "2018-04-25T01:14:27Z")

</div>

SimpleITK takes a while to build. If you don’t see any progress for 24 hours then upload the complete build log somewhere and copy-paste the link here.

---

<div class="post-metadata">

**Author:** ![ihnorton](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ihnorton/32/9_2.png) [@ihnorton](https://discourse.slicer.org/u/ihnorton)\
**Post date:** [April 25, 2018, 12:40pm UTC](https://discourse.slicer.org/t/slicer-build-in-linux-freezes-when-building-simpleitk/2679/3 "2018-04-25T12:40:25Z")

</div>

SimpleITK can also be disabled if you don’t need it, with `Slicer_USE_SimpleITK=OFF`.

---

<div class="post-metadata">

**Author:** ![samira](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@samira](https://discourse.slicer.org/u/samira)\
**Post date:** [April 30, 2018, 11:21pm UTC](https://discourse.slicer.org/t/slicer-build-in-linux-freezes-when-building-simpleitk/2679/4 "2018-04-30T23:21:01Z")

</div>

Thank you guys,

I am still struggling building the slicer on Linux. I started building it this morning again, I will wait till tomorrow and if it doesn’t build, I will upload the build log here.

---

<div class="post-metadata">

**Author:** ![samira](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@samira](https://discourse.slicer.org/u/samira)\
**Post date:** [May 7, 2018, 6:11pm UTC](https://discourse.slicer.org/t/slicer-build-in-linux-freezes-when-building-simpleitk/2679/5 "2018-05-07T18:11:09Z")

</div>

OK, I decided to turn off the simpleITK for now and also build the slicer with QT5. Now I have some errors when building CTK.  
I uploaded some output and error log files here:

[https://drive.google.com/drive/folders/11r\_wY-wDT9yrfKJQGITR731eMxFU6YIF?usp=sharing](https://drive.google.com/drive/folders/11r_wY-wDT9yrfKJQGITR731eMxFU6YIF?usp=sharing)

Any help is appreciated. It’s my first time building slicer in Linux and it is really frustrating ☹

Thanks,  
Samira

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [May 7, 2018, 11:56pm UTC](https://discourse.slicer.org/t/slicer-build-in-linux-freezes-when-building-simpleitk/2679/6 "2018-05-07T23:56:52Z")

</div>

Sorry you are running into trouble. I’m not sure what’s up but this message from the error log indicates perhaps the compiler is not installed right:

> /home/samira/slicer/debug/VTKv9/Utilities/KWIML/vtkkwiml/include/kwiml/int.h:1052:1: note: in expansion of macro ‘KWIML\_INT\_private\_VERIFY\_SIGN’  
> KWIML\_INT\_private\_VERIFY\_SIGN(KWIML\_INT\_uintptr\_t, KWIML\_INT\_uintptr\_t, \>);  
> ^  
> c++: internal compiler error: Killed (program cc1plus)  
> Please submit a full bug report,

You might try building vtk independent of Slicer and see if you can narrow down what leads to this.

(FWIW I regularly build on unbuntu 16.04 with no problems)

---

<div class="post-metadata">

**Author:** ![samira](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@samira](https://discourse.slicer.org/u/samira)\
**Post date:** [May 8, 2018, 11:26pm UTC](https://discourse.slicer.org/t/slicer-build-in-linux-freezes-when-building-simpleitk/2679/7 "2018-05-08T23:26:10Z")

</div>

Thanks Steve,

I have already built the CTK independent and it was successful. Now all the dependencies are built. Here is the error I am getting now:

```
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
Libs/MRML/Widgets/Testing/CMakeFiles/qMRMLWidgetsCxxTests.dir/build.make:1229: recipe for target 'Libs/MRML/Widgets/Testing/CMakeFiles/qMRMLWidgetsCxxTests.dir/qMRMLScalarInvariantComboBoxEventTranslatorPlayerTest1.cxx.o' failed
make[5]: *** [Libs/MRML/Widgets/Testing/CMakeFiles/qMRMLWidgetsCxxTests.dir/qMRMLScalarInvariantComboBoxEventTranslatorPlayerTest1.cxx.o] Error 4
make[5]: *** Waiting for unfinished jobs....
[53%] Built target qMRMLWidgetsPlugins
In file included from /home/samira/slicer/Slicer/Libs/MRML/Widgets/Testing/qMRMLLayoutManagerWithCustomFactoryTest.cxx:23:0:
/home/samira/slicer/Slicer/Libs/MRML/Widgets/Testing/qMRMLLayoutManagerTestHelper.cxx:13:6: warning: ‘bool {anonymous}::checkViewArrangement(int, qMRMLLayoutManager*, vtkMRMLLayoutNode*, int)’ defined but not used [-Wunused-function]
 bool checkViewArrangement(int line, qMRMLLayoutManager* layoutManager,
      ^
[53%] Linking CXX shared library ../../bin/libqSlicerBaseQTGUI.so
In file included from /home/samira/slicer/Slicer/Libs/MRML/Widgets/Testing/qMRMLLayoutManagerVisibilityTest.cxx:23:0:
/home/samira/slicer/Slicer/Libs/MRML/Widgets/Testing/qMRMLLayoutManagerTestHelper.cxx:13:6: warning: ‘bool {anonymous}::checkViewArrangement(int, qMRMLLayoutManager*, vtkMRMLLayoutNode*, int)’ defined but not used [-Wunused-function]
 bool checkViewArrangement(int line, qMRMLLayoutManager* layoutManager,
      ^
In file included from /home/samira/slicer/Slicer/Libs/MRML/Widgets/Testing/qMRMLLayoutManagerTest1.cxx:23:0:
/home/samira/slicer/Slicer/Libs/MRML/Widgets/Testing/qMRMLLayoutManagerTestHelper.cxx:13:6: warning: ‘bool {anonymous}::checkViewArrangement(int, qMRMLLayoutManager*, vtkMRMLLayoutNode*, int)’ defined but not used [-Wunused-function]
 bool checkViewArrangement(int line, qMRMLLayoutManager* layoutManager,
      ^
CMakeFiles/Makefile2:2626: recipe for target 'Libs/MRML/Widgets/Testing/CMakeFiles/qMRMLWidgetsCxxTests.dir/all' failed
make[4]: *** [Libs/MRML/Widgets/Testing/CMakeFiles/qMRMLWidgetsCxxTests.dir/all] Error 2
make[4]: *** Waiting for unfinished jobs....
[53%] Built target qSlicerBaseQTGUI
Makefile:162: recipe for target 'all' failed
make[3]: *** [all] Error 2
CMakeFiles/Slicer.dir/build.make:141: recipe for target 'Slicer-prefix/src/Slicer-stamp/Slicer-build' failed
make[2]: *** [Slicer-prefix/src/Slicer-stamp/Slicer-build] Error 2
CMakeFiles/Makefile2:101: recipe for target 'CMakeFiles/Slicer.dir/all' failed
make[1]: *** [CMakeFiles/Slicer.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2

```

I have built the Slicer in windows million times, it’s my first time in linux and I might do something wrong that’s totally possible.  
Do you still think it can be the compiler?

Samira

---

<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:** [May 9, 2018, 3:48am UTC](https://discourse.slicer.org/t/slicer-build-in-linux-freezes-when-building-simpleitk/2679/8 "2018-05-09T03:48:28Z")

</div>

This may be due to running out of memory. Try to disable parallel build by running `make -j1` or increase amount of physical RAM or swap size.

---

<div class="post-metadata">

**Author:** ![samira](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@samira](https://discourse.slicer.org/u/samira)\
**Post date:** [May 9, 2018, 6:14pm UTC](https://discourse.slicer.org/t/slicer-build-in-linux-freezes-when-building-simpleitk/2679/9 "2018-05-09T18:14:05Z")

</div>

Yes! Thanks Andras, I disabled the parallel build and it worked 🙂
