http://bugs.winehq.org/show_bug.cgi?id=19785
Summary: fwrite fails in rc.exe; breaks firefox build Product: Wine Version: 1.1.27 Platform: PC OS/Version: Linux Status: NEW Keywords: download Severity: normal Priority: P2 Component: msvcrt AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
First, apply the cheesy workaround (dummy mt.exe) to get past bug 24461, and make again. It will fail like this:
rc.exe -DMOZILLA_CLIENT=1 -DNDEBUG=1 -DXP_PC=1 -DWIN32=1 -DWIN95=1 -D_PR_GLOBAL_THREADS_ONLY=1 -D_X86_=1 -DFORCE_PR_LOG -D_NSPR_BUILD_ -Ic:/demo/firefox-191src/ff-dbg/dist/include/nspr -I/c/demo/firefox-191src/nsprpub/pr/include -I/c/demo/firefox-191src/nsprpub/pr/include/private -Fonspr.res /c/demo/firefox-191src/nsprpub/pr/src/nspr.rc
RC : fatal error RW1022: I/O error writing file.
To re-reproduce quickly, do:
cd ~/.wine/drive_c/mozilla-build wineconsole cmd
In wineconsole: start-msvc8-wine.bat cd /c/demo/firefox-191src/ff-dbg/nsprpub/pr/src rm nspr.res make nspr.res
It looks like it opens a file for read, then gets upset it can't write to it?
trace:file:CreateFileW L"C:\demo\firefox-191src\ff-dbg\nsprpub\pr\src\RD000046" GENERIC_READ FILE_SHARE_READ FILE_SHARE_WRITE creation 3 attributes 0x80 ... trace:file:CreateFileW returning 0x8c ... 0057:Call msvcrt.fwrite(0033ea58,00000001,00000004,0013a118) ret=400105e0 0057:Call KERNEL32.WriteFile(0000008c,0033ea58,00000004,0033e918,00000000) ret=7ebf4e75 trace:file:WriteFile 0x8c 0x33ea58 4 0x33e918 (nil) 0057:Ret KERNEL32.WriteFile() retval=00000000 ret=7ebf4e75 0057:Ret msvcrt.fwrite() retval=00000000 ret=400105e0 0057:Call KERNEL32.CreateFileA(010015ec "CONOUT$",40000000,00000003,00000000,00000003,00000000,00000000) ret=010044ec ...
where it's probably opening CONOUT$ so it can write an error message.
Sure enough, winetricks msvcrt works around this.
http://bugs.winehq.org/show_bug.cgi?id=19785
Eric Pouech eric.pouech@orange.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech@orange.fr
--- Comment #1 from Eric Pouech eric.pouech@orange.fr 2009-08-29 14:24:04 --- Dan,
you've only pasted the bits of the call to fwrite->WriteFile could also either post the log, or better paste here the details of the creation of the FILE* pointer in msvcrt (fopen or its friends) A+
http://bugs.winehq.org/show_bug.cgi?id=19785
--- Comment #2 from Dan Kegel dank@kegel.com 2009-08-29 16:51:59 --- OK, I'll get the log... (Err, I meant bug 19783, not bug 24461, which doesn't exist yet.)
http://bugs.winehq.org/show_bug.cgi?id=19785
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE
--- Comment #3 from Dan Kegel dank@kegel.com 2009-08-29 20:34:33 --- Surprise! This is a dup of bug 18479; the patch from that bug fixes this problem.
*** This bug has been marked as a duplicate of bug 18479 ***
http://bugs.winehq.org/show_bug.cgi?id=19785
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Dmitry Timoshkov dmitry@codeweavers.com 2009-08-30 00:01:37 --- Closing duplicate.