vs2019 build problem, please help

  • Operating system: windows10 professional
  • Slicer version: 5.2 I think
  • Expected behavior:
  • Actual behavior: got 8 errors while building(debug x64)
  • BUILD WITH VS2019
  • cmake :3.26.4
  • Qt: 5.15.2

Err Msg

Error	MSB8066	“D:\R\CMakeFiles\2a00df8f2ee7b3e66170519024eabeb5\ITK-mkdir.rule;D:\R\CMakeFiles\2a00df8f2ee7b3e66170519024eabeb5\ITK-download.rule;D:\R\CMakeFiles\2a00df8f2ee7b3e66170519024eabeb5\ITK-update.rule;D:\R\CMakeFiles\2a00df8f2ee7b3e66170519024eabeb5\ITK-patch.rule;D:\R\CMakeFiles\2a00df8f2ee7b3e66170519024eabeb5\ITK-configure.rule;D:\R\CMakeFiles\2a00df8f2ee7b3e66170519024eabeb5\ITK-build.rule;D:\R\CMakeFiles\2a00df8f2ee7b3e66170519024eabeb5\ITK-generate_project_description.rule;D:\R\CMakeFiles\2a00df8f2ee7b3e66170519024eabeb5\ITK-install.rule;D:\R\CMakeFiles\685585194e4f07a5284e025cc2950b86\ITK-complete.rule;D:\R\CMakeFiles\b953c46a80b9fa9421ab3b55ff57190e\ITK.rule;D:\S\CMakeLists.txt”custom generation exited, code 1	ITK	C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets	241	
Error	MSB8066	“D:\R\CMakeFiles\56963f57fba68e2964c1355ce9fb4c7b\SimpleITK-mkdir.rule;D:\R\CMakeFiles\56963f57fba68e2964c1355ce9fb4c7b\SimpleITK-download.rule;D:\R\CMakeFiles\56963f57fba68e2964c1355ce9fb4c7b\SimpleITK-update.rule;D:\R\CMakeFiles\56963f57fba68e2964c1355ce9fb4c7b\SimpleITK-patch.rule;D:\R\CMakeFiles\56963f57fba68e2964c1355ce9fb4c7b\SimpleITK-configure.rule;D:\R\CMakeFiles\56963f57fba68e2964c1355ce9fb4c7b\SimpleITK-build.rule;D:\R\CMakeFiles\56963f57fba68e2964c1355ce9fb4c7b\SimpleITK-install.rule;D:\R\CMakeFiles\685585194e4f07a5284e025cc2950b86\SimpleITK-complete.rule;D:\R\CMakeFiles\b953c46a80b9fa9421ab3b55ff57190e\SimpleITK.rule;D:\S\CMakeLists.txt”custom generation exited, code 1	SimpleITK	C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets	241	
Error	MSB8066	“D:\R\CMakeFiles\a919682ba9a9b7a9c4eff3108a0c2533\SlicerExecutionModel-mkdir.rule;D:\R\CMakeFiles\a919682ba9a9b7a9c4eff3108a0c2533\SlicerExecutionModel-download.rule;D:\R\CMakeFiles\a919682ba9a9b7a9c4eff3108a0c2533\SlicerExecutionModel-update.rule;D:\R\CMakeFiles\a919682ba9a9b7a9c4eff3108a0c2533\SlicerExecutionModel-patch.rule;D:\R\CMakeFiles\a919682ba9a9b7a9c4eff3108a0c2533\SlicerExecutionModel-configure.rule;D:\R\CMakeFiles\a919682ba9a9b7a9c4eff3108a0c2533\SlicerExecutionModel-build.rule;D:\R\CMakeFiles\a919682ba9a9b7a9c4eff3108a0c2533\SlicerExecutionModel-generate_project_description.rule;D:\R\CMakeFiles\a919682ba9a9b7a9c4eff3108a0c2533\SlicerExecutionModel-install.rule;D:\R\CMakeFiles\685585194e4f07a5284e025cc2950b86\SlicerExecutionModel-complete.rule;D:\R\CMakeFiles\b953c46a80b9fa9421ab3b55ff57190e\SlicerExecutionModel.rule;D:\S\CMakeLists.txt”custom generation exited, code 1	SlicerExecutionModel	C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets	241	
Error	MSB8066	“D:\R\CMakeFiles\8de523c90162fa6ec802ee5ccd4a8903\python-dicom-requirements-mkdir.rule;D:\R\CMakeFiles\8de523c90162fa6ec802ee5ccd4a8903\python-dicom-requirements-download.rule;D:\R\CMakeFiles\8de523c90162fa6ec802ee5ccd4a8903\python-dicom-requirements-update.rule;D:\R\CMakeFiles\8de523c90162fa6ec802ee5ccd4a8903\python-dicom-requirements-patch.rule;D:\R\CMakeFiles\8de523c90162fa6ec802ee5ccd4a8903\python-dicom-requirements-configure.rule;D:\R\CMakeFiles\8de523c90162fa6ec802ee5ccd4a8903\python-dicom-requirements-build.rule;D:\R\CMakeFiles\8de523c90162fa6ec802ee5ccd4a8903\python-dicom-requirements-generate_project_description.rule;D:\R\CMakeFiles\8de523c90162fa6ec802ee5ccd4a8903\python-dicom-requirements-install.rule;D:\R\CMakeFiles\685585194e4f07a5284e025cc2950b86\python-dicom-requirements-complete.rule;D:\R\CMakeFiles\b953c46a80b9fa9421ab3b55ff57190e\python-dicom-requirements.rule;D:\S\CMakeLists.txt”custom generation exited, code 1	python-dicom-requirements	C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets	241	
Error	MSB8066	“D:\R\CTK-build\CMakeFiles\47b96cb8080aec385a18ae8753d6f6a1\CTK-mkdir.rule;D:\R\CTK-build\CMakeFiles\47b96cb8080aec385a18ae8753d6f6a1\CTK-download.rule;D:\R\CTK-build\CMakeFiles\47b96cb8080aec385a18ae8753d6f6a1\CTK-update.rule;D:\R\CTK-build\CMakeFiles\47b96cb8080aec385a18ae8753d6f6a1\CTK-patch.rule;D:\R\CTK-build\CMakeFiles\47b96cb8080aec385a18ae8753d6f6a1\CTK-configure.rule;D:\R\CTK-build\CMakeFiles\47b96cb8080aec385a18ae8753d6f6a1\CTK-build.rule;D:\R\CTK-build\CMakeFiles\47b96cb8080aec385a18ae8753d6f6a1\CTK-forceconfigure.rule;D:\R\CTK-build\CMakeFiles\47b96cb8080aec385a18ae8753d6f6a1\CTK-install.rule;D:\R\CTK-build\CMakeFiles\2417c1e6ecc37b5c6621b44acea10d7e\CTK-complete.rule;D:\R\CTK-build\CMakeFiles\b3a155c1c60e235b2cd6682b7a62e794\CTK.rule;D:\R\CTK\CMakeLists.txt”custom generation exited, code 1 [D:\R\CTK-build\CTK.vcxproj]	CTK	C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets	241	
Error	MSB8066	“D:\R\CMakeFiles\affded9edbdd4b0823de4937f9352d02\CTK-mkdir.rule;D:\R\CMakeFiles\affded9edbdd4b0823de4937f9352d02\CTK-download.rule;D:\R\CMakeFiles\affded9edbdd4b0823de4937f9352d02\CTK-update.rule;D:\R\CMakeFiles\affded9edbdd4b0823de4937f9352d02\CTK-patch.rule;D:\R\CMakeFiles\affded9edbdd4b0823de4937f9352d02\CTK-configure.rule;D:\R\CMakeFiles\affded9edbdd4b0823de4937f9352d02\CTK-build.rule;D:\R\CMakeFiles\affded9edbdd4b0823de4937f9352d02\CTK-generate_project_description.rule;D:\R\CMakeFiles\affded9edbdd4b0823de4937f9352d02\CTK-install.rule;D:\R\CMakeFiles\685585194e4f07a5284e025cc2950b86\CTK-complete.rule;D:\R\CMakeFiles\b953c46a80b9fa9421ab3b55ff57190e\CTK.rule;D:\S\CMakeLists.txt”custom generation exited, code 1	CTK	C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets	241	
Error	MSB8066	“D:\R\CMakeFiles\e0d658c0435eb240d058300f3ecfeea6\python-scipy-mkdir.rule;D:\R\CMakeFiles\e0d658c0435eb240d058300f3ecfeea6\python-scipy-download.rule;D:\R\CMakeFiles\e0d658c0435eb240d058300f3ecfeea6\python-scipy-update.rule;D:\R\CMakeFiles\e0d658c0435eb240d058300f3ecfeea6\python-scipy-patch.rule;D:\R\CMakeFiles\e0d658c0435eb240d058300f3ecfeea6\python-scipy-configure.rule;D:\R\CMakeFiles\e0d658c0435eb240d058300f3ecfeea6\python-scipy-build.rule;D:\R\CMakeFiles\e0d658c0435eb240d058300f3ecfeea6\python-scipy-generate_project_description.rule;D:\R\CMakeFiles\e0d658c0435eb240d058300f3ecfeea6\python-scipy-install.rule;D:\R\CMakeFiles\685585194e4f07a5284e025cc2950b86\python-scipy-complete.rule;D:\R\CMakeFiles\b953c46a80b9fa9421ab3b55ff57190e\python-scipy.rule;D:\S\CMakeLists.txt”custom generation exited, code 1	python-scipy	C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets	241	
Error	MSB8066	“D:\R\CMakeFiles\4dc4d65868ae7c14fe3a4b6ad207d8ee\Slicer-mkdir.rule;D:\R\CMakeFiles\4dc4d65868ae7c14fe3a4b6ad207d8ee\Slicer-download.rule;D:\R\CMakeFiles\4dc4d65868ae7c14fe3a4b6ad207d8ee\Slicer-update.rule;D:\R\CMakeFiles\4dc4d65868ae7c14fe3a4b6ad207d8ee\Slicer-patch.rule;D:\R\CMakeFiles\4dc4d65868ae7c14fe3a4b6ad207d8ee\Slicer-configure.rule;D:\R\CMakeFiles\4dc4d65868ae7c14fe3a4b6ad207d8ee\Slicer-build.rule;D:\R\CMakeFiles\4dc4d65868ae7c14fe3a4b6ad207d8ee\Slicer-forceconfigure.rule;D:\R\CMakeFiles\4dc4d65868ae7c14fe3a4b6ad207d8ee\Slicer-install.rule;D:\R\CMakeFiles\685585194e4f07a5284e025cc2950b86\Slicer-complete.rule;D:\R\CMakeFiles\b953c46a80b9fa9421ab3b55ff57190e\Slicer.rule;D:\S\CMakeLists.txt”custom generation exited, code 1	Slicer	C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets	241	

