http://bugs.winehq.org/show_bug.cgi?id=28563
Bug #: 28563 Summary: With CLAGS="-O0" Comanche 3 does not find the CD Product: Wine Version: 1.3.29 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: c_korn@gmx.de Classification: Unclassified
Created attachment 36695 --> http://bugs.winehq.org/attachment.cgi?id=36695 wine 1.3.29 both local and /usr/bin/wine
Ok, the background is that I wanted to find out if bug 21293 was still a problem in wine 1.3.29 but then I noticed that there is regression in the main menu which renders it unusable. So I started a regression test.
The problem now was that the game behaved differently when I used my locally compiled version of wine 1.3.29 or when I used the /usr/bin/wine executable of wine 1.3.29 which comes with the PPA package of wine (I use Ubuntu 11.04 amd64).
With /usr/bin/wine there was a video intro and then I got to the main menu which has the graphic issues. With my own compiled wine executable however there was no intro video and then I got to another menu which says that not all game options are available because of the missing CD (this menu does not have graphic issues btw).
So kevlarman from #winehq was so friendly to help me analyze the bug. Attached you find a file with two logs. wine_log is from /usr/bin/wine and WINEDEBUG=+file wine_log_bug is from my own wine executable also with WINEDEBUG=+file
When you search for E:\ in there (E: is my cdrom drive letter) you will notice that in wine_log there is a call _lopen ("E:\C3G\KDV.PFF",0000) which is missing in wine_log_bug.
We found out that this had to do with the code optimization I used for compilation. CFLAGS="-g -O0" ./configure --verbose --disable-tests && make depend && make -j8 This was my compilation instruction which I got from http://wiki.winehq.org/RegressionTesting Changing it to this also made built version behave correctly like /usr/bin/wine: CFLAGS="-gdwarf-2 -O2 -pipe" ./configure --verbose --disable-tests && time make -j8
Important here is the -O2 flag (compilation with -O0 in the previous line brings the bug back again. So it is not related to -pipe or -gdwarf-2).
Now I was advised to also enable +relay in order to analyze it more detailed. Unfortunately with this WINEDEBUG flag also /usr/bin/wine behaves wrong now and I was not able to get the output +relay (neither piping it to gzip -1, netcat or a ramdisk helped here) with the correct behavior.
So this is in short. -O0 works not, -O2 works, -O2 +relay works not. It has to be some timing issue I assume. Also it is not clear whether the bug is in wine or gcc.
But at least I can do the regression testing about the graphic issues in the main menu...