Has anyone given GCC 5.0 a shot?
It breaks x86_64 for me and other Fedora 22+ users (22 and up use 5.0). Running wine as pure 32-bit does not exhibit issues. We're using 1.7.36 with wine-staging applied.
In 64-bit mode it will not create a valid wine-prefix so I cannot run winedbg and nothing eventful happens with gdb attached to wine. Any ideas on how to debug this further?
Here is the terminal output when a fresh prefix is attempted to be made: http://fpaste.org/187377/25868142/
Regards, Michael
On Thu, Feb 19, 2015 at 12:04 AM, Michael Cronenworth mike@cchtml.com wrote:
Has anyone given GCC 5.0 a shot?
It breaks x86_64 for me and other Fedora 22+ users (22 and up use 5.0). Running wine as pure 32-bit does not exhibit issues. We're using 1.7.36 with wine-staging applied.
In 64-bit mode it will not create a valid wine-prefix so I cannot run winedbg and nothing eventful happens with gdb attached to wine. Any ideas on how to debug this further?
Start by compiling vanilla wine, to make sure it's not one of the staging patches.
That said, it's more likely a change in gcc. I've noticed breakages in wine64 for a few major gcc version changes. You'll definitely want to take advantage of git bisect run for this. See https://bugs.winehq.org/show_bug.cgi?id=33307, https://bugs.winehq.org/show_bug.cgi?id=36139, et al.
More explicitly, you'll need a shell script that: Builds gcc, installs it somewhere, then uses that gcc to compile wine64 (and 32-bit, you need both), then run wineboot. It should exit 125 for any compiling issues, 0 for success, non-zero/125 otherwise. git will do the rest, but it will take a while (took ~30 hours on a decent workstation the last time I tried).
On 02/19/2015 12:13 AM, Austin English wrote:
Start by compiling vanilla wine, to make sure it's not one of the staging patches.
Leaving out wine-staging does not fix it.
That said, it's more likely a change in gcc. I've noticed breakages in wine64 for a few major gcc version changes. You'll definitely want to take advantage of git bisect run for this. See https://bugs.winehq.org/show_bug.cgi?id=33307, https://bugs.winehq.org/show_bug.cgi?id=36139, et al.
More explicitly, you'll need a shell script that: Builds gcc, installs it somewhere, then uses that gcc to compile wine64 (and 32-bit, you need both), then run wineboot. It should exit 125 for any compiling issues, 0 for success, non-zero/125 otherwise. git will do the rest, but it will take a while (took ~30 hours on a decent workstation the last time I tried).
I'll try to setup git-bisect runs when I have a chance.
Thanks, Michael
On 02/19/2015 02:15 AM, Michael Cronenworth wrote:
I'll try to setup git-bisect runs when I have a chance.
Update: All sorts of Cool Things(tm) are happening in Fedora. We've just enabled hardening across all packages and that breaks compiling[1] wine. This also got me thinking the original problem could be due to a compiler flag so before I shot off thousands of git-bisects I did an experiment. Disabling all of Fedora's packaging compiler flags has stopped wine64 from crashing. Now I'm on the hunt to find the offending flag and/or commit.
[1] https://kojipkgs.fedoraproject.org//work/tasks/9055/9029055/build.log
On Mar 6, 2015 12:36 PM, "Michael Cronenworth" mike@cchtml.com wrote:
On 02/19/2015 02:15 AM, Michael Cronenworth wrote:
I'll try to setup git-bisect runs when I have a chance.
Update: All sorts of Cool Things(tm) are happening in Fedora. We've just enabled
hardening across all packages and that breaks compiling[1] wine. This also got me thinking the original problem could be due to a compiler flag so before I shot off thousands of git-bisects I did an experiment. Disabling all of Fedora's packaging compiler flags has stopped wine64 from crashing. Now I'm on the hunt to find the offending flag and/or commit.
[1] https://kojipkgs.fedoraproject.org//work/tasks/9055/9029055/build.log
Fedora also applies the wine staging patches, so you might want to start by disabling those so that you're testing vanilla Wine.
On 03/06/2015 12:41 PM, Austin English wrote:
Fedora also applies the wine staging patches, so you might want to start by disabling those so that you're testing vanilla Wine.
I had snipped out the part of my previous reply that stated I did not apply wine-staging.
P.S. I'm a co-maintainer of Wine in Fedora.
On Fri, Mar 6, 2015 at 12:48 PM, Michael Cronenworth mike@cchtml.com wrote:
On 03/06/2015 12:41 PM, Austin English wrote:
Fedora also applies the wine staging patches, so you might want to start by disabling those so that you're testing vanilla Wine.
I had snipped out the part of my previous reply that stated I did not apply wine-staging.
P.S. I'm a co-maintainer of Wine in Fedora.
Well, the reason I said that is the log you sent shows it being applied:
+ /usr/bin/make -C patches DESTDIR=/builddir/build/BUILD/wine-1.7.37 install make: Entering directory '/builddir/build/BUILD/wine-1.7.37/patches' WARNING: Using this Makefile is deprecated! "/builddir/build/BUILD/wine-1.7.37/patches/patchinstall.sh" DESTDIR="/builddir/build/BUILD/wine-1.7.37" --all Applying /builddir/build/BUILD/wine-1.7.37/patches/ws2_32-WriteWatches/0001-ntdll-Handle-write-watches-in-virtual_uninterrupted_.patch Applying /builddir/build/BUILD/wine-1.7.37/patches/ws2_32-WriteWatches/0002-ntdll-Expose-wine_uninterrupted_-read-write-_memory-.patch Applying /builddir/build/BUILD/wine-1.7.37/patches/ws2_32-WriteWatches/0003-ws2_32-Avoid-race-conditions-of-async-WSARecv-operat.patch Applying /builddir/build/BUILD/wine-1.7.37/patches/ws2_32-WriteWatches/0004-ws2_32-Avoid-race-condition-with-write-watches-in-WS.patch Applying /builddir/build/BUILD/wine-1.7.37/patches/ws2_32-WriteWatches/0005-ntdll-Try-to-handle-write-watches-while-we-re-on-the.patch Applying /builddir/build/BUILD/wine-1.7.37/patches/ntdll-WRITECOPY/0001-ntdll-Trigger-write-watches-before-passing-userdata-.patch Applying /builddir/build/BUILD/wine-1.7.37/patches/ntdll-WRITECOPY/0002-advapi-Trigger-write-watches-before-passing-userdata.patch Applying /builddir/build/BUILD/wine-1.7.37/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch Applying /builddir/build/BUILD/wine-1.7.37/patches/ntdll-WRITECOPY/0004-ntdll-Properly-handle-PAGE_WRITECOPY-protection.-try.patch Applying /builddir/build/BUILD/wine-1.7.37/patches/ntdll-WRITECOPY/0005-ntdll-Only-enable-true-WRITECOPY-protection-when-a-s.patch
On 03/06/2015 12:56 PM, Austin English wrote:
Well, the reason I said that is the log you sent shows it being applied:
That's an official build, by Andreas, which would have hardening and wine-staging applied. We would want Wine built that way in a perfect world.
I am performing local mock builds that
1) Isolate the build from other system includes and libs. 2) Does not apply wine-staging 3) Disables hardening 4) Disables Fedora's RPM build CFLAGS
On 03/06/2015 01:01 PM, Michael Cronenworth wrote:
That's an official build, by Andreas, which would have hardening and wine-staging applied. We would want Wine built that way in a perfect world.
Update:
Bisecting was not any help. I've gone back several years and the issue(s) are present.
After starting at the core library and working backwards I have narrowed down the problem to three functions (so far). See the attached patch. This code has largely been the same for a decade.
I have only diagnosed the RtlConvertSidToUnicodeString() in detail. The problem lies in the for() loop. Adding a function that involves a static string just above the for loop negates the issue. Related to the -f-move-loop-invariants optimization. The wine code has not changed... in 10 years. I will move this discussion to the gcc list once I can find a smaller reproducer.
On Fri, Mar 06, 2015 at 12:35:13PM -0600, Michael Cronenworth wrote:
On 02/19/2015 02:15 AM, Michael Cronenworth wrote:
I'll try to setup git-bisect runs when I have a chance.
Update: All sorts of Cool Things(tm) are happening in Fedora. We've just enabled hardening across all packages and that breaks compiling[1] wine. This also got me thinking the original problem could be due to a compiler flag so before I shot off thousands of git-bisects I did an experiment. Disabling all of Fedora's packaging compiler flags has stopped wine64 from crashing. Now I'm on the hunt to find the offending flag and/or commit.
[1] https://kojipkgs.fedoraproject.org//work/tasks/9055/9029055/build.log
Well, start with removing:
-Wp,-D_FORTIFY_SOURCE=2
which will not work in Wine.
Also what is in the specs file?
Ciao, Marcus