TinaNant28
(Tina Nantenaina)
March 26, 2025, 7:06pm
1
Hi,
I followed the Build Instructions to build Slicer on Windows 11.
CMake: 3.31.6
Git: 2.48.1
Qt: 5.15.2 64-bit (MSVC 2019)
Visual Studio 2022 C++ x64
After build Slicer in Visual Studio, 10 errors occurred.
How to solve these errors please? Thanks!
lassoan
(Andras Lasso)
March 27, 2025, 1:39am
2
This seems to be an ITK error:
opened 08:59AM - 26 Aug 24 UTC
closed 09:31PM - 17 Nov 24 UTC
type:Bug
type:Compiler
### Description
Fails to build on CMake 3.30.1
Windows SDK version 10.0.2610… 0.0 to target Windows 10.0.22631.
[build] -- Using MSVC's dynamic CRT (/MD and /MDd)
With error message
```
[build] itktiff.vcxproj -> C:\TSS\build\Extern\ITK\src\ITK-build\lib\Debug\itktiff-5.4.lib
[build] itktiff-5.4.lib(tif_luv.obj) : error LNK2005: __ucrt_int_to_float already defined in itktiff-5.4.lib(tif_aux.obj) [C:\TSS\build\Extern\ITK\src\ITK-build\Modules\IO\TIFF\src\ITKIOTIFF.vcxproj] [C:\TSS\build\ITK.vcxproj]
[build] itktiff-5.4.lib(tif_color.obj) : error LNK2005: __ucrt_int_to_float already defined in itktiff-5.4.lib(tif_aux.obj) [C:\TSS\build\Extern\ITK\src\ITK-build\Modules\IO\TIFF\src\ITKIOTIFF.vcxproj] [C:\TSS\build\ITK.vcxproj]
```
### Steps to Reproduce
1. Attempt build.
```
ExternalProject_add(ITK
PREFIX ${CMAKE_BINARY_DIR}/Extern/ITK
GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/ITK.git
GIT_TAG v5.4.0
UPDATE_COMMAND ""
CMAKE_ARGS
-DBUILD_EXAMPLES:BOOL=OFF
-DBUILD_SHARED_LIBS:BOOL=ON
-DBUILD_TESTING:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=${CUSTOM_BUILD_TYPE}
-DITK_BUILD_DEFAULT_MODULES:BOOL=ON
-DModule_ITKReview:BOOL=ON
-DITK_LEGACY_REMOVE:BOOL=ON
-DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DEPENDENCIES_DIR}/ITK
-DITK_USE_SYSTEM_HDF5:BOOL=OFF
-DModule_ITKVtkGlue:BOOL=OFF
-DHDF5_ROOT:STRING=${HDF5_ROOT}
INSTALL_DIR ${INSTALL_DEPENDENCIES_DIR}
DEPENDS HDF5
)
```
### Expected behavior
Build
### Actual behavior
```
[build] itktiff.vcxproj -> C:\TSS\build\Extern\ITK\src\ITK-build\lib\Debug\itktiff-5.4.lib
[build] itktiff-5.4.lib(tif_luv.obj) : error LNK2005: __ucrt_int_to_float already defined in itktiff-5.4.lib(tif_aux.obj) [C:\TSS\build\Extern\ITK\src\ITK-build\Modules\IO\TIFF\src\ITKIOTIFF.vcxproj] [C:\TSS\build\ITK.vcxproj]
[build] itktiff-5.4.lib(tif_color.obj) : error LNK2005: __ucrt_int_to_float already defined in itktiff-5.4.lib(tif_aux.obj) [C:\TSS\build\Extern\ITK\src\ITK-build\Modules\IO\TIFF\src\ITKIOTIFF.vcxproj] [C:\TSS\build\ITK.vcxproj]
```
### Reproducibility
100
### Versions
v5.4.0
### Environment
Fails to build on CMake 3.30.1
Windows SDK version 10.0.26100.0 to target Windows 10.0.22631.
[build] -- Using MSVC's dynamic CRT (/MD and /MDd)
MSVC 17.10 (VS2022)
### Additional Information
Probably you can fix it by upgrading or downgrading your Windows SDK or compiler today; or applying one of the workarounds described in the referenced issue.
This PR aims to update the Slicer ITK version to one that includes a fix for that reported ITK issue:
main
← jamesobutler:bump-itk-5.4.3
opened 07:56PM - 26 Mar 25 UTC
This updates ITK from a version based on 5.4.0 to now being based on the 5.4.3 r… elease.
This should address build issues such as the one mentioned at https://discourse.slicer.org/t/slicer-build-failed/42319 as this now includes the https://github.com/InsightSoftwareConsortium/ITK/commit/6025654de3d815b131cebe969655c7173a27756c fix along with other various fixes included with the recent ITK patch releases on the 5.4.x release branch.
```
$ git shortlog 29b78d7..55c47b7 --no-merges
Andras Lasso (1):
ENH: Backport libtiff fix of not displaying warning for unknown tags
Brad King (1):
COMP: itktiff: Suppress C99 inline only on MSVC from VS 2013 and below
Bradley Lowekamp (13):
BUG: Check output of StatisticsUniqueLabelMapFilterTest1
BUG: Address bugs in unique label map filters
BUG: Remove dilation output in test
ENH: A GTest for LabelUniqueLabelMapFilter
BUG: Address race condition in SLIC filter
DOC: Correct Documentation for PadImageFilter::SizeGreatestPrimeFactor
BUG: Enable system TIFF with modern TIFF and cmake
BUG: Remove SpatialObjectProperty's writable string methods from SWIG
ENH: Download x86 clangformat on Darwin arm64
ENH: remove repetitive monochorme1 warning
BUG: Fix 32-bit truncation on VectorImage Accessors
BUG: Update LabelErodeDilate remote module
ENH: Use get_schedaffin to determine number of threads
Dženan Zukić (2):
COMP: Get ITK_USE_FLOAT_SPACE_PRECISION=ON to compile again
DOC: Remove duplicate new author name (Matthieu LAURENDEAU)
Hans Johnson (1):
COMP: macOS-11 Azure CI environment EOL
James Butler (1):
[Backport MR-4910] COMP: Update DCMTK targets based on new DCMTK namespace
Jean-Christophe Fillion-Robin (1):
COMP: Add support for customizing ITK namespace (draft)
Matt McCormick (8):
DOC: Update .zenodo
BUG: Update HDF5 name mangled symbols
DOC: Improve itk_hdf5_mangle.h.in instructions
BUG: Move InputSpaceName, OutputSpaceName from Transform to TransformBase
COMP: Set CastXML flag based on CMAKE_CXX_STANDARD
STYLE: clang-format fixes to itkSLICImageFilter.hxx
COMP: Remove unused setuptools upgrade in Linux builds
COMP: Bump ITKTotalVariation remote module
Matthew McCormick (27):
ENH: Initial pixi configuration
DOC: Document development with Pixi
ENH: Add Pixi dev environment
ENH: Add Pixi GitHub Actions Configuration
BUG: Fix pixi caching of Python Debug builds
ENH: Add Pixi python-exe and python-exe-debug tasks
ENH: Python dispatch on the first RequiredInputName
ENH: Add Pixi osx-64 configuration
ENH: Add Intel Mac to Pixi GitHub Action tests
ENH: Add Pixi mac ARM configuration
ENH: Add ARM Mac to Pixi GitHub Action tests
ENH: Bump ITK version to 5.3.1
DOC: Updates for release testing data uploads
BUG: GenerateImageSource sets Size from ReferenceImage
COMP: Use .clang-format from release-5.4 branch
STYLE: clang-format updates to itkGridImageSourceTest2.cxx
ENH: Bump ITK version to 5.4.2
DOC: Update maintenance branch for 5.4 series
DOC: Point to RTD Doxygen documentation, ITKDoxygen Docker build
DOC: Update Doxygen class links to use ReadTheDocs
DOC: Update versioned Doxygen links to point to ReadTheDocs
DOC: ITK 5.4.0 release notes
DOC: Add ITK 5.4.2 release notes
BUG: Remove VNL Netlib rpoly files
COMP: Bump MeshToPolyData Remote Module to 2024-03-14 main
BUG: Clamp GlobalDefault threads with GlobalMaximum with initialization
ENH: Bump ITK version to 5.4.3
Mihail Isakov (1):
BUG: Fix ExposeMetaData<std::vector<double>> im MetaImageIO
Niels Dekker (3):
ENH: Add nested CoordinateType aliases as alternative to CoordRepType
ENH: Add ...CoordinateType aliases as alternative to ...CoordRepType
BUG: `QuadEdgeMeshPoint` should be properly initialized by `{}`
Simon Rit (1):
BUG: Remove check on WrapITK.pth existence in itk_python_add_test
Ziv Yaniv (1):
BUG: Missing writing of the nifti descrip field.
ntustison (1):
BUG: Incorrect size for closed parametric dimension.
```
Testing on Windows:
Build: ✔️
Package: ✔️
Testing: ✔️ (no new tests failing)
TinaNant28
(Tina Nantenaina)
March 28, 2025, 3:05pm
4
Thank you very much. It works!