# Build error on linux

**URL:** https://discourse.slicer.org/t/build-error-on-linux/1334
**Category:** Development
**Created:** [October 31, 2017, 4:11pm UTC](https://discourse.slicer.org/t/build-error-on-linux/1334 "2017-10-31T16:11:11Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![gcsharp](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gcsharp/32/863_2.png) [@gcsharp](https://discourse.slicer.org/u/gcsharp)
#### Post date: [October 31, 2017, 4:11pm UTC](https://discourse.slicer.org/t/build-error-on-linux/1334/1 "2017-10-31T16:11:11Z")

</div>

Hi, I have a build failure on linux (debian stable, gcc 6.3.0).  
Fresh build directory, DCMTK fails. Excerpts below. Any idea?  
-Greg

[48%] Performing configure step for ‘DCMTK’  
  
– Info: C++11 features disabled  
  
[0%] Building CXX object  
ofstd/libsrc/CMakeFiles/ofstd.dir/ofchrenc.cc.o  
In file included from /usr/include/c++/6/cstdint:35:0,  
from /home/gcs6/build/slicer-4/Slicer-  
build/DCMTK/ofstd/include/dcmtk/ofstd/ofstdinc.h:279,  
from /home/gcs6/build/slicer-4/Slicer-  
build/DCMTK/ofstd/include/dcmtk/ofstd/oftypes.h:74,  
from /home/gcs6/build/slicer-4/Slicer-  
build/DCMTK/ofstd/include/dcmtk/ofstd/ofcond.h:28,  
from /home/gcs6/build/slicer-4/Slicer-  
build/DCMTK/ofstd/include/dcmtk/ofstd/ofchrenc.h:28,  
from /home/gcs6/build/slicer-4/Slicer-  
build/DCMTK/ofstd/libsrc/ofchrenc.cc:25:  
/usr/include/c++/6/bits/c++0x\_warning.h:32:2: error: #error This file  
requires compiler and library support for the ISO C++ 2011 standard.  
This support must be enabled with the -std=c++11 or -std=gnu++11  
compiler options.

The information in this e-mail is intended only for the person to whom it is  
addressed. If you believe this e-mail was sent to you in error and the e-mail  
contains patient information, please contact the Partners Compliance HelpLine at  
[http://www.partners.org/complianceline](http://www.partners.org/complianceline) . If the e-mail was sent to you in error  
but does not contain patient information, please contact the sender and properly  
dispose of the e-mail.

---

<div class="post-metadata">

### Author: ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)
#### Post date: [October 31, 2017, 4:43pm UTC](https://discourse.slicer.org/t/build-error-on-linux/1334/2 "2017-10-31T16:43:51Z")

</div>

How do you configure Slicer ?

---

<div class="post-metadata">

### Author: ![gcsharp](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gcsharp/32/863_2.png) [@gcsharp](https://discourse.slicer.org/u/gcsharp)
#### Post date: [October 31, 2017, 5:01pm UTC](https://discourse.slicer.org/t/build-error-on-linux/1334/3 "2017-10-31T17:01:13Z")

</div>

After reading CMakeLists.txt, I learned that I could tell Slicer to use  
c++11 by changing the VTK version.

I would propose changing that logic to the below, so that one could  
choose on the command line to enable c++11 even with VTK 7.

If you like I can give a pull request.

---

<div class="post-metadata">

### Author: ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)
#### Post date: [October 31, 2017, 5:18pm UTC](https://discourse.slicer.org/t/build-error-on-linux/1334/4 "2017-10-31T17:18:34Z")

</div>

Since we will soon transition to C++11, Qt5 and VTK8 as the default. I am sure it is worth the effort.

If c++ 11 is required, I suggest you configure Slicer (from a clean build tree) with

```auto
cmake -DQt5_DIR:PATH=/path/to/lib/cmake/Qt5 ../Slicer

```

---

<div class="post-metadata">

### Author: ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)
#### Post date: [October 31, 2017, 5:40pm UTC](https://discourse.slicer.org/t/build-error-on-linux/1334/5 "2017-10-31T17:40:02Z")

</div>

> [@gcsharp](#):
>
> even with VTK 7

The performance gain I have seen with Volume Rendering using VTK8 is a game changer. I don’t think it’s worthwhile to spend resources with VTK7.
