MantisBT - CMake
View Issue Details
0015691CMakeCPackpublic2015-08-11 14:572016-06-10 14:21
A. Klitzing 
Brad King 
normalmajoralways
closedfixed 
CMake 3.3 
CMake 3.5CMake 3.5 
0015691: BundleUtilities broken on Win10 (MSVC 2015)
If we build our application and use WiX/BundleUtilities to get an MSI package we get this errors with Windows 10 and MSVC 2015.

Windows 7 with MSVC 2015 works without any problems.
[100%] Linking CXX executable ApplicationName.exe
[100%] Built target Application
Run CPack packaging tool...
CPack: Create package using WIX
CPack: Install projects
CPack: - Run preinstall target for: ApplicationName
CPack: - Install project: ApplicationName
warning: target 'api-ms-win-crt-stdio-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-stdio-l1-1-0.dll' does not exist...
warning: target 'api-ms-win-crt-runtime-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-runtime-l1-1-0.dll' does not exist...
warning: target 'api-ms-win-crt-heap-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-heap-l1-1-0.dll' does not exist...
warning: target 'api-ms-win-crt-time-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-time-l1-1-0.dll' does not exist...
warning: target 'api-ms-win-crt-string-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-string-l1-1-0.dll' does not exist...
warning: target 'api-ms-win-crt-convert-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-convert-l1-1-0.dll' does not exist...
warning: target 'api-ms-win-crt-utility-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-utility-l1-1-0.dll' does not exist...
warning: target 'api-ms-win-crt-math-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-math-l1-1-0.dll' does not exist...
warning: target 'api-ms-win-crt-environment-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-environment-l1-1-0.dll' does not exist...
warning: target 'api-ms-win-crt-filesystem-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-filesystem-l1-1-0.dll' does not exist...
warning: target 'api-ms-win-crt-conio-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-conio-l1-1-0.dll' does not exist...
Error copying file "api-ms-win-crt-conio-l1-1-0.dll" to "C:/Jenkins/workspace/Windows_Debug_MSVC_MSI/build/_CPack_Packages/win32/WIX/ApplicationName-1.4.3/api-ms-win-crt-conio-l1-1-0.dll".

Error copying file "api-ms-win-crt-convert-l1-1-0.dll" to "C:/Jenkins/workspace/Windows_Debug_MSVC_MSI/build/_CPack_Packages/win32/WIX/ApplicationName-1.4.3/api-ms-win-crt-convert-l1-1-0.dll".

Error copying file "api-ms-win-crt-environment-l1-1-0.dll" to "C:/Jenkins/workspace/Windows_Debug_MSVC_MSI/build/_CPack_Packages/win32/WIX/ApplicationName-1.4.3/api-ms-win-crt-environment-l1-1-0.dll".

Error copying file "api-ms-win-crt-filesystem-l1-1-0.dll" to "C:/Jenkins/workspace/Windows_Debug_MSVC_MSI/build/_CPack_Packages/win32/WIX/ApplicationName-1.4.3/api-ms-win-crt-filesystem-l1-1-0.dll".

Error copying file "api-ms-win-crt-heap-l1-1-0.dll" to "C:/Jenkins/workspace/Windows_Debug_MSVC_MSI/build/_CPack_Packages/win32/WIX/ApplicationName-1.4.3/api-ms-win-crt-heap-l1-1-0.dll".

Error copying file "api-ms-win-crt-math-l1-1-0.dll" to "C:/Jenkins/workspace/Windows_Debug_MSVC_MSI/build/_CPack_Packages/win32/WIX/ApplicationName-1.4.3/api-ms-win-crt-math-l1-1-0.dll".

Error copying file "api-ms-win-crt-runtime-l1-1-0.dll" to "C:/Jenkins/workspace/Windows_Debug_MSVC_MSI/build/_CPack_Packages/win32/WIX/ApplicationName-1.4.3/api-ms-win-crt-runtime-l1-1-0.dll".

