# Compile the latest fails

**URL:** <https://discourse.slicer.org/t/compile-the-latest-fails/23829>\
**Category:** Development\
**Tags:** build\
**Created:** [June 11, 2022, 12:30pm UTC](https://discourse.slicer.org/t/compile-the-latest-fails/23829 "2022-06-11T12:30:58Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![SteveLiu](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@SteveLiu](https://discourse.slicer.org/u/SteveLiu)\
**Post date:** [June 11, 2022, 12:30pm UTC](https://discourse.slicer.org/t/compile-the-latest-fails/23829/1 "2022-06-11T12:30:58Z")

</div>

Operating system: windows10  
Slicer version: latest version (5.0)  
Expected behavior: compile the “buildall” project  
Actual behavior:\*  
all the configuration according to " [Windows — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/windows.html)"  
git version 2.36.0., cmake version 3.23.1, VS2022 V143

**when compile with ““C:\Program Files\CMake\bin\cmake.exe” --build . --config Debug”** it had the following error:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/d/fd5c201c31ef805cb8524bb4f670b7abb7365b79.png)  
\*  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/c/6c73fcdbbb3338a470cfde6968ce94bd906a2859.png)

---

<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:** [June 12, 2022, 1:22am UTC](https://discourse.slicer.org/t/compile-the-latest-fails/23829/2 "2022-06-12T01:22:00Z")

</div>

It seems that your computer had problems accessing github. Check your network (firewall, proxy, vpn, …) settings and try again. We build Slicer on Windows, Linux, and macOS and [there have been no build errors recently](https://slicer.cdash.org/index.php?project=SlicerPreview).

---

<div class="post-metadata">

**Author:** ![SteveLiu](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@SteveLiu](https://discourse.slicer.org/u/SteveLiu)\
**Post date:** [June 12, 2022, 4:55am UTC](https://discourse.slicer.org/t/compile-the-latest-fails/23829/3 "2022-06-12T04:55:49Z")

</div>

thanks Lassoan.  
I shut the proxy and the auto-detect opened

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/0/802e36e984cd6ee53b3ff45f829d21d86f6410f8.png)

btw, I tried the git by cmd git clone [GitHub - commontk/DCMTK: WARNING: This is NOT the official upstream DCMTK git repository.](https://github.com/commontk/DCMTK.git) it works well but by ““C:\Program Files\CMake\bin\cmake.exe” --build . --config Debug” fail

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/e/ce91cd3ceb506bad377d57db2301fc7840e3ad8e.png)

---

<div class="post-metadata">

**Author:** ![SteveLiu](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@SteveLiu](https://discourse.slicer.org/u/SteveLiu)\
**Post date:** [June 12, 2022, 7:02am UTC](https://discourse.slicer.org/t/compile-the-latest-fails/23829/4 "2022-06-12T07:02:40Z")

</div>

I modified git protocol:  
git config –global url.”https://”.insteadOf git://  
and  
OpenSSL connecting proxy setting:  
git config --global http.proxy 127.0.0.1:1234  
git config --global https.proxy 127.0.0.1:1234  
they seem to be the solution of connection with github repository.

but i still have the “Project Completion Failure” in VS2022

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/4/c49a26d610fef8c1eb3f1c56940597a0bdb1d509.png)  
it seems no solution/download link for this project

---

<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:** [June 12, 2022, 12:38pm UTC](https://discourse.slicer.org/t/compile-the-latest-fails/23829/5 "2022-06-12T12:38:37Z")

</div>

Are you connecting to the internet via a proxy server?

You then need to specify it for every Neutrogena access operations. It seems that you figured it out how to do it for git. You also need to specify the proxy server for Python"s pip. Setting the -`HTTP_PROXY=<proxyserver_name>:<port#>` environment variable may be sufficient.

---

<div class="post-metadata">

**Author:** ![SteveLiu](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@SteveLiu](https://discourse.slicer.org/u/SteveLiu)\
**Post date:** [June 13, 2022, 6:09am UTC](https://discourse.slicer.org/t/compile-the-latest-fails/23829/6 "2022-06-13T06:09:07Z")

</div>

Thanks, I am trying to do with your instruction as below hope it is right…  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/8/f817bdf7308a42689b439c272dadaf3e7fc2307f.png)

but still the python has project failed in building （but i find the executable(.exe) application of Slicer in the folder）. So I am thinking do the python- affixed projects need to be built? As I saw when building : `No download step for 'python-wheel' No update step for 'python-wheel' `

````------
Creating directories for 'python-setuptools'
Building Custom Rule C:/D/S/CMakeLists.txt
No download step for 'python-setuptools'
No update step for 'python-setuptools'
Generate version-python-setuptools.txt and license-python-setuptools.txt
fatal: not a git repository (or any of the parent directories): .git
CMake Warning (dev) at C:/D/D4R/CMakeFiles/python-setuptools-generate-project-description.cmake:69 (message):
  python-setuptools: Could not find a license file
This warning is for project developers. Use -Wno-dev to suppress it.

No patch step for 'python-setuptools'
No configure step for 'python-setuptools'
No build step for 'python-setuptools'
Performing install step for 'python-setuptools'
CMake Error at C:/D/D4R/python-setuptools-prefix/src/python-setuptools-stamp/python-setuptools-install-Release.cmake:49 (message):
  Command failed: 1

   'C:/D/D4R/python-install/bin/PythonSlicer.exe' '-m' 'pip' 'install' '--require-hashes' '-r' 'C:/D/D4R/python-setuptools-requirements.txt'

  See also

    C:/D/D4R/python-setuptools-prefix/src/python-setuptools-stamp/python-setuptools-install-*.log

C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(245,5): error MSB8066: Custom build for 'C:\D\D4R\CMakeFiles\48d8ac0d9c1890032347ba8b3181d423\python-setuptools-mkdir.rule;C:\D\D4R\CMakeFiles\48d8ac0d9c1890032347ba8b3181d423\python-setuptools-download.rule;C:\D\D4R\CMakeFiles\48d8ac0d9c1890032347ba8b3181d423\python-setuptools-update.rule;C:\D\D4R\CMakeFiles\48d8ac0d9c1890032347ba8b3181d423\python-setuptools-patch.rule;C:\D\D4R\CMakeFiles\48d8ac0d9c1890032347ba8b3181d423\python-setuptools-configure.rule;C:\D\D4R\CMakeFiles\48d8ac0d9c1890032347ba8b3181d423\python-setuptools-build.rule;C:\D\D4R\CMakeFiles\48d8ac0d9c1890032347ba8b3181d423\python-setuptools-generate_project_description.rule;C:\D\D4R\CMakeFiles\48d8ac0d9c1890032347ba8b3181d423\python-setuptools-install.rule;C:\D\D4R\CMakeFiles\ee0ff0a71f8955ced5249e2ec794c4aa\python-setuptools-complete.rule;C:\D\D4R\CMakeFiles\a478b26e6350678435a4bc11611aaba7\python-setuptools.rule;C:\D\S\CMakeLists.txt' exited with code 1.
Done building project "python-setuptools.vcxproj" -- FAILED.```
````

---

<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:** [June 13, 2022, 12:45pm UTC](https://discourse.slicer.org/t/compile-the-latest-fails/23829/7 "2022-06-13T12:45:56Z")

</div>

Python’s package manager and pip tool is not related to CMake. You need to set HTTP\_PROXY/HTTPS\_PROXY as environment variable in your operating system.

---

<div class="post-metadata">

**Author:** ![SteveLiu](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@SteveLiu](https://discourse.slicer.org/u/SteveLiu)\
**Post date:** [June 14, 2022, 1:30am UTC](https://discourse.slicer.org/t/compile-the-latest-fails/23829/8 "2022-06-14T01:30:03Z")

</div>

Thanks Lassoan,  
There is still a little error (MSB8066) about `python-setuptools` project;  
Locate in the file: ` <CustomBuild Condition ="'@(_CustomBuild)' != ''"`

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/8/d833929f858f4817519d736570c3fa70085f7b20.png)

---

<div class="post-metadata">

**Author:** ![SteveLiu](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@SteveLiu](https://discourse.slicer.org/u/SteveLiu)\
**Post date:** [June 14, 2022, 10:45am UTC](https://discourse.slicer.org/t/compile-the-latest-fails/23829/9 "2022-06-14T10:45:19Z")

</div>

I tried to build specific error project, this is the error with `python`project

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/9/09948d1d159e3fc4122bf0734c003d7e12feea89.png)

I locate to the folder `C:\D\S4R\CMakeFiles\b971bae278932486b6f223c6e29c96a3`  
and I find the XXX.rule file writes `# generated from CMake` but nothing.

---

<div class="post-metadata">

**Author:** ![mau\_igna\_06](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mau_igna_06/32/9056_2.png) [@mau\_igna\_06](https://discourse.slicer.org/u/mau_igna_06)\
**Post date:** [June 14, 2022, 7:35pm UTC](https://discourse.slicer.org/t/compile-the-latest-fails/23829/10 "2022-06-14T19:35:07Z")

</div>

I sometimes solve this errors by rebuilding the whole project again from zero

---

<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:** [June 17, 2022, 7:41pm UTC](https://discourse.slicer.org/t/compile-the-latest-fails/23829/11 "2022-06-17T19:41:39Z")

</div>

Check out the [“Common errors” section of the build instructions](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/windows.html#errors-related-to-python) to see how to solve Python related build errors.

---

<div class="post-metadata">

**Author:** ![SteveLiu](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@SteveLiu](https://discourse.slicer.org/u/SteveLiu)\
**Post date:** [June 19, 2022, 9:19am UTC](https://discourse.slicer.org/t/compile-the-latest-fails/23829/12 "2022-06-19T09:19:51Z")

</div>

Thanks for the replies. I will try.
