Bug #40280 Message compiler(mc.exe) needed to compile MySQL on windows
Submitted: 23 Oct 2008 10:40 Modified: 10 Nov 2008 19:12
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.0 OS:Microsoft Windows
Assigned to: Vladislav Vaintroub
Triage: Triaged: D3 (Medium)

[23 Oct 2008 10:40] Magnus Blåudd
Description:
In order for MySQL Server to be able to log messages to the Windows Event log the binary or a .dll need to contain a compiled in resource that defines a template for the messages that should be inserted. We build that resource from sql/message.mc using message compiler into message.h message.rc and msg00001.bin which are then compiled and linked into the mysqld binary. 

But this is an annoyance, since the message compiler(mc.exe) is not included with the Express edition's of Visual Studio and thus you need to download and install the Windows SDK just for this purpose only.

To make it easier to compile MySQL on windows we should make it possible to avoid that step.

After discussions, we decided to add the generated files message.h, message.rc and msg000001.bin to our source control. This is possible since the message.mc file haven't been changed for a long time and is not likely to change regularly.

Instructions how to generate the files from message.mc should be added to message.mc if we should need to change it.

How to repeat:
Compile MySQL on Windows using Visual Studio Express 2008

Suggested fix:
Add the three generated files to version control
[23 Oct 2008 13:29] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/56895

2708 Vladislav Vaintroub	2008-10-23
       Bug#40280: Message compiler(mc.exe) needed to compile MySQL on windows.
      
      Visual Studio 2008 Express edition does not include message compiler mc.exe
      It is not possible to build MySQL server if only VC2008 Express is installed,
      because we use mc.exe to generate event log messages.
      
      This patch removes the mc.exe dependency. Generated files message.h, 
      message.rc and MSG00001.bin  are checked into source code repository.
      Instructions on how to add or change messages are added to messages.mc
[24 Oct 2008 8:42] Bugs System
Pushed into 5.0.72  (revid:vvaintroub@mysql.com-20081023132853-yvztr338qvircmcm) (version source revid:vvaintroub@mysql.com-20081023132853-yvztr338qvircmcm) (pib:5)
[24 Oct 2008 20:02] Paul Dubois
Noted in 5.0.72 changelog.

mc.exe is no longer needed to compile MySQL on Windows. This makes it
possible to build MySQL from source using Visual Studio Express 2008.

Setting report to NDI pending push into 5.1.x, 6.0.x.
[10 Nov 2008 10:53] Bugs System
Pushed into 6.0.8-alpha  (revid:vvaintroub@mysql.com-20081023132853-yvztr338qvircmcm) (version source revid:vvaintroub@mysql.com-20081023161929-5dijlm9sv0qyly0f) (pib:5)
[10 Nov 2008 11:37] Bugs System
Pushed into 5.1.30  (revid:vvaintroub@mysql.com-20081023132853-yvztr338qvircmcm) (version source revid:vvaintroub@mysql.com-20081023155922-bpjbxomnqxppq7xl) (pib:5)
[10 Nov 2008 19:12] Paul Dubois
Note in 5.1.31, 6.0.8 changelogs.
[11 Nov 2008 16:28] Paul Dubois
6.0.9 changelog, not 6.0.8.
[19 Jan 2009 11:32] Bugs System
Pushed into 5.1.31-ndb-6.2.17 (revid:tomas.ulin@sun.com-20090119095303-uwwvxiibtr38djii) (version source revid:tomas.ulin@sun.com-20090108105244-8opp3i85jw0uj5ib) (merge vers: 5.1.31-ndb-6.2.17) (pib:6)
[19 Jan 2009 13:09] Bugs System
Pushed into 5.1.31-ndb-6.3.21 (revid:tomas.ulin@sun.com-20090119104956-guxz190n2kh31fxl) (version source revid:tomas.ulin@sun.com-20090119104956-guxz190n2kh31fxl) (merge vers: 5.1.31-ndb-6.3.21) (pib:6)
[19 Jan 2009 16:15] Bugs System
Pushed into 5.1.31-ndb-6.4.1 (revid:tomas.ulin@sun.com-20090119144033-4aylstx5czzz88i5) (version source revid:tomas.ulin@sun.com-20090119144033-4aylstx5czzz88i5) (merge vers: 5.1.31-ndb-6.4.1) (pib:6)