# Slicer build failed

**URL:** <https://discourse.slicer.org/t/slicer-build-failed/42319>\
**Category:** Development\
**Tags:** build\
**Created:** [March 26, 2025, 7:06pm UTC](https://discourse.slicer.org/t/slicer-build-failed/42319 "2025-03-26T19:06:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TinaNant28](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/tinanant28/32/79171_2.png) [@TinaNant28](https://discourse.slicer.org/u/TinaNant28)\
**Post date:** [March 26, 2025, 7:06pm UTC](https://discourse.slicer.org/t/slicer-build-failed/42319/1 "2025-03-26T19:06:24Z")

</div>

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.

 ![Capture d'écran 2025-03-26 135231](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/9/2989aa3e1b50bd62a5da68d0e475e8fad93f670b.png)

How to solve these errors please? Thanks!

---

<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:** [March 27, 2025, 1:39am UTC](https://discourse.slicer.org/t/slicer-build-failed/42319/2 "2025-03-27T01:39:55Z")

</div>

This seems to be an ITK error:

> <https://github.com/InsightSoftwareConsortium/ITK/issues/4820>
>
> \### 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.

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [March 27, 2025, 12:58pm UTC](https://discourse.slicer.org/t/slicer-build-failed/42319/3 "2025-03-27T12:58:45Z")

</div>

This PR aims to update the Slicer ITK version to one that includes a fix for that reported ITK issue:

> <https://github.com/Slicer/Slicer/pull/8339>
>
> 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)

---

<div class="post-metadata">

**Author:** ![TinaNant28](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/tinanant28/32/79171_2.png) [@TinaNant28](https://discourse.slicer.org/u/TinaNant28)\
**Post date:** [March 28, 2025, 3:05pm UTC](https://discourse.slicer.org/t/slicer-build-failed/42319/4 "2025-03-28T15:05:51Z")

</div>

Thank you very much. It works!
