Bug #21843 comp_err.exe fails to parse DOS style errmsg.txt
Submitted: 25 Aug 2006 22:40 Modified: 27 Aug 2006 20:30
Reporter: [ name withheld ] Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.4. OS:Microsoft Windows (Windows XP (Cygwin))
Assigned to: CPU Architecture:Any
Tags: comp_err, cygwin, errmsg.txt, win32

[25 Aug 2006 22:40] [ name withheld ]
Description:
While working under Cygwin I had to download the sources from the latest MySQL tarbal. I unpacked this tar.gz file outside of the Cygwin environement using Winzip. Therefore DOS style files where created where applicable.

After a succesfull ./configure, install make fails.
The error message states "Cannot parse ../sql/share/errmsg.txt".
This happens directly after compiling comp_err.exe.

Running comp_err.exe separately generates the same error.

After opening the file sql/share/errmsg.txt into a texteditor (Ultraedit in my case) and making sure the file is saved UNIX style (no \r\n, just \n I assume) the comp_err doesn't fail anymore.

make install now continues.

How to repeat:
Unpacked the tarbal tar.gz file outside of the Cygwin environement using Winzip. 

Run ./configure, 
Run install make 

Compiling the extra directory will fail stating 
"Cannot parse ../sql/share/errmsg.txt".

No line number will be provided by the errormessage.

Suggested fix:
Expand the code in comp_err.c to detect the filetype, or support DOS-style EOL.
When I'm not mistaken, the difference between \r\n and \n.
[25 Aug 2006 23:29] Miguel Solorzano
Thank you for the bug report. Sorry but currently the compilation on Windows
under Cygwin isn't supported, for to compile the source you need VS 2003 and
up.
[27 Aug 2006 20:30] [ name withheld ]
Just to be very clear about this.
After opening the errmsg.txt file and saving it as an UNIX style file, I tried again "make install".

Now the _complete_ compilation succeeded under CygWIN.
[27 Aug 2006 20:42] Sergei Golubchik
Yes, Miguel didn't say that it didn't work, he said it wasn't supported.
That is, we don't fix bugs that appear only in this environment
(we simply have no resources for that).

But if you'll provide a patch that will make comp_err to support DOS line endings, we will be happy to apply it.