You need to use 64-bit Visual Studio 2022 v143 toolset as described in the build instructions.

dear Andras Loass, I have installed vs2022, but there were still some problems, can I send you e-mal, coz the err message is kind of too big to post

You can upload the build log somewhere and post the link here.

https://hotfile.io/Jb85c96az8/err0803_txt
please check if you can download the log file

Thanks for uploading the log, this was helpful.

After inspecting it, the first error is related to the download of the Python sources:

[...]
Performing download step (download, verify and extract) for 'python-source'
-- Downloading...
   dst='D:/R/Python-3.9.10.tgz'
   timeout='none'
   inactivity timeout='none'
-- Using src='https://www.python.org/ftp/python/3.9.10/Python-3.9.10.tgz'
-- [download 0% complete]
-- [download 1% complete]
[...]
-- [download 89% complete]
-- [download 90% complete]
-- [download 91% complete]
CMake Error at python-source-prefix/src/python-source-stamp/download-python-source.cmake:170 (message):
  Each download failed!

CUSTOMBUILD : error : downloading 'https://www.python.org/ftp/python/3.9.10/Python-3.9.10.tgz' failed
          status_code: 92
          status_string: "Stream error in the HTTP/2 framing layer"
          log:
          --- LOG BEGIN ---
          timeout on name lookup is not supported
    Trying 151.101.108.223:443...

  Connected to www.python.org (151.101.108.223) port 443 (#0)

  schannel: disabled automatic use of client certificate

  ALPN: offers h2

  ALPN: offers http/1.1

  ALPN: server accepted h2

  Using HTTP2, server supports multiplexing

  Copying HTTP/2 data in stream buffer to connection buffer after upgrade:
  len=0
[...]
  schannel: failed to decrypt data, need more data
[...]
  [2626 bytes data]

  HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)

  Connection #0 to host www.python.org left intact