Error copying file "api-ms-win-crt-stdio-l1-1-0.dll" to "C:/Jenkins/workspace/Windows_Debug_MSVC_MSI/build/_CPack_Packages/win32/WIX/ApplicationName-1.4.3/api-ms-win-crt-stdio-l1-1-0.dll".

Error copying file "api-ms-win-crt-string-l1-1-0.dll" to "C:/Jenkins/workspace/Windows_Debug_MSVC_MSI/build/_CPack_Packages/win32/WIX/ApplicationName-1.4.3/api-ms-win-crt-string-l1-1-0.dll".

Error copying file "api-ms-win-crt-time-l1-1-0.dll" to "C:/Jenkins/workspace/Windows_Debug_MSVC_MSI/build/_CPack_Packages/win32/WIX/ApplicationName-1.4.3/api-ms-win-crt-time-l1-1-0.dll".

Error copying file "api-ms-win-crt-utility-l1-1-0.dll" to "C:/Jenkins/workspace/Windows_Debug_MSVC_MSI/build/_CPack_Packages/win32/WIX/ApplicationName-1.4.3/api-ms-win-crt-utility-l1-1-0.dll".

warning: target 'api-ms-win-crt-stdio-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-stdio-l1-1-0.dll' does not exist...
warning: target 'api-ms-win-crt-runtime-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-runtime-l1-1-0.dll' does not exist...
warning: target 'api-ms-win-crt-heap-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-heap-l1-1-0.dll' does not exist...
warning: target 'api-ms-win-crt-time-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-time-l1-1-0.dll' does not exist...
warning: target 'api-ms-win-crt-string-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-string-l1-1-0.dll' does not exist...
warning: target 'api-ms-win-crt-convert-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-convert-l1-1-0.dll' does not exist...
warning: target 'api-ms-win-crt-utility-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-utility-l1-1-0.dll' does not exist...
warning: target 'api-ms-win-crt-math-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-math-l1-1-0.dll' does not exist...
warning: target 'api-ms-win-crt-environment-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-environment-l1-1-0.dll' does not exist...
warning: target 'api-ms-win-crt-filesystem-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-filesystem-l1-1-0.dll' does not exist...
warning: target 'api-ms-win-crt-conio-l1-1-0.dll' is not absolute...
warning: target 'api-ms-win-crt-conio-l1-1-0.dll' does not exist...
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.3/Modules/BundleUtilities.cmake:973 (message):
  error: verify_app failed
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake/share/cmake-3.3/Modules/BundleUtilities.cmake:858 (verify_app)
  C:/Jenkins/workspace/Windows_Debug_MSVC_MSI/build/src/cmake_install.cmake:65 (FIXUP_BUNDLE)
  C:/Jenkins/workspace/Windows_Debug_MSVC_MSI/build/cmake_install.cmake:33 (include)


