You can see on the dashboard if there are any build errors using the official build configuration.
If there are no build errors there but Slicer fails to build on your computer then it is most likely due to using slightly different build tools or options. You can find the exact compiler version, Qt version, etc. on the dashboard (see build notes and in the beginning of the build logs).
The “more than one operator == matches these operands” usually means that you need to make a comparison more explicit by casting one or both operands to a more specific type (for example, use ActiveMarkupsNode->GetPointer() instead of just ActiveMarkupsNode). We had a similar build error a couple of weeks ago and a the same fix (adding GetPointer()) should work for you. We don’t understand yet why this syntax is needed for certain compilers in certain parts of the code (most places this is not necessary). but the change is harmless enough so if it works for you then please submit a pull request to apply it to the Slicer core, too.
A full build is only needed if one of the dependencies (VTK, CTK, ITK, …) are updated, which is quite rare. You can usually just build <Slicer-top-level-build-folder>/Slicer-build/Slicer.sln in Visual Studio (see details here).
I tried a complete rebuild from scratch deleting all local files and cloned into “S4” from my personal Slicer fork (master) (fetched all recent changes from GitHub - Slicer/Slicer: Multi-platform, free open source software for visualization and image computing. before)
Then again cmake config release.
After several hours, it finished without error and I saw that the location of slicer.sln had been changed to the root of “S4R”
I opened that with visual studio 19 and “BUILD ALL”.
After another several hours, Slicer got built better, but at least two errors occurred - “SimpleITK” still refuses to build today.
At least I can now confirm that Lung CT Segmenter works with correct slice switches in the recent preview 4.13.
Are build errors normal and to be expected in the preview ?
You did not mention that you switched to the correct build mode in Visual Studio. Your first failures might have been due to building in Visual Studio in default Debug mode, while using CMake to built in Release mode.
There are two Slicer.sln files in your build tree. One in the top-level build, one in n the inner build. The former builds all dependencies, the latter only builds Slicer application.
What CMake version do you use? With CMake 3.19.6 I don’t have any SimpleITK build issues, unless some other Python versions are installed on my computer that CMake finds. I’ll start a clean build with latest CMake (3.21.3) and see if I can reproduce the build issue.
In the meantime, can you upload your full build log somewhere (dropbox, onedrive, …) and post the link here so that I can check if there is any sign of some Python installation interferes with the build?
Have we listed Python as a dependency somewhere? If yes, could you please send us the link?
I updated CMake but unfortunately also tried to install the latest Windows SDK at the same time.
This fails continuously over the last day and, in addition, Visual Studio 2019 no longer builds Slicer or any of my other projects. So I can not test anything right now, sry.
You can fix everything by removing all versions of Visual Studio, Windows SDK, and CMake from your computer and install the current Visual Studio version and CMake. Probably latest Visual Studio automatically installs a good Windows SDK if you are using a current Windows 10 version.
Reinstalling everything was my plan anyway so this fixed the Visual Studio Community 2019 installation on my development PC, ran the build again, latest CMake, no Python installed, this failed again.
Today I tried to reproduce that on on another Windows system: a gaming laptop. Updated CMake.
Fetched, merged and pulled from my Slicer fork, started a full release build with no S4R present
Python 3.9 installed.
cd /d C:\D\S4R
"C:\Program Files\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A x64 -DQt5_DIR:PATH=D:\Qt\5.15.2\msvc2019_64\lib\cmake\Qt5 C:\D\S4
"C:\Program Files\CMake\bin\cmake.exe" --build . --config Release
echo Start Time: %startTime%
echo Finish Time: %time%
worked well (3 hrs build time, 10 GB S4R directory output size, Slicer starting up correctly, version of yesterday).
Then deleted S4R, uninstalled Python and build again with the same script:
→ same failure as on the other Windows PC.
Hope this is helpful somehow, I could live with having Python installed to make the build, but probably this is not the solution you are going for. Time note: This was certainly not present three months ago, when I did my first full slicer builds.
Maybe there is something special in your configurations (e.g., German Windows version or locale) that changes how Slicer’s Python is built or detected. Or maybe there is something different in old Visual Studio installations (such as presence of a built-in Python interpreter?).
Can you share the full build log of either the successful or the failed build (preferably both)? That would help us find out where Python is needed and why Slicer Python is not found there.
I observed the same type thing as above when building a fresh new debug build of Slicer. SimpleITK was the only project that failed. I used default configure options for the Slicer superbuild except turned off Build Testing and enabled the MP build flag. SimpleITK was to be built with shared libs. I was using a different Windows machine from what I typically use and also building a debug build which I typically don’t use as well. No system python was installed. Using CMake 3.21.3, with Visual Studio 16.11.4, and Windows 11 SDK 10.0.22000 (the latest Windows SDK offered through Visual Studio Installer).
46>CMake Error at C:/Program Files/CMake/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
46> Could NOT find Python3 (missing: Python3_EXECUTABLE Python3_LIBRARIES
46> Python3_INCLUDE_DIRS Interpreter Development.Module) (Required is at least
46> version "3.6")
46>Call Stack (most recent call first):
I suppose the issue is similar to the old issue with SimpleITK with shared libs in a debug build. In my “C:/S5R/SimpleITK-build/CMakeCache.txt” it reports the following where it finds the Slicer python paths correctly, but does not define PYTHON_DEBUG_LIBRARY or PYTHON_LIBRARY_DEBUG which appears to be what the build error was alerting about?
//Path to a library.
//Path to a library.
Also in the same file
//Path to a program.
//Path to a program.
//Path to a library.
Thanks for the feedback, this seems very familiar and SimpleITK has always been the problematic step in my release builds on Windows 10 without Python installed.
I would prefer not to do these hour-long builds again if not needed, just instruct me when to do so and which files would be needed exactly. I would have planned to do a redirect of the full build make file output into a text file without having Python locally installed.