# Build Failure (Windows)

**URL:** <https://discourse.slicer.org/t/build-failure-windows/13197>\
**Category:** Development\
**Created:** [August 27, 2020, 4:31pm UTC](https://discourse.slicer.org/t/build-failure-windows/13197 "2020-08-27T16:31:28Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrl](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@jrl](https://discourse.slicer.org/u/jrl)\
**Post date:** [August 27, 2020, 4:31pm UTC](https://discourse.slicer.org/t/build-failure-windows/13197/1 "2020-08-27T16:31:28Z")

</div>

I am having trouble with the initial build. I think Qt, CMake, and Git are installed correctly. However, with Visual Studio, the instructions provided say “when configuring the installer, enable installation of Visual Studio 2019 (v142) toolset and component Programming languages / Visual C++ / Common Tools for Visual C++ (in some distributions, this option is not enabled by default)”. However, I do not see any option to select/install “component Programming languages / Visual C++ / Common Tools for Visual C++”, and I haven’t discovered anything online. I am unsure if this is related to my build failure but wanted to address this issue first.

---

<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:** [August 27, 2020, 4:53pm UTC](https://discourse.slicer.org/t/build-failure-windows/13197/2 "2020-08-27T16:53:14Z")

</div>

The toolsets are optional things to install as part of the Visual Studio installation. In the Visual Studio Installer it looks like the following. I’ve highlighted the areas where you can select various toolkits.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/3/43d5ae5808f5aac95201be8083d8fef6d7416f74.png)

---

<div class="post-metadata">

**Author:** ![jrl](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@jrl](https://discourse.slicer.org/u/jrl)\
**Post date:** [August 27, 2020, 6:16pm UTC](https://discourse.slicer.org/t/build-failure-windows/13197/3 "2020-08-27T18:16:21Z")

</div>

Okay I included that one item checked off (MSVC v142 -VS 2019…) at the top in the installation process.

I am able to run this command without error -  
“C:\Program Files\CMake\bin\cmake.exe” -G “Visual Studio 16 2019” -A x64 -DQt5\_DIR:PATH=C:\Qt\5.15.0\msvc2019\_64\lib\cmake\Qt5 “C:\D\S4”

The output is “Build files have been written to :C/D/S4D”

However, the second command yields errors and large output  
“C:\Program Files\CMake\bin\cmake.exe” --build . --config Debug"

This isn’t the full output but some of the errors include:

1. 

" Cloning into ‘DCMTK’…  
fatal: unable to look up [git.dcmtk.org](http://git.dcmtk.org) (port 9418) (No such host is known. )"

1. 

“C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(234,5): error MSB6006: “cmd.exe” exited with code 1. [C:\D\S4D\DCMTK.vcxproj]”

1. 

"CUSTOMBUILD : error : downloading ‘[https://github.com/jcfr/ResEdit/releases/download/v0.1.0-20140331-c157b7c/CTKResEdit-0.1.0-gc157-win-i386.tar.gz](https://github.com/jcfr/ResEdit/releases/download/v0.1.0-20140331-c157b7c/CTKResEdit-0.1.0-gc157-win-i386.tar.gz)’ failed [C:\D\S4D\CTKResEdit.vcxproj]  
status\_code: 6  
status\_string: “Couldn’t resolve host name”  
log:  
— LOG BEGIN —  
timeout on name lookup is not supported

```
getaddrinfo(3) failed for github.com:443

Couldn't resolve host 'github.com'

Closing connection 0"

```

1. 

" Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe - skipped"

* * *

I thought perhaps it was a proxy issue given that “no such host is known”. However, I don’t believe that to be the case. Thanks.

---

<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:** [August 27, 2020, 6:23pm UTC](https://discourse.slicer.org/t/build-failure-windows/13197/4 "2020-08-27T18:23:54Z")

</div>

Try again. [https://git.dcmtk.org/](https://git.dcmtk.org/) might’ve been temporarily down.

---

<div class="post-metadata">

**Author:** ![jrl](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@jrl](https://discourse.slicer.org/u/jrl)\
**Post date:** [August 28, 2020, 6:33pm UTC](https://discourse.slicer.org/t/build-failure-windows/13197/6 "2020-08-28T18:33:38Z")

</div>

I have noticed other failures in regards to git. Here is some of the output.

* * *

Completed ‘zlib’  
Building Custom Rule C:/D/S4/CMakeLists.txt  
Creating directories for ‘DCMTK’  
Performing download step (git clone) for ‘DCMTK’  
Cloning into ‘DCMTK’…  
fatal: unable to look up [git.dcmtk.org](http://git.dcmtk.org) (port 9418) (No such host is known. )  
…  
– Had to git clone more than once:  
3 times.  
CMake Error at DCMTK-prefix/tmp/DCMTK-gitclone.cmake:31 (message):  
Failed to clone repository: ‘git://git.dcmtk.org/dcmtk’

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(234,5): error MSB6006: “cmd.exe” exited with code 1. [C:\D\S4D\DCMTK.vcxproj]  
Creating directories for ‘CTKResEdit’  
Performing download step (download, verify and extract) for ‘CTKResEdit’  
– Downloading…  
dst=‘C:/D/S4D/CTKResEdit-0.1.0-gc157-win-i386.tar.gz’  
timeout=‘none’  
– Using src=‘[https://github.com/jcfr/ResEdit/releases/download/v0.1.0-20140331-c157b7c/CTKResEdit-0.1.0-gc157-win-i386.tar.gz](https://github.com/jcfr/ResEdit/releases/download/v0.1.0-20140331-c157b7c/CTKResEdit-0.1.0-gc157-win-i386.tar.gz)’  
– Retrying…  
…  
– Retry after 60 seconds (attempt #5) …  
– Using src=‘[https://github.com/jcfr/ResEdit/releases/download/v0.1.0-20140331-c157b7c/CTKResEdit-0.1.0-gc157-win-i386.tar.gz](https://github.com/jcfr/ResEdit/releases/download/v0.1.0-20140331-c157b7c/CTKResEdit-0.1.0-gc157-win-i386.tar.gz)’  
CMake Error at CTKResEdit-prefix/src/CTKResEdit-stamp/download-CTKResEdit.cmake:159 (message):  
Each download failed!

CUSTOMBUILD : error : downloading ‘[https://github.com/jcfr/ResEdit/releases/download/v0.1.0-20140331-c157b7c/CTKResEdit-0.1.0-gc157-win-i386.tar.gz](https://github.com/jcfr/ResEdit/releases/download/v0.1.0-20140331-c157b7c/CTKResEdit-0.1.0-gc157-win-i386.tar.gz)’ failed [C:\D\S4D\CTKResEdit.vcxproj]  
status\_code: 6  
status\_string: “Couldn’t resolve host name”  
log:  
— LOG BEGIN —  
timeout on name lookup is not supported

* * *

In addition, here is a line from the output regarding skipping the compiler and not sure if this is relevant.  
– Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe - skipped

* * *

(Edited to remove some links for potential spam flags)  
If anyone has any suggestions or insight into what the issue could be, I would appreciate it.  
Thanks again.

---

<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:** [August 29, 2020, 3:11pm UTC](https://discourse.slicer.org/t/build-failure-windows/13197/7 "2020-08-29T15:11:58Z")

</div>

> [@jrl](#):
>
> status\_string: “Couldn’t resolve host name”

These are all networking errors. Do you use VPN or corporate or hospital firewall to connect to the internet? If yes, follow [these instructions](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/common_errors.html#firewall-is-blocking-git-protocol).

---

<div class="post-metadata">

**Author:** ![jrl](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@jrl](https://discourse.slicer.org/u/jrl)\
**Post date:** [September 3, 2020, 5:41am UTC](https://discourse.slicer.org/t/build-failure-windows/13197/8 "2020-09-03T05:41:12Z")

</div>

I’ve moved past the networking errors (I believe). However, there is no “slicer.exe” file in my Slicer-build folder. Was the build not successful or am I missing something? I noticed there is a “SlicerPython.exe” in the “python-install\bin” folder

---

<div class="post-metadata">

**Author:** ![jrl](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@jrl](https://discourse.slicer.org/u/jrl)\
**Post date:** [September 3, 2020, 4:04pm UTC](https://discourse.slicer.org/t/build-failure-windows/13197/9 "2020-09-03T16:04:01Z")

</div>

Note - there is a “slicer.exe” file in the “Program Files/Slicer 4.10.2” folder

---

<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:** [September 3, 2020, 4:18pm UTC](https://discourse.slicer.org/t/build-failure-windows/13197/10 "2020-09-03T16:18:57Z")

</div>

Yes, you are expected to have a `c:\D\S4R\Slicer-build\Slicer.exe` file, which launches Slicer. If you don’t have it then it means that the build failed. Restart the top-level build and check for build errors.

---

<div class="post-metadata">

**Author:** ![jrl](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@jrl](https://discourse.slicer.org/u/jrl)\
**Post date:** [September 3, 2020, 4:34pm UTC](https://discourse.slicer.org/t/build-failure-windows/13197/12 "2020-09-03T16:34:04Z")

</div>

1. Are these below actual errors? And if so, what is their significance?

"Cloning into ‘JsonCpp’…  
Note: switching to ‘73b8e172d6615251ef851d883ef02f163e7075b2’.

You are in ‘detached HEAD’ state. You can look around, make experimental  
changes and commit them, and you can discard any commits you make in this  
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may  
do so (now or later) by using -c with the switch command. Example:

```
git switch -c <new-branch-name>

```

Or undo this operation with:

```
git switch -

```

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 73b8e17 COMP: Update json\_(reader|writer).cpp to fix gcc6 build **error**"

" Cloning into ‘curl’…  
Note: switching to ‘ca5fe8e63df7faea0bfb988ef3fe58f538e6950b’.

You are in ‘detached HEAD’ state. You can look around, make experimental  
changes and commit them, and you can discard any commits you make in this  
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may  
do so (now or later) by using -c with the switch command. Example:

```
git switch -c <new-branch-name>

```

Or undo this operation with:

```
git switch -

```

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at ca5fe8e63 [slicer] Fix windows link **error** explicitly defining CURL\_STATICLIB"

1. Also - it appears that I am getting LibArchive errors that are also present in a post that another individual had been receiving. So I can try that approach listed there.

2. Throughout the output I am seeing a lot of “not found” (below are just some of the few to give an example) and also some failed tests.  
"  
– Looking for strerror\_r - **not found**  
– Looking for strftime  
– Looking for strftime - found  
– Looking for vprintf  
– Looking for vprintf - **not found**  
– Looking for wmemcmp  
– Looking for wmemcmp - **not found**  
– Looking for wmemcpy  
– Looking for wmemcpy - **not found**  
– Looking for wmemmove  
– Looking for wmemmove - not found  
– Performing Test HAVE\_STRUCT\_VFSCONF  
– Performing Test HAVE\_STRUCT\_VFSCONF - **Failed**  
– Performing Test HAVE\_STRUCT\_XVFSCONF  
– Performing Test HAVE\_STRUCT\_XVFSCONF - **Failed**  
– Performing Test HAVE\_READDIR\_R  
– Performing Test HAVE\_READDIR\_R - **Failed**  
– Performing Test HAVE\_DIRFD  
– Performing Test HAVE\_DIRFD - **Failed**  
– Performing Test HAVE\_READLINKAT  
– Performing Test HAVE\_READLINKAT - **Failed**  
– Performing Test MAJOR\_IN\_MKDEV  
– Performing Test MAJOR\_IN\_MKDEV - **Failed**  
– Performing Test MAJOR\_IN\_SYSMACROS  
– Performing Test MAJOR\_IN\_SYSMACROS - **Failed**  
– Performing Test HAVE\_LZMA\_STREAM\_ENCODER\_MT  
– Performing Test HAVE\_LZMA\_STREAM\_ENCODER\_MT - **Failed**  
– Looking for EFTYPE  
– Looking for EFTYPE - **not found**  
– Looking for EILSEQ  
– Looking for EILSEQ - found  
– Looking for D\_MD\_ORDER  
– Looking for D\_MD\_ORDER - **not found**  
"  
Are these “not found” indicative of a problem? Should there be zero “not founds” during the build? Or are they akin to warnings as opposed to errors?

Thanks again

---

<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:** [September 3, 2020, 4:40pm UTC](https://discourse.slicer.org/t/build-failure-windows/13197/13 "2020-09-03T16:40:35Z")

</div>

None of these are errors. The `Failed` and `not found` messages are results of compile tests, which test features of the build environment. Errors are those that Visual Studio compiler reports as errors. You can show list of errors in Visual Studio menu: View / Error list.

---

<div class="post-metadata">

**Author:** ![jrl](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@jrl](https://discourse.slicer.org/u/jrl)\
**Post date:** [September 3, 2020, 4:44pm UTC](https://discourse.slicer.org/t/build-failure-windows/13197/14 "2020-09-03T16:44:08Z")

</div>

Should I be opening the solution file in Visual Studio and building from there? I haven’t opened Visual Studio yet for this.

I was using the command line steps from the instructions:  
“C:\Program Files\CMake\bin\cmake.exe” -G “Visual Studio 16 2019 Win64” -DQt5\_DIR:PATH=C:\Qt\5.15.0\msvc2019\_64\lib\cmake\Qt5 C:\D\S4  
“C:\Program Files\CMake\bin\cmake.exe” --build . --config Debug

---

<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:** [September 3, 2020, 5:26pm UTC](https://discourse.slicer.org/t/build-failure-windows/13197/15 "2020-09-03T17:26:12Z")

</div>

@jrl What are your plans for development using Slicer? Are you planning to develop a new module? Customize a current module? Or just use python to code some commonly repeated steps in a workflow?

---

<div class="post-metadata">

**Author:** ![jrl](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@jrl](https://discourse.slicer.org/u/jrl)\
**Post date:** [September 3, 2020, 5:44pm UTC](https://discourse.slicer.org/t/build-failure-windows/13197/16 "2020-09-03T17:44:51Z")

</div>

Develop a new module

---

<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:** [September 3, 2020, 5:50pm UTC](https://discourse.slicer.org/t/build-failure-windows/13197/17 "2020-09-03T17:50:37Z")

</div>

A C++ based module or python? Have you tried out some python coding of various Slicer actions in the Slicer python interactor yet?
