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.