Re: November 5th is Clang-Day

From: Jan Beich <jbeich_at_tormail.org>
Date: Sat, 03 Nov 2012 14:47:54 -0700
David Naylor <naylor.b.david_at_gmail.com> writes:

> On Friday, 2 November 2012 10:13:30 David Chisnall wrote:
>
>> On 2 Nov 2012, at 05:24, Jan Beich wrote:
>> >> Known Issues
>> > 
>> > emulators/wine doesn't work with lib32 built by clang, probably due to
>> > wine bugs.
>> 
>> Is this still the case?  There was an issue preventing WINE from working
>> because it required stricter stack alignment than clang provided by
>> default, but I thought it was fixed.  Does WINE work if compiled with the
>> flag that forces stack realignment?  If not, then it's some other issue...
>
> There are two issues here: 1) wine compiled with clang, and 2) wine (compiled 
> with gcc) running on clang compiled base.  
>
> Regarding 1), according to the wiki [1], wine does have stack alignment issues 
> and some wine programs do not run when compiled with clang [2][3] and other 
> bugs with clang cause freezing within wine [4][5].  The impression I get is 
> that, using the work-a-round of stack realignment, wine does work to some 
> extent when compiled by clang.

Took me some time but now I can confirm that clang-built wine-1.5.16
works fine for me with gcc-built lib32 (i.e. ld-elf32.so.1 + /usr/lib32).
  
> Regarding 2) (which I believe Jan was referring to), when I have a gcc built 
> world and just replace lib32 with clang built libraries I have winecfg and 
> regedit launching but displaying black screens.  Switching back to gcc built 
> lib32 I get a working winecfg and regedit.  This, to me, indicates a clang 
> error somewhere.

My experience varies between clang-built and gcc-built wine.

  # clang, quick crash
  $ winecfg
  err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0x622975ab
  err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0x622975ab
  err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0x622975ab
  Exit 5

  # gcc, black rectangle
  $ winecfg
  err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0x622995ab
  err:service:service_send_start_message service L"MountMgr" failed to start
  fixme:service:scmdatabase_autostart_services Auto-start service L"MountMgr" failed to start: 1053
  err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0x622995ab
  err:service:service_send_start_message service L"PlugPlay" failed to start
  fixme:service:scmdatabase_autostart_services Auto-start service L"PlugPlay" failed to start: 1053
  err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0x622995ab
  err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0x622995ab
  load: 0.89  cmd: wine 14626 [piperd] 7.49r 0.03u 0.01s 0% 8932k

So, why not switch stack alignment in wine (upstream)? This would make
/stable/9 wine package continue to work on /head.

Here's my wine package built with and without the patch.

# sha256: cef5e543a5c534acb7237634224561863122ab3c256df319c6428856266d79fd
http://ompldr.org/vZzR0bw/4byte-clang-wine-fbsd64-1.5.16,1.txz
# sha256: 68e402bf7cb39ea48b9bef7772422cf476e89b214fd3b98ced37e0068f588c6c
http://ompldr.org/vZzR0ZA/16byte-clang-wine-fbsd64-1.5.16,1.txz


Received on Sat Nov 03 2012 - 20:51:36 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:31 UTC