It turns out that the download of any archive over https is not working … (e.g download of swigwin-4.0.2.zip is also failing)

Could you try the following ?

(1) SlicerCheckCMakeHTTPS

Can you run the following command ?

cmake -P D:/S/CMake/SlicerCheckCMakeHTTPS.cmake

The following output is expected:

-- Checking if CMake supports https
-- Checking if CMake supports https - ok

(2) Download of files using the web browser

Can you download the following files, locally compute their checksum and confirm they match the one reported below ?

Link SHA512
https://www.python.org/ftp/python/3.9.10/Python-3.9.10.tgz 3dc9e6a470a0922bad4856db02bc82cc4174f7a94e355fd0ed8cf9bbfd82dcf0b09d854aa482fe70ed441919a526d49e74658222279b5a25b4aa4fa171f65e9c
https://github.com/Slicer/SlicerBinaryDependencies/releases/download/swig/swigwin-4.0.2.zip b8f105f9b9db6acc1f6e3741990915b533cd1bc206eb9645fd6836457fd30789b7229d2e3219d8e35f2390605ade0fbca493ae162ec3b4bc4e428b57155db03d

(3) SlicerCheckCMakeHTTPSDownload

Finally, you could try running the script SlicerCheckCMakeHTTPSDownload.cmake following the instructions linked below.

