FS#28002 - [multilib] Many gcc multilib packages break Wine dsound.

Attached to Project: Arch Linux
Opened by Xavier Vachon (xvachon) - Thursday, 19 January 2012, 18:21 GMT
Last edited by Florian Pritz (bluewind) - Monday, 13 February 2012, 14:53 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

A bug report was originally filled on the Wine bugzilla about the problem : http://bugs.winehq.org/show_bug.cgi?id=29431 .

However, after some discussions with a Wine dev who works on the problematic component (in the bug report : Andrew Eikum), it is not clear if the problem originates from the Arch multilib packages or from issues in Wine Dsound. Please read the Wine bug report for details.

I am opening this bug report here to generate brainstorming on the Arch side.

Additional info:

The current work around is to use these package versions and prevent them from upgrading, and then recompile Wine from source :

binutils-multilib 2.22-4
gcc-libs-multilib 4.6.2-1
gcc-multilib 4.6.2-1
lib32-gcc-libs 4.6.2-1
lib32-glib2 2.30.2-1
libtool-multilib 2.4.2-2
This task depends upon

Closed by  Florian Pritz (bluewind)
Monday, 13 February 2012, 14:53 GMT
Reason for closing:  Not a bug
Comment by Andrew Eikum (ColdPie) - Thursday, 19 January 2012, 19:08 GMT
In fact, the problem appears to be with these packages:
lib32-gcc-libs
gcc-libs-multilib
gcc-multilib

The broken behavior appeared when I upgraded those packages from 4.6.2-1 to 4.6.2-3. I suspect the SSE optimizations in this commit:
http://projects.archlinux.org/svntogit/community.git/commit/trunk?h=packages/gcc-multilib&id=61941732359f1319b2eada4288b0bba9bcfde564
but I haven't confirmed it.

A simple way to reproduce is with the Plants Vs Zombies demo, which will crash when you try to launch the installed program:
http://static-www.ec.popcap.com/binaries/popcap_downloads/PlantsVsZombiesSetup_20110729_2_2.exe
Comment by Sven-Hendrik Haase (Svenstaro) - Friday, 20 January 2012, 19:07 GMT
Issue confirmed.

I recompiled gcc-multilib without the SSE stuff but I got the same results.
Comment by Xavier Vachon (xvachon) - Thursday, 26 January 2012, 12:16 GMT
The latest update to the multilib gcc packages :

[2012-01-26 06:46] upgraded lib32-gcc-libs (4.6.2-5.1 -> 4.6.2-6)
[2012-01-26 06:46] upgraded gcc-libs-multilib (4.6.2-5.1 -> 4.6.2-6)
[2012-01-26 06:46] upgraded gcc-multilib (4.6.2-5.1 -> 4.6.2-6)

dit not solve the problem.
Comment by Xavier Vachon (xvachon) - Friday, 27 January 2012, 21:43 GMT
Andrew found a better workaround. Compiling from source with the tweak -mfpmath=387 to CFLAGS works nicely. See http://bugs.winehq.org/show_bug.cgi?id=29431#c14
Comment by Xavier Vachon (xvachon) - Sunday, 05 February 2012, 16:03 GMT
Not fixed in multilib/lib32-gcc-libs 4.6.2-7
Comment by Sven-Hendrik Haase (Svenstaro) - Sunday, 05 February 2012, 16:09 GMT
How does this relate to https://bugs.archlinux.org/task/27560 ?
Comment by Andrew Eikum (ColdPie) - Monday, 06 February 2012, 16:43 GMT
Sven-Hendrik: Looks like a duplicate to me.

That bug says, "Recompile wine with the newest gcc-multilib, try to run a directsound game (StarCraft II). This is a stack alignment crash." And indeed, adding -mstackrealign to the dsound build flags fixes it.
Comment by Xavier Vachon (xvachon) - Monday, 06 February 2012, 16:54 GMT
So, is the correct workaround "-mstackrealign" or "-mfpmath=387" ?
Comment by Andrew Eikum (ColdPie) - Monday, 06 February 2012, 17:04 GMT
Seems to be -mstackrealign. I updated the WineHQ bug and marked it duplicate with an explanation.
Comment by Florian Pritz (bluewind) - Saturday, 11 February 2012, 18:25 GMT
We already add -mstackrealign to the cflags when calling make so why doesn't it work then? Does dsound use separate cflags?
Comment by Jason William Walton (jasonww) - Sunday, 12 February 2012, 15:16 GMT
Easiest way to enforce them would likely be:

export CC="/usr/bin/gcc -mstackrealign"
export CXX="/usr/bin/g++ -mstackrealign"

and kill the other mstackrealign fix if this works.
Comment by Andrew Eikum (ColdPie) - Monday, 13 February 2012, 14:26 GMT
Florian: The problem isn't with Arch's Wine package; that works fine, like you said. The problem was that upgrading these packages broke user-built Wine if the user didn't specify -mstackrealign.

I think it would be fine to close this bug as a Duplicate of Bug 27560 (Wine breaks without -mstackrealign) or as Invalid (users must build with -mstackrealign, as documented by Arch's Wine PKGBUILD).

Jason: I found that's the best way to build. Then we don't lose default CFLAGS like -g -O2. Might be worth investigating the Arch PKGBUILD to ensure those default CFLAGS are still used.
Comment by Florian Pritz (bluewind) - Monday, 13 February 2012, 14:41 GMT
Xavier, please tell us if the wine you used to find this bug was custom built or from our repos.
Comment by Xavier Vachon (xvachon) - Monday, 13 February 2012, 14:45 GMT
I compile wine from the git repository, as explained here : http://wiki.winehq.org/GitWine

Loading...