Bug #58411 wixca project fails to build when using Express Edition of VS
Description:
When using VS Express, a fatal error occurs when building the project wixca.
Investigating compilation logs, it's possible to understand that the error is in the file CustomAction.rc, and it's caused by the fact that include file afxres.h is not found.
Content of the file wixca.log under packaging\WiX\ca\wixca.dir\RelWithDebInfo:
Build started 23/11/2010 06:20:46.
1>Project "D:\Santo_Local\mysql-source\mysql-5.5-build1\packaging\WiX\ca\wixca.vcxproj" on node 3 (build target(s)).
1>InitializeBuildStatus:
Touching "wixca.dir\RelWithDebInfo\wixca.unsuccessfulbuild".
CustomBuild:
All outputs are up-to-date.
ClCompile:
All outputs are up-to-date.
ResourceCompile:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /l"0x0409" /I"D:/Santo_Local/mysql-source/mysql-5.5-build1/include" /I"C:/Program Files (x86)/Windows Installer XML v3/bin/../SDK/inc" /nologo /fo"wixca.dir\RelWithDebInfo\CustomAction.res" CustomAction.rc
1>CustomAction.rc(1): fatal error RC1015: cannot open include file 'afxres.h'.
1>Done Building Project "D:\Santo_Local\mysql-source\mysql-5.5-build1\packaging\WiX\ca\wixca.vcxproj" (build target(s)) -- FAILED.
Build FAILED.
Time Elapsed 00:00:01.63
How to repeat:
- make sure you have the WiX tool installed and on your path
- execute:
cmake -DBUILD_CONFIG=mysql_release -G "Visual Studio 10" -DSIGNCODE=0
[please note that option -DSIGNCODE=0 is needed as workaround of Bug #58313 - in general you don't need to use this option]
- make sure the output of the previous command do not contain the line "-- Cannot find wix 3, installer project will not be generated""
- execute:
vcexpress MySql.sln /build RelWithDebInfo /project package /out mysql-5.5-build1.txt
[please note that option /out is used just to write the compilation log to a file]
Suggested fix:
If possible, please replace "afxres.h" with "windows.h" in packaging\WiX\ca\CustomAction.rc (please also make sure that no regressions are created after this change).
Before the fix:
1>------ Build started: Project: ZERO_CHECK, Configuration: RelWithDebInfo Win32 ------
2>------ Build started: Project: GenServerSource, Configuration: RelWithDebInfo Win32 ------
3>------ Build started: Project: gen_versioninfo, Configuration: RelWithDebInfo Win32 ------
4>------ Build started: Project: wixca, Configuration: RelWithDebInfo Win32 ------
4>CustomAction.rc(1): fatal error RC1015: cannot open include file 'afxres.h'.
4>
5>------ Build started: Project: ALL_BUILD, Configuration: RelWithDebInfo Win32 ------
6>------ Build started: Project: PACKAGE, Configuration: RelWithDebInfo Win32 ------
6> CPack: Create package using ZIP
6> CPack: Install projects
6> CPack: - Install project: MySQL
6> CPack: Compress package
6> CPack: Finalize package
6> CPack: Package D:/Santo_Local/mysql-source/mysql-5.5-build1/mysql-5.5.7-rc-win32.zip generated.
========== Build: 5 succeeded, 1 failed, 88 up-to-date, 0 skipped ==========
After the fix:
1>------ Build started: Project: ZERO_CHECK, Configuration: RelWithDebInfo Win32 ------
2>------ Build started: Project: gen_versioninfo, Configuration: RelWithDebInfo Win32 ------
3>------ Build started: Project: wixca, Configuration: RelWithDebInfo Win32 ------
3> Creating library D:/Santo_Local/mysql-source/mysql-5.5-build1/packaging/WiX/ca/RelWithDebInfo/wixca.lib and object D:/Santo_Local/mysql-source/mysql-5.5-build1/packaging/WiX/ca/RelWithDebInfo/wixca.exp
3> Creating library D:/Santo_Local/mysql-source/mysql-5.5-build1/packaging/WiX/ca/RelWithDebInfo/wixca.lib and object D:/Santo_Local/mysql-source/mysql-5.5-build1/packaging/WiX/ca/RelWithDebInfo/wixca.exp
3> wixca.vcxproj -> D:\Santo_Local\mysql-source\mysql-5.5-build1\packaging\WiX\ca\RelWithDebInfo\wixca.dll
4>------ Build started: Project: ALL_BUILD, Configuration: RelWithDebInfo Win32 ------
5>------ Build started: Project: PACKAGE, Configuration: RelWithDebInfo Win32 ------
5> CPack: Create package using ZIP
5> CPack: Install projects
5> CPack: - Install project: MySQL
5> CPack: Compress package
5> CPack: Finalize package
5> CPack: Package D:/Santo_Local/mysql-source/mysql-5.5-build1/mysql-5.5.7-rc-win32.zip generated.
========== Build: 5 succeeded, 0 failed, 89 up-to-date, 0 skipped ==========
Note:
After changing "afxres.h" with "windows.h", the windows installer package is correctly created as well. If we execute:
vcexpress MySql.sln /build RelWithDebInfo /project msi /out mysql-5.5-build1.txt
we get:
1>------ Build started: Project: ZERO_CHECK, Configuration: RelWithDebInfo Win32 ------
2>------ Build started: Project: MSI, Configuration: RelWithDebInfo Win32 ------
2> Microsoft (R) Windows Installer Xml Compiler version 3.0.5419.0
2>
2> Copyright (C) Microsoft Corporation. All rights reserved.
2>
2>
2>
2> mysql_server.wxs
2>
2> Microsoft (R) Windows Installer Xml Linker version 3.0.5419.0
2>
2> Copyright (C) Microsoft Corporation. All rights reserved.
2>
2>
2>
2> Building Custom Rule D:/Santo_Local/mysql-source/mysql-5.5-build1/packaging/WiX/CMakeLists.txt
2> CMake does not need to re-run because D:\Santo_Local\mysql-source\mysql-5.5-build1\packaging\WiX\CMakeFiles\generate.stamp is up-to-date.
========== Build: 2 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.062 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: When using VS Express, a fatal error occurs when building the project wixca. Investigating compilation logs, it's possible to understand that the error is in the file CustomAction.rc, and it's caused by the fact that include file afxres.h is not found. Content of the file wixca.log under packaging\WiX\ca\wixca.dir\RelWithDebInfo: Build started 23/11/2010 06:20:46. 1>Project "D:\Santo_Local\mysql-source\mysql-5.5-build1\packaging\WiX\ca\wixca.vcxproj" on node 3 (build target(s)). 1>InitializeBuildStatus: Touching "wixca.dir\RelWithDebInfo\wixca.unsuccessfulbuild". CustomBuild: All outputs are up-to-date. ClCompile: All outputs are up-to-date. ResourceCompile: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /l"0x0409" /I"D:/Santo_Local/mysql-source/mysql-5.5-build1/include" /I"C:/Program Files (x86)/Windows Installer XML v3/bin/../SDK/inc" /nologo /fo"wixca.dir\RelWithDebInfo\CustomAction.res" CustomAction.rc 1>CustomAction.rc(1): fatal error RC1015: cannot open include file 'afxres.h'. 1>Done Building Project "D:\Santo_Local\mysql-source\mysql-5.5-build1\packaging\WiX\ca\wixca.vcxproj" (build target(s)) -- FAILED. Build FAILED. Time Elapsed 00:00:01.63 How to repeat: - make sure you have the WiX tool installed and on your path - execute: cmake -DBUILD_CONFIG=mysql_release -G "Visual Studio 10" -DSIGNCODE=0 [please note that option -DSIGNCODE=0 is needed as workaround of Bug #58313 - in general you don't need to use this option] - make sure the output of the previous command do not contain the line "-- Cannot find wix 3, installer project will not be generated"" - execute: vcexpress MySql.sln /build RelWithDebInfo /project package /out mysql-5.5-build1.txt [please note that option /out is used just to write the compilation log to a file] Suggested fix: If possible, please replace "afxres.h" with "windows.h" in packaging\WiX\ca\CustomAction.rc (please also make sure that no regressions are created after this change). Before the fix: 1>------ Build started: Project: ZERO_CHECK, Configuration: RelWithDebInfo Win32 ------ 2>------ Build started: Project: GenServerSource, Configuration: RelWithDebInfo Win32 ------ 3>------ Build started: Project: gen_versioninfo, Configuration: RelWithDebInfo Win32 ------ 4>------ Build started: Project: wixca, Configuration: RelWithDebInfo Win32 ------ 4>CustomAction.rc(1): fatal error RC1015: cannot open include file 'afxres.h'. 4> 5>------ Build started: Project: ALL_BUILD, Configuration: RelWithDebInfo Win32 ------ 6>------ Build started: Project: PACKAGE, Configuration: RelWithDebInfo Win32 ------ 6> CPack: Create package using ZIP 6> CPack: Install projects 6> CPack: - Install project: MySQL 6> CPack: Compress package 6> CPack: Finalize package 6> CPack: Package D:/Santo_Local/mysql-source/mysql-5.5-build1/mysql-5.5.7-rc-win32.zip generated. ========== Build: 5 succeeded, 1 failed, 88 up-to-date, 0 skipped ========== After the fix: 1>------ Build started: Project: ZERO_CHECK, Configuration: RelWithDebInfo Win32 ------ 2>------ Build started: Project: gen_versioninfo, Configuration: RelWithDebInfo Win32 ------ 3>------ Build started: Project: wixca, Configuration: RelWithDebInfo Win32 ------ 3> Creating library D:/Santo_Local/mysql-source/mysql-5.5-build1/packaging/WiX/ca/RelWithDebInfo/wixca.lib and object D:/Santo_Local/mysql-source/mysql-5.5-build1/packaging/WiX/ca/RelWithDebInfo/wixca.exp 3> Creating library D:/Santo_Local/mysql-source/mysql-5.5-build1/packaging/WiX/ca/RelWithDebInfo/wixca.lib and object D:/Santo_Local/mysql-source/mysql-5.5-build1/packaging/WiX/ca/RelWithDebInfo/wixca.exp 3> wixca.vcxproj -> D:\Santo_Local\mysql-source\mysql-5.5-build1\packaging\WiX\ca\RelWithDebInfo\wixca.dll 4>------ Build started: Project: ALL_BUILD, Configuration: RelWithDebInfo Win32 ------ 5>------ Build started: Project: PACKAGE, Configuration: RelWithDebInfo Win32 ------ 5> CPack: Create package using ZIP 5> CPack: Install projects 5> CPack: - Install project: MySQL 5> CPack: Compress package 5> CPack: Finalize package 5> CPack: Package D:/Santo_Local/mysql-source/mysql-5.5-build1/mysql-5.5.7-rc-win32.zip generated. ========== Build: 5 succeeded, 0 failed, 89 up-to-date, 0 skipped ========== Note: After changing "afxres.h" with "windows.h", the windows installer package is correctly created as well. If we execute: vcexpress MySql.sln /build RelWithDebInfo /project msi /out mysql-5.5-build1.txt we get: 1>------ Build started: Project: ZERO_CHECK, Configuration: RelWithDebInfo Win32 ------ 2>------ Build started: Project: MSI, Configuration: RelWithDebInfo Win32 ------ 2> Microsoft (R) Windows Installer Xml Compiler version 3.0.5419.0 2> 2> Copyright (C) Microsoft Corporation. All rights reserved. 2> 2> 2> 2> mysql_server.wxs 2> 2> Microsoft (R) Windows Installer Xml Linker version 3.0.5419.0 2> 2> Copyright (C) Microsoft Corporation. All rights reserved. 2> 2> 2> 2> Building Custom Rule D:/Santo_Local/mysql-source/mysql-5.5-build1/packaging/WiX/CMakeLists.txt 2> CMake does not need to re-run because D:\Santo_Local\mysql-source\mysql-5.5-build1\packaging\WiX\CMakeFiles\generate.stamp is up-to-date. ========== Build: 2 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========