The, consider reporting back your findings.

– Checking if CMake supports https
CMake Error at /CMake/SlicerCheckCMakeHTTPS.cmake:33 (message):
error: “Couldn’t resolve host name”
Call Stack (most recent call first):
/CMake/SlicerCheckCMakeHTTPS.cmake:43 (slicer_check_cmake_https)

it didn’t work, I don’t understand, but I can download those packages in browser… what am I suppose to do now?

D:\S\CMake>cmake -P SlicerCheckCMakeHTTPSDownload.cmake
– Checking if CMake https download works for ‘https://www.python.org/ftp/python/3.9.10/Python-3.9.10.tgz
CMake Error at SlicerCheckCMakeHTTPSDownload.cmake:55 (message):
error: “Timeout was reached”
Call Stack (most recent call first):
SlicerCheckCMakeHTTPSDownload.cmake:69 (slicer_check_cmake_https_download)

It seems there are issues[1][2] with newer TLS protocols.

You could try to workaround the issue by downloading these files into the top-level build directory and attempt to resume the build.

Here are the files to download into D:\R

URL Checksum
https://github.com/commontk/AppLauncher/releases/download/v${launcher_version}/CTKAppLauncher-0.1.31-win-i386.tar.gz MD5: 3bbe3823b6950f342dd922fab32d643d
https://github.com/jcfr/ResEdit/releases/download/v0.1.0-20140331-c157b7c/CTKResEdit-0.1.0-gc157-win-i386.tar.gz MD5: f59547c480420199081b94e96df292ec
https://github.com/Slicer/Slicer-OpenSSL/releases/download/1.1.1g/OpenSSL_1_1_1g-install-msvc1900-64.tar.gz MD5: f89ea6a4fcfb279af30cbe01c1d7f879
https://github.com/Slicer/SlicerBinaryDependencies/releases/download/swig/swigwin-3.24.zip SHA512: b8f105f9b9db6acc1f6e3741990915b533cd1bc206eb9645fd6836457fd30789b7229d2e3219d8e35f2390605ade0fbca493ae162ec3b4bc4e428b57155db03d
https://github.com/oneapi-src/oneTBB/releases/download/v2021.5.0/oneapi-tbb-2021.5.0-win.zip SHA256: 096c004c7079af89fe990bb259d58983b0ee272afa3a7ef0733875bfe09fcd8e
https://www.python.org/ftp/python/3.9.10/Python-3.9.10.tgz SHA512 3dc9e6a470a0922bad4856db02bc82cc4174f7a94e355fd0ed8cf9bbfd82dcf0b09d854aa482fe70ed441919a526d49e74658222279b5a25b4aa4fa171f65e9c

  1. China is now blocking all encrypted HTTPS traffic that uses TLS 1.3 and ESNI | ZDNET ↩︎

  2. Re: [TLS] Possible blocking of Encrypted SNI extension in China ↩︎

