# Build failure on Ubuntu

**URL:** <https://discourse.slicer.org/t/build-failure-on-ubuntu/197>\
**Category:** Development\
**Created:** [April 26, 2017, 2:59pm UTC](https://discourse.slicer.org/t/build-failure-on-ubuntu/197 "2017-04-26T14:59:34Z")\
**Posts on this page:** 12\
**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:** [April 26, 2017, 2:59pm UTC](https://discourse.slicer.org/t/build-failure-on-ubuntu/197/1 "2017-04-26T14:59:34Z")

</div>

Just did and update and tried to rebuild Slicer. I get the error:

loading initial cache file /home/lorensen/ProjectsGIT/Slicer-Superbuild/zlib-prefix/tmp/zlib-cache-Release.cmake  
CMake Error at CMakeLists.txt:3 (PROJECT):  
Generator

```
Unix Makefiles

```

does not support toolset specification, but toolset

```
USES_TERMINAL_DOWNLOAD

```

was specified.

– Configuring incomplete, errors occurred!  
See also “/home/lorensen/ProjectsGIT/Slicer-Superbuild/zlib-build/CMakeFiles/CMakeOutput.log”.

---

<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:** [April 26, 2017, 3:31pm UTC](https://discourse.slicer.org/t/build-failure-on-ubuntu/197/2 "2017-04-26T15:31:01Z")

</div>

I did a fresh build on ubuntu with make -j20 and got an error that had scrolled off. When I did a second build it completed with no error. I’ll try another fresh build into a log file and see if it’s the same issue you reported.

---

<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:** [April 26, 2017, 3:56pm UTC](https://discourse.slicer.org/t/build-failure-on-ubuntu/197/3 "2017-04-26T15:56:45Z")

</div>

Clean build, same error.

---

<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:** [April 26, 2017, 4:03pm UTC](https://discourse.slicer.org/t/build-failure-on-ubuntu/197/4 "2017-04-26T16:03:41Z")

</div>

got bisect says it was this commit that broke the build:  
[7cafe8c8bc9be7128ffd3179a734a98850539af9] ENH: Update ExternalProjectDependency based on commontk/Artichoke@5ee3d50

---

<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:** [April 26, 2017, 4:05pm UTC](https://discourse.slicer.org/t/build-failure-on-ubuntu/197/5 "2017-04-26T16:05:56Z")

</div>

@jcfr looks like your commit:

commit 7cafe8c8bc9be7128ffd3179a734a98850539af9  
Author: jcfr [jcfr@3bd1e089-480b-0410-8dfb-8563597acbee](mailto:jcfr@3bd1e089-480b-0410-8dfb-8563597acbee)  
Date: Fri Apr 14 22:24:36 2017 +0000

```
ENH: Update ExternalProjectDependency based on commontk/Artichoke@5ee3d50

This commit improves the support for Ninja generator by ensuring the
option USES_TERMINAL_* options are set to give Ninja access to the
terminal when the CMake version supports it.

See https://cmake.org/cmake/help/v3.4/module/ExternalProject.html

Also Update CTK to integrate a similar update:

$ git shortlog 19fc678..b8587e5 --no-merges
Jean-Christophe Fillion-Robin (2):
      Update ExternalProjectDependency based on commontk/Artichoke@5ee3d50
      ENH: ExternalProjecDependency: Re-apply commontk/CTK@6cc426b

git-svn-id: http://svn.slicer.org/Slicer4/trunk@25929 3bd1e089-480b-0410-8df
```

---

<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:** [April 26, 2017, 4:09pm UTC](https://discourse.slicer.org/t/build-failure-on-ubuntu/197/6 "2017-04-26T16:09:49Z")

</div>

@jcfr  
Interesting, I’m using cmake version 3.3.2 and the test to use the new USES\_TERMINAL\_\* says:  
if(CMAKE\_VERSION VERSION\_GREATER “3.3”)  
# USES\_TERMINAL\_\* options were introduced in CMake 3.4

Looks like the test is wrong.

---

<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:** [April 26, 2017, 4:14pm UTC](https://discourse.slicer.org/t/build-failure-on-ubuntu/197/7 "2017-04-26T16:14:24Z")

</div>

Another clean build completed without error. Probably a race condition.

IMy cmake is 3.5.1 so I didn’t see the TERMINAL issue.

---

<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:** [April 26, 2017, 4:15pm UTC](https://discourse.slicer.org/t/build-failure-on-ubuntu/197/8 "2017-04-26T16:15:53Z")

</div>

In Slicer/CMake/ExternalProjectDependency.cmake

Test should be:  
if(CMAKE\_VERSION VERSION\_GREATER “3.3.2”)  
NOT  
if(CMAKE\_VERSION VERSION\_GREATER “3.3”)

---

<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:** [April 26, 2017, 5:03pm UTC](https://discourse.slicer.org/t/build-failure-on-ubuntu/197/9 "2017-04-26T17:03:52Z")

</div>

The same error exists in CTK. I will update my cmake, but I think this error should be fixed.

Bill

---

<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:** [April 26, 2017, 5:27pm UTC](https://discourse.slicer.org/t/build-failure-on-ubuntu/197/10 "2017-04-26T17:27:13Z")

</div>

Thanks for the note. I will update the CMake modules now.

---

<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:** [April 26, 2017, 5:33pm UTC](https://discourse.slicer.org/t/build-failure-on-ubuntu/197/11 "2017-04-26T17:33:23Z")

</div>

[https://github.com/commontk/Artichoke/pull/18](https://github.com/commontk/Artichoke/pull/18)

---

<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:** [April 26, 2017, 5:34pm UTC](https://discourse.slicer.org/t/build-failure-on-ubuntu/197/12 "2017-04-26T17:34:03Z")

</div>

As soon CI returns green, I will update CTK and Slicer.

Change integrated in Slicer in [r25978](http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=25978)
