An error was encountered while compiling from scratch

Operating system: Win10
Slicer version: Compiling from GIT_REPOSITORY git://github.com/Slicer/Slicer
GIT_TAG v4.11.20200930
Expected behavior:
Actual behavior:

Error Log:

Severity Code Description Project File Line Suppression State
Error C2169 ‘lrintf’: intrinsic function, cannot be defined [G:\D\S4R\ITK-build\Modules\ThirdParty\OpenJPEG\src\openjpeg\itkopenjpeg.vcxproj] ITK G:\D\S4R\ITK\Modules\ThirdParty\OpenJPEG\src\openjpeg\opj_includes.h 106
Error C2169 ‘lrintf’: intrinsic function, cannot be defined [G:\D\S4R\ITK-build\Modules\ThirdParty\OpenJPEG\src\openjpeg\itkopenjpeg.vcxproj] ITK G:\D\S4R\ITK\Modules\ThirdParty\OpenJPEG\src\openjpeg\opj_includes.h 106
Error C2169 ‘lrintf’: intrinsic function, cannot be defined [G:\D\S4R\ITK-build\Modules\ThirdParty\OpenJPEG\src\openjpeg\itkopenjpeg.vcxproj] ITK G:\D\S4R\ITK\Modules\ThirdParty\OpenJPEG\src\openjpeg\opj_includes.h 106
Error C2169 ‘lrintf’: intrinsic function, cannot be defined [G:\D\S4R\ITK-build\Modules\ThirdParty\OpenJPEG\src\openjpeg\itkopenjpeg.vcxproj] ITK G:\D\S4R\ITK\Modules\ThirdParty\OpenJPEG\src\openjpeg\opj_includes.h 106
Error C2169 ‘lrintf’: intrinsic function, cannot be defined [G:\D\S4R\ITK-build\Modules\ThirdParty\OpenJPEG\src\openjpeg\itkopenjpeg.vcxproj] ITK G:\D\S4R\ITK\Modules\ThirdParty\OpenJPEG\src\openjpeg\opj_includes.h 106
Error C2169 ‘lrintf’: intrinsic function, cannot be defined [G:\D\S4R\ITK-build\Modules\ThirdParty\OpenJPEG\src\openjpeg\itkopenjpeg.vcxproj] ITK G:\D\S4R\ITK\Modules\ThirdParty\OpenJPEG\src\openjpeg\opj_includes.h 106
Error C2169 ‘lrintf’: intrinsic function, cannot be defined [G:\D\S4R\ITK-build\Modules\ThirdParty\OpenJPEG\src\openjpeg\itkopenjpeg.vcxproj] ITK G:\D\S4R\ITK\Modules\ThirdParty\OpenJPEG\src\openjpeg\opj_includes.h 106
Error C2169 ‘lrintf’: intrinsic function, cannot be defined [G:\D\S4R\ITK-build\Modules\ThirdParty\OpenJPEG\src\openjpeg\itkopenjpeg.vcxproj] ITK G:\D\S4R\ITK\Modules\ThirdParty\OpenJPEG\src\openjpeg\opj_includes.h 106
Error C2169 ‘lrintf’: intrinsic function, cannot be defined [G:\D\S4R\ITK-build\Modules\ThirdParty\OpenJPEG\src\openjpeg\itkopenjpeg.vcxproj] ITK G:\D\S4R\ITK\Modules\ThirdParty\OpenJPEG\src\openjpeg\opj_includes.h 106
Error C2169 ‘lrintf’: intrinsic function, cannot be defined [G:\D\S4R\ITK-build\Modules\ThirdParty\OpenJPEG\src\openjpeg\itkopenjpeg.vcxproj] ITK G:\D\S4R\ITK\Modules\ThirdParty\OpenJPEG\src\openjpeg\opj_includes.h 106
Error C2169 ‘lrintf’: intrinsic function, cannot be defined [G:\D\S4R\ITK-build\Modules\ThirdParty\OpenJPEG\src\openjpeg\itkopenjpeg.vcxproj] ITK G:\D\S4R\ITK\Modules\ThirdParty\OpenJPEG\src\openjpeg\opj_includes.h 106
Error C2169 ‘lrintf’: intrinsic function, cannot be defined [G:\D\S4R\ITK-build\Modules\ThirdParty\OpenJPEG\src\openjpeg\itkopenjpeg.vcxproj] ITK G:\D\S4R\ITK\Modules\ThirdParty\OpenJPEG\src\openjpeg\opj_includes.h 106
Error C2169 ‘lrintf’: intrinsic function, cannot be defined [G:\D\S4R\ITK-build\Modules\ThirdParty\OpenJPEG\src\openjpeg\itkopenjpeg.vcxproj] ITK G:\D\S4R\ITK\Modules\ThirdParty\OpenJPEG\src\openjpeg\opj_includes.h 106
Error C2169 ‘lrintf’: intrinsic function, cannot be defined [G:\D\S4R\ITK-build\Modules\ThirdParty\OpenJPEG\src\openjpeg\itkopenjpeg.vcxproj] ITK G:\D\S4R\ITK\Modules\ThirdParty\OpenJPEG\src\openjpeg\opj_includes.h 106
Error C2169 ‘lrintf’: intrinsic function, cannot be defined [G:\D\S4R\ITK-build\Modules\ThirdParty\OpenJPEG\src\openjpeg\itkopenjpeg.vcxproj] ITK G:\D\S4R\ITK\Modules\ThirdParty\OpenJPEG\src\openjpeg\opj_includes.h 106
Error C2169 ‘lrintf’: intrinsic function, cannot be defined [G:\D\S4R\ITK-build\Modules\ThirdParty\OpenJPEG\src\openjpeg\itkopenjpeg.vcxproj] ITK G:\D\S4R\ITK\Modules\ThirdParty\OpenJPEG\src\openjpeg\opj_includes.h 106
Error C2169 ‘lrintf’: intrinsic function, cannot be defined [G:\D\S4R\ITK-build\Modules\ThirdParty\OpenJPEG\src\openjpeg\itkopenjpeg.vcxproj] ITK G:\D\S4R\ITK\Modules\ThirdParty\OpenJPEG\src\openjpeg\opj_includes.h 106
Error C2169 ‘lrintf’: intrinsic function, cannot be defined [G:\D\S4R\ITK-build\Modules\ThirdParty\OpenJPEG\src\openjpeg\itkopenjpeg.vcxproj] ITK G:\D\S4R\ITK\Modules\ThirdParty\OpenJPEG\src\openjpeg\opj_includes.h 106
Error C3861 ‘pixmapFromIcon’: identifier not found [G:\D\S4R\Slicer-build\Applications\ReaderApp\qReaderApp.vcxproj] Slicer G:\D\S4\Reader\Applications\ReaderApp\qReaderAppMainWindow.cxx 83
Error C2039 ‘pixmapFromIcon’: is not a member of ‘qMRMLWidget’ [G:\D\S4R\Slicer-build\Applications\ReaderApp\qReaderApp.vcxproj] Slicer G:\D\S4\Reader\Applications\ReaderApp\qReaderAppMainWindow.cxx 83
Error LNK1181 cannot open input file ‘G:\D\S4R\ITK-build\lib\Release\ITKIOJPEG2000-5.1.lib’ [G:\D\S4R\SimpleITK-build\SimpleITK-build\Code\IO\src\SimpleITKIO.vcxproj] [G:\D\S4R\SimpleITK-build\SimpleITK.vcxproj] SimpleITK G:\D\S4R\slicersources-build\LINK 1
Error LNK1181 cannot open input file ‘G:\D\S4R\ITK-build\lib\Release\itkopenjpeg-5.1.lib’ [G:\D\S4R\Slicer-build\Modules\Loadable\CropVolume\MRML\vtkSlicerCropVolumeModuleMRML.vcxproj] Slicer G:\D\S4R\slicersources-build\LINK 1
Error LNK1181 cannot open input file ‘G:\D\S4R\ITK-build\lib\Release\itkopenjpeg-5.1.lib’ [G:\D\S4R\Slicer-build\Modules\Loadable\Data\Logic\vtkSlicerDataModuleLogic.vcxproj] Slicer G:\D\S4R\slicersources-build\LINK 1
Error LNK1181 cannot open input file ‘G:\D\S4R\ITK-build\lib\Release\itkopenjpeg-5.1.lib’ [G:\D\S4R\Slicer-build\Modules\Loadable\DoubleArrays\Logic\vtkSlicerDoubleArraysModuleLogic.vcxproj] Slicer G:\D\S4R\slicersources-build\LINK 1
Error LNK1181 cannot open input file ‘G:\D\S4R\ITK-build\lib\Release\itkopenjpeg-5.1.lib’ [G:\D\S4R\Slicer-build\Modules\Loadable\Models\Logic\vtkSlicerModelsModuleLogic.vcxproj] Slicer G:\D\S4R\slicersources-build\LINK 1
Error LNK1181 cannot open input file ‘G:\D\S4R\ITK-build\lib\Release\itkopenjpeg-5.1.lib’ [G:\D\S4R\Slicer-build\Modules\Loadable\Plots\Logic\vtkSlicerPlotsModuleLogic.vcxproj] Slicer G:\D\S4R\slicersources-build\LINK 1
Error LNK1181 cannot open input file ‘G:\D\S4R\ITK-build\lib\Release\itkopenjpeg-5.1.lib’ [G:\D\S4R\Slicer-build\Modules\Loadable\Reformat\Logic\vtkSlicerReformatModuleLogic.vcxproj] Slicer G:\D\S4R\slicersources-build\LINK 1
Error LNK1181 cannot open input file ‘G:\D\S4R\ITK-build\lib\Release\itkopenjpeg-5.1.lib’ [G:\D\S4R\Slicer-build\Modules\Loadable\Tables\Logic\vtkSlicerTablesModuleLogic.vcxproj] Slicer G:\D\S4R\slicersources-build\LINK 1
Error LNK1181 cannot open input file ‘G:\D\S4R\ITK-build\lib\Release\itkopenjpeg-5.1.lib’ [G:\D\S4R\Slicer-build\Modules\Loadable\VolumeRendering\MRML\vtkSlicerVolumeRenderingModuleMRML.vcxproj] Slicer G:\D\S4R\slicersources-build\LINK 1
Error LNK1181 cannot open input file ‘G:\D\S4R\ITK-build\lib\Release\itkopenjpeg-5.1.lib’ [G:\D\S4R\Slicer-build\Modules\Loadable\Volumes\Logic\vtkSlicerVolumesModuleLogic.vcxproj] Slicer G:\D\S4R\slicersources-build\LINK 1
Error LNK1181 cannot open input file ‘G:\D\S4R\ITK-build\lib\Release\ITKReview-5.1.lib’ [G:\D\S4R\SimpleITK-build\SimpleITK-build\Code\BasicFilters\src\SimpleITK_ITKReview.vcxproj] [G:\D\S4R\SimpleITK-build\SimpleITK.vcxproj] SimpleITK G:\D\S4R\slicersources-build\LINK 1
Error MSB8066 Custom build for ‘G:\D\S4R\CMakeFiles\0cafd5a68b66939ab2437eb1b83f27f1\Slicer-mkdir.rule;G:\D\S4R\CMakeFiles\0cafd5a68b66939ab2437eb1b83f27f1\Slicer-download.rule;G:\D\S4R\CMakeFiles\0cafd5a68b66939ab2437eb1b83f27f1\Slicer-update.rule;G:\D\S4R\CMakeFiles\0cafd5a68b66939ab2437eb1b83f27f1\Slicer-patch.rule;G:\D\S4R\CMakeFiles\0cafd5a68b66939ab2437eb1b83f27f1\Slicer-configure.rule;G:\D\S4R\CMakeFiles\0cafd5a68b66939ab2437eb1b83f27f1\Slicer-build.rule;G:\D\S4R\CMakeFiles\0cafd5a68b66939ab2437eb1b83f27f1\Slicer-install.rule;G:\D\S4R\CMakeFiles\0cafd5a68b66939ab2437eb1b83f27f1\Slicer-forceconfigure.rule;G:\D\S4R\CMakeFiles\0bfa9cc8c638204a583da675ad46abf9\Slicer-complete.rule;G:\D\S4R\CMakeFiles\3ec4c2cb07dab908b277834c83f0d32a\Slicer.rule’ exited with code 1. Slicer C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 241
Error MSB8066 Custom build for ‘G:\D\S4R\CMakeFiles\1a7e62b4c72f93675552ffdb4e283d65\SimpleITK-mkdir.rule;G:\D\S4R\CMakeFiles\1a7e62b4c72f93675552ffdb4e283d65\SimpleITK-download.rule;G:\D\S4R\CMakeFiles\1a7e62b4c72f93675552ffdb4e283d65\SimpleITK-update.rule;G:\D\S4R\CMakeFiles\1a7e62b4c72f93675552ffdb4e283d65\SimpleITK-patch.rule;G:\D\S4R\CMakeFiles\1a7e62b4c72f93675552ffdb4e283d65\SimpleITK-configure.rule;G:\D\S4R\CMakeFiles\1a7e62b4c72f93675552ffdb4e283d65\SimpleITK-build.rule;G:\D\S4R\CMakeFiles\1a7e62b4c72f93675552ffdb4e283d65\SimpleITK-install.rule;G:\D\S4R\CMakeFiles\0bfa9cc8c638204a583da675ad46abf9\SimpleITK-complete.rule;G:\D\S4R\CMakeFiles\3ec4c2cb07dab908b277834c83f0d32a\SimpleITK.rule’ exited with code 1. SimpleITK C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 241
Error MSB8066 Custom build for ‘G:\D\S4R\CMakeFiles\def16664b35704fbaa84bdd93c4e2b4f\ITK-mkdir.rule;G:\D\S4R\CMakeFiles\def16664b35704fbaa84bdd93c4e2b4f\ITK-download.rule;G:\D\S4R\CMakeFiles\def16664b35704fbaa84bdd93c4e2b4f\ITK-update.rule;G:\D\S4R\CMakeFiles\def16664b35704fbaa84bdd93c4e2b4f\ITK-patch.rule;G:\D\S4R\CMakeFiles\def16664b35704fbaa84bdd93c4e2b4f\ITK-configure.rule;G:\D\S4R\CMakeFiles\def16664b35704fbaa84bdd93c4e2b4f\ITK-build.rule;G:\D\S4R\CMakeFiles\def16664b35704fbaa84bdd93c4e2b4f\ITK-install.rule;G:\D\S4R\CMakeFiles\def16664b35704fbaa84bdd93c4e2b4f\ITK-generate_project_description.rule;G:\D\S4R\CMakeFiles\0bfa9cc8c638204a583da675ad46abf9\ITK-complete.rule;G:\D\S4R\CMakeFiles\3ec4c2cb07dab908b277834c83f0d32a\ITK.rule’ exited with code 1. ITK C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 241
Error MSB8066 Custom build for ‘G:\D\S4R\SimpleITK-build\CMakeFiles\bea31ce4a32ff28ae29321053c7dcf83\SimpleITK-mkdir.rule;G:\D\S4R\SimpleITK-build\CMakeFiles\bea31ce4a32ff28ae29321053c7dcf83\SimpleITK-download.rule;G:\D\S4R\SimpleITK-build\CMakeFiles\bea31ce4a32ff28ae29321053c7dcf83\SimpleITK-update.rule;G:\D\S4R\SimpleITK-build\CMakeFiles\bea31ce4a32ff28ae29321053c7dcf83\SimpleITK-patch.rule;G:\D\S4R\SimpleITK-build\CMakeFiles\bea31ce4a32ff28ae29321053c7dcf83\SimpleITK-configure.rule;G:\D\S4R\SimpleITK-build\CMakeFiles\bea31ce4a32ff28ae29321053c7dcf83\SimpleITK-forcebuild.rule;G:\D\S4R\SimpleITK-build\CMakeFiles\bea31ce4a32ff28ae29321053c7dcf83\SimpleITK-build.rule;G:\D\S4R\SimpleITK-build\CMakeFiles\bea31ce4a32ff28ae29321053c7dcf83\SimpleITK-install.rule;G:\D\S4R\SimpleITK-build\CMakeFiles\dc2d5d416f291e6d934e2a60d82d1eca\SimpleITK-complete.rule;G:\D\S4R\SimpleITK-build\CMakeFiles\5040735efd2b41c4a2b661c42d101b3a\SimpleITK.rule’ exited with code 1. [G:\D\S4R\SimpleITK-build\SimpleITK.vcxproj] SimpleITK C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 241
1 Like