(https://github.com/commontk/AppLauncher/releases/download/v${launcher_version}/CTKAppLauncher-0.1.31-win-i386.tar.gz)
I’m sorry but I can NOT download this file, the browser reads ‘Not Found’, is there any alternative way to download this package?thank you

Look like I incorrectly composted the URL and forgot to replace ${launcher_version} with 0.1.31.

In this case, you should use:

Background

For future reference, the corresponding URLs have been put together looking at the external projects (see External_*.cmake files in Slicer/SuperBuild) downloading files.

Note that PCRE archive is not used on Windows. This can be confirmed by inspecting the External_PCRE.cmake file.

cd /path/to/src/Slicer/SuperBuild

$ ack "\sURL "
External_CTKAPPLAUNCHER.cmake
43:      URL https://github.com/commontk/AppLauncher/releases/download/v${launcher_version}/${CTKAppLauncherFileName}

External_CTKResEdit.cmake
37:    URL ${url}

External_Swig.cmake
32:      URL https://github.com/Slicer/SlicerBinaryDependencies/releases/download/swig/swigwin-${SWIG_TARGET_VERSION}.zip
98:      URL https://github.com/Slicer/SlicerBinaryDependencies/releases/download/swig/swig-${SWIG_TARGET_VERSION}.tar.gz

External_PCRE.cmake
54:    URL https://github.com/Slicer/SlicerBinaryDependencies/releases/download/PCRE/pcre-${_version}.tar.gz

External_OpenSSL.cmake
154:      URL ${OpenSSL_${OPENSSL_DOWNLOAD_VERSION}_URL}
307:      URL ${OpenSSL_${OPENSSL_DOWNLOAD_VERSION}_${MSVC_VERSION}_URL}

External_tbb.cmake
42:  URL https://github.com/oneapi-src/oneTBB/releases/download/v${tbb_ver}/${tbb_file}

External_python.cmake
66:    URL ${_download_${Slicer_REQUIRED_PYTHON_VERSION}_url}

Dear Jcfr:
I still got problems when doing the ‘ALL_BUILD’, this time it stuck in ‘cloning to VTK…’ ,can you please check the log file, maybe I should download more packages before hand?
https://hotfile.io/X5bcW665z2/err0806_txt

https://hotfile.io/R3s7la7fzf/err0808_txt

please help…