CPack Error: Error when generating package: ApplicationName
NMAKE : fatal error U1077: 'echo' : return code '0x1'
No tags attached.
related to 0016073closed Brad King InstallRequiredSystemLibraries and VS 2015 Universal CRT libraries 
patch 0001-Define-api-ms-win-crt-files-as-system-libraries-1569.patch (1,450) 2015-11-20 04:40
https://public.kitware.com/Bug/file/5583/0001-Define-api-ms-win-crt-files-as-system-libraries-1569.patch
patch 0001-GetPrerequisites-Define-api-ms-win-files-as-system-l.patch (1,606) 2016-01-19 15:06
https://public.kitware.com/Bug/file/5615/0001-GetPrerequisites-Define-api-ms-win-files-as-system-l.patch
Issue History
2015-08-11 14:57A. KlitzingNew Issue
2015-11-20 04:40A. KlitzingNote Added: 0039896
2015-11-20 04:40A. KlitzingFile Added: 0001-Define-api-ms-win-crt-files-as-system-libraries-1569.patch
2015-11-20 08:24Brad KingTarget Version => CMake 3.5
2015-12-21 10:55Brad KingNote Added: 0040016
2015-12-23 06:15A. KlitzingNote Added: 0040022
2016-01-07 16:15Brad KingNote Added: 0040153
2016-01-12 10:41Brad KingNote Added: 0040200
2016-01-19 13:32Gilles KhouzamNote Added: 0040263
2016-01-19 15:06Brad KingFile Added: 0001-GetPrerequisites-Define-api-ms-win-files-as-system-l.patch
2016-01-19 15:07Brad KingNote Added: 0040268
2016-01-20 01:54A. KlitzingNote Added: 0040273
2016-01-20 09:36Brad KingNote Added: 0040274
2016-01-20 09:36Brad KingAssigned To => Brad King
2016-01-20 09:36Brad KingStatusnew => resolved
2016-01-20 09:36Brad KingResolutionopen => fixed
2016-01-20 09:36Brad KingFixed in Version => CMake 3.5
2016-04-21 08:04Brad KingRelationship addedrelated to 0016073
2016-06-10 14:21Kitware RobotNote Added: 0041186
2016-06-10 14:21Kitware RobotStatusresolved => closed

Notes
(0039896)
A. Klitzing   
2015-11-20 04:40   
I use this (see patch) as a work-around.
(0040016)
Brad King   
2015-12-21 10:55   
Is "0001-Define-api-ms-win-crt-files-as-system-libraries-1569.patch" just a workaround or is it actually the correct change?
(0040022)
A. Klitzing   
2015-12-23 06:15   
Well, I don't know if it is the right place in CMake. So for me it is a work-around.

Maybe the correct way is to say "api-ms-win-crt" files are system DLLs or every DLL needs to be in the package.

http://blogs.msdn.com/b/vcblog/archive/2015/03/03/introducing-the-universal-crt.aspx [^]

They updated their post:

Updated September 11, 2015: App-local deployment of the Universal CRT is supported. To obtain the binaries for app-local deployment, install the Windows Software Development Kit (SDK) for Windows 10. The binaries will be installed to C:\Program Files (x86)\Windows Kits\10\Redist\ucrt. You will need to copy all of the DLLs with your app (note that the set of DLLs are necessary is different on different versions of Windows, so you must include all of the DLLs in order for your program to run on all supported versions of Windows).
(0040153)
Brad King   
2016-01-07 16:15   
Re 0015691:0040022: Thanks. IIUC there is a choice here that we may have to defer to the caller somehow. When fixup_bundle encounters a UCRT library it should either be included or ignored outright. Which is best depends on whether the caller intends to do app-local deployment of the UCRT.
(0040200)
Brad King   
2016-01-12 10:41   
Re 0015691:0040153, 0015691:0040022: Actually given that all the DLLs from the UCRT need to be included and fixup_bundle may not encounter all of them on the host, it is probably simplest to just ignore them. If someone wants to include the UCRT in their distribution then they can do so explicitly through other means.
(0040263)
Gilles Khouzam   
2016-01-19 13:32   
The uCRT DLLs should be treated as system components and ignored. This should probably apply to all ms-win-api files and not just the ms-win-api-crt ones. For down-level support, it would be up to the developer to figure out the right distribution mechanism.
(0040268)
Brad King   
2016-01-19 15:07   
Re 0015691:0040263: Thanks, Gilles.

André, I revised your patch accordingly as "0001-GetPrerequisites-Define-api-ms-win-files-as-system-l.patch". Please try it out.
(0040273)
A. Klitzing   
2016-01-20 01:54   
Tried the new patch with cmake 3.4.2 here and it still works for me. :-)
(0040274)
Brad King   
2016-01-20 09:36   
Re 0015691:0040273: Thanks for testing. Patch applied:

 GetPrerequisites: Define api-ms-win-* files as system libraries
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c8daac35 [^]
(0041186)
Kitware Robot   
2016-06-10 14:21   
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.