The OpenJPEG build error as part of the ITK project is because you’re likely using Visual Studio 2019 version 16.9 or later. This issue was fixed in this commit, but that means you will need to build latest Slicer master branch to have that included. You were building Slicer 4.11.20200930 which is quite old and even older than the current Slicer 4.11.20210226.

1 Like

Thank you very much for your help!

Hi, I also have this issue when compiling the itk, the errors log in following
I’m using the recent latest master 2130539.
Windows 10, Visual Studio 2019.

Severity Code Description Project File Line Suppression State
Error FTK1011 could not create the new file tracking log file: E:\D\S4R\python-build\CMakeBuild\libpython\libpython-shared.dir\Release\libpython-shared.tlog\CL.read.1.tlog. The file exists. [E:\D\S4R\python-build\CMakeBuild\libpython\libpython-shared.vcxproj] python E:\D\S4R\FileTracker 1
Error MSB8066 Custom build for ‘E:\D\S4R\CMakeFiles\97c3c836647774d07e0f8365888f6630\python-update.rule;E:\D\S4R\CMakeFiles\97c3c836647774d07e0f8365888f6630\python-patch.rule;E:\D\S4R\CMakeFiles\97c3c836647774d07e0f8365888f6630\python-configure.rule;E:\D\S4R\CMakeFiles\97c3c836647774d07e0f8365888f6630\python-build.rule;E:\D\S4R\CMakeFiles\97c3c836647774d07e0f8365888f6630\python-install.rule;E:\D\S4R\CMakeFiles\97c3c836647774d07e0f8365888f6630\python-configure_python_launcher.rule;E:\D\S4R\CMakeFiles\a292924acdc90ab5003f524bcf7a9fa8\python-complete.rule;E:\D\S4R\CMakeFiles\18dd41b82dccc87fa779d30114192df1\python.rule’ exited with code 1. python E:\Program Files\Microsoft Visual Studio\2019\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 241
Error LNK1104 cannot open file ‘hdf5-shared.dir\Debug\itkhdf5-shared-5.3_D.ilk’ [E:\D\S4R\ITK-build\Modules\ThirdParty\HDF5\src\itkhdf5\src\hdf5-shared.vcxproj] ITK E:\D\S4R\LINK 1
Error MSB8066 Custom build for ‘E:\D\S4R\CMakeFiles\5192aa6b129195b05a27c64828fbcc8c\ITK-update.rule;E:\D\S4R\CMakeFiles\5192aa6b129195b05a27c64828fbcc8c\ITK-patch.rule;E:\D\S4R\CMakeFiles\5192aa6b129195b05a27c64828fbcc8c\ITK-configure.rule;E:\D\S4R\CMakeFiles\5192aa6b129195b05a27c64828fbcc8c\ITK-build.rule;E:\D\S4R\CMakeFiles\5192aa6b129195b05a27c64828fbcc8c\ITK-generate_project_description.rule;E:\D\S4R\CMakeFiles\5192aa6b129195b05a27c64828fbcc8c\ITK-install.rule;E:\D\S4R\CMakeFiles\a292924acdc90ab5003f524bcf7a9fa8\ITK-complete.rule;E:\D\S4R\CMakeFiles\18dd41b82dccc87fa779d30114192df1\ITK.rule’ exited with code 1. ITK E:\Program Files\Microsoft Visual Studio\2019\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 241
1 Like

