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.
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.
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:
" Cloning into ‘DCMTK’…
fatal: unable to look up git.dcmtk.org (port 9418) (No such host is known. )"
“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]”
"CUSTOMBUILD : error : downloading ‘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"
" 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.
Try again. https://git.dcmtk.org/ might’ve been temporarily down.
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 (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’
– 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’
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’ 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.
These are all networking errors. Do you use VPN or corporate or hospital firewall to connect to the internet? If yes, follow these instructions.
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
Note - there is a “slicer.exe” file in the “Program Files/Slicer 4.10.2” folder
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.
- 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"
-
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.
-
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
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.
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
@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?
Develop a new module
A C++ based module or python? Have you tried out some python coding of various Slicer actions in the Slicer python interactor yet?