# SlicerCustomAppTemplate Build failed

**URL:** <https://discourse.slicer.org/t/slicercustomapptemplate-build-failed/24073>\
**Category:** Development\
**Tags:** build\
**Created:** [June 28, 2022, 7:39am UTC](https://discourse.slicer.org/t/slicercustomapptemplate-build-failed/24073 "2022-06-28T07:39:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mrwa\_Awoda](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mrwa_awoda/32/10236_2.png) [@Mrwa\_Awoda](https://discourse.slicer.org/u/Mrwa_Awoda)\
**Post date:** [June 28, 2022, 7:39am UTC](https://discourse.slicer.org/t/slicercustomapptemplate-build-failed/24073/1 "2022-06-28T07:39:35Z")

</div>

OS: Windows.10  
Cmake version 3.22.2  
VStudio version: 17.0.5 2022  
Python 3:10 (64-bit)

hello there,  
I tried to build the SlicerCustomAppTemplate as it is as steps say in [https://www.kitware.com/slicercat-creating-custom-applications-based-on-3d-slicer/](https://www.kitware.com/slicercat-creating-custom-applications-based-on-3d-slicer/) and I get so many “Failed” and errors …

Slicer version I installed in my pc is 4.11 and the version I built (according to [Windows — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/windows.html)) is 4.13, will that gonna cause me a problem in any way?

I get this warning in CMake:

```auto
> CMake Warning (dev) at G:/W/SR/slicersources-src/CMake/SlicerMacroExtractRepositoryInfo.cmake:87 (message):
> Skipping repository info extraction: directory [G:/W/S] is not a GIT
> checkout
> Call Stack (most recent call first):
> G:/W/SR/slicersources-src/CMake/SlicerVersion.cmake:99 (SlicerMacroExtractRepositoryInfo)
> G:/W/SR/slicersources-src/CMakeLists.txt:332 (include)
> This warning is for project developers. Use -Wno-dev to suppress it.

```

and first error was:

```auto
9>------ Build started: Project: bzip2, Configuration: Release x64 ------
9>Creating directories for 'bzip2'
9>Building Custom Rule G:/W/SR/slicersources-src/CMakeLists.txt
9>Performing download step (git clone) for 'bzip2'
9>Cloning into 'bzip2'...
9>fatal: unable to access 'https://github.com/commontk/bzip2.git/': Could not resolve host: github.com
9>Cloning into 'bzip2'...
9>fatal: unable to access 'https://github.com/commontk/bzip2.git/': Could not resolve host: github.com
9>Cloning into 'bzip2'...
9>fatal: unable to access 'https://github.com/commontk/bzip2.git/': Could not resolve host: github.com
9>-- Had to git clone more than once:
9>CMake Error at slicersources-build/bzip2-prefix/tmp/bzip2-gitclone.cmake:31 (message):
9> Failed to clone repository: 'https://github.com/commontk/bzip2.git'
9>
9>
9> 3 times.
9>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(242,5): error MSB8066: Custom build for 'G:\W\SR\CMakeFiles\6cf71889da89bd29a67e3c1b07672240\bzip2-mkdir.rule;G:\W\SR\CMakeFiles\6cf71889da89bd29a67e3c1b07672240\bzip2-download.rule;G:\W\SR\CMakeFiles\6cf71889da89bd29a67e3c1b07672240\bzip2-update.rule;G:\W\SR\CMakeFiles\6cf71889da89bd29a67e3c1b07672240\bzip2-patch.rule;G:\W\SR\CMakeFiles\6cf71889da89bd29a67e3c1b07672240\bzip2-configure.rule;G:\W\SR\CMakeFiles\6cf71889da89bd29a67e3c1b07672240\bzip2-build.rule;G:\W\SR\CMakeFiles\6cf71889da89bd29a67e3c1b07672240\bzip2-generate_project_description.rule;G:\W\SR\CMakeFiles\6cf71889da89bd29a67e3c1b07672240\bzip2-install.rule;G:\W\SR\CMakeFiles\f17b097b3d5dff0a140c4b8814ae85bb\bzip2-complete.rule;G:\W\SR\CMakeFiles\bd5e72b23bb3644be4e169074b908c95\bzip2.rule;G:\W\SR\slicersources-src\CMakeLists.txt' exited with code 1.
9>Done building project "bzip2.vcxproj" -- FAILED.

```

Here is the CMake configure output: [CMake configure output - Google Docs](https://docs.google.com/document/d/1kzUGDeKVQ08CgP45BlmEFbRxvREtA2K6uggslpoGs6s/edit?usp=sharing)  
and the Build Output: [SlicerCustomAppTemplate Build Output - Google Docs](https://docs.google.com/document/d/1UBjP_Q4T_dEjxKOo7KgtpfkBCCTLExb_r4-a6MUZEX0/edit?usp=sharing)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [June 28, 2022, 8:56am UTC](https://discourse.slicer.org/t/slicercustomapptemplate-build-failed/24073/2 "2022-06-28T08:56:55Z")

</div>

Did you just download the SlicerCustomAppTemplate code as zip and uncompressed? In that case you should do a proper Git clone instead.

> Slicer version I installed in my pc is 4.11 and the version I built (according to [Windows — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/windows.html)) is 4.13, will that gonna cause me a problem in any way?

No.

---

<div class="post-metadata">

**Author:** ![Mrwa\_Awoda](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mrwa_awoda/32/10236_2.png) [@Mrwa\_Awoda](https://discourse.slicer.org/u/Mrwa_Awoda)\
**Post date:** [July 2, 2022, 6:44pm UTC](https://discourse.slicer.org/t/slicercustomapptemplate-build-failed/24073/3 "2022-07-02T18:44:10Z")

</div>

> [@cpinter](#):
>
> Did you just download the SlicerCustomAppTemplate code as zip and uncompressed?

No, I followed the instructions in “BUILD.md” file in VSCode editor after executing the two lines code in Step1 here [https://www.kitware.com/slicercat-creating-custom-applications-based-on-3d-slicer/](https://www.kitware.com/slicercat-creating-custom-applications-based-on-3d-slicer/) so I can be able to have a Cmakelists.txt file for the build!

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [July 4, 2022, 11:37am UTC](https://discourse.slicer.org/t/slicercustomapptemplate-build-failed/24073/4 "2022-07-04T11:37:28Z")

</div>

OK thanks! The errors also suggest that the script was not able to access github (`fatal: unable to access 'https://github.com/commontk/bzip2.git/': Could not resolve host: github.com`). Either a momentary issue on the server or your own internet connection. Maybe firewall issues but I never had that with github connections. I suggest trying again until this specific error is gone and it either succeeds or another type of error happens.

---

<div class="post-metadata">

**Author:** ![Mrwa\_Awoda](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mrwa_awoda/32/10236_2.png) [@Mrwa\_Awoda](https://discourse.slicer.org/u/Mrwa_Awoda)\
**Post date:** [July 4, 2022, 1:42pm UTC](https://discourse.slicer.org/t/slicercustomapptemplate-build-failed/24073/5 "2022-07-04T13:42:29Z")

</div>

Oooookay, appreciate your reply… let me try again and see!