I found a similar problem too.

Severity Code Description Project File Line Suppression State
Error MSB8066 Custom build for ‘G:\D\S4R\CMakeFiles\056af00fbcb6f7a6d2862779596164d4\VTK-mkdir.rule;G:\D\S4R\CMakeFiles\056af00fbcb6f7a6d2862779596164d4\VTK-download.rule;G:\D\S4R\CMakeFiles\056af00fbcb6f7a6d2862779596164d4\VTK-update.rule;G:\D\S4R\CMakeFiles\056af00fbcb6f7a6d2862779596164d4\VTK-patch.rule;G:\D\S4R\CMakeFiles\056af00fbcb6f7a6d2862779596164d4\VTK-configure.rule;G:\D\S4R\CMakeFiles\056af00fbcb6f7a6d2862779596164d4\VTK-build.rule;G:\D\S4R\CMakeFiles\056af00fbcb6f7a6d2862779596164d4\VTK-install.rule;G:\D\S4R\CMakeFiles\056af00fbcb6f7a6d2862779596164d4\VTK-create_egg_info.rule;G:\D\S4R\CMakeFiles\056af00fbcb6f7a6d2862779596164d4\VTK-generate_project_description.rule;G:\D\S4R\CMakeFiles\9a88963b650b8ed4a136076ae8474d88\VTK-complete.rule;G:\D\S4R\CMakeFiles\9a6b592a162e4c963002606657e923f6\VTK.rule’ exited with code 1. VTK C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 241
1 Like

This error indicates that something interferes with the build process. Maybe a build is already running in the background (closing the command-line console may not terminate the build process that was started from there). Or maybe the antivirus software interferes with file creation. Restarting the computer may fix the issue, but if not then update to very latest Slicer master version and restart the build from scratch (remove the entire build folder before restarting the build).

You haven’t included the lower-level error messages. From the information you provided it is not possible to say what went wrong. See how you can get more detailed error log here.