[Bug 38380] New: OSX Wine64 compile hangs on /dlls/ntdll/relay.c with gcc4.9
https://bugs.winehq.org/show_bug.cgi?id=38380 Bug ID: 38380 Summary: OSX Wine64 compile hangs on /dlls/ntdll/relay.c with gcc4.9 Product: Wine Version: 1.7.40 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs(a)winehq.org Reporter: jshpettus(a)gmail.com Distribution: --- I attempted to compile wine with --win-64 bit enabled. I do realize support is preliminary. Anyway I installed gcc49 via macports and attempted to compile wine with all the dependencies installed on macports. ./configure --without-alsa --without-capi --with-cms --with-coreaudio --with-cups --with-curses --with-fontconfig --with-freetype --without-gphoto --with-glu --with-gnutls --without-gsm --without-hal --with-jpeg --without-ldap --without-mpg123 --without-openal --with-opengl --without-oss --with-png --with-pthread --without-sane --with-tiff --without-v4l --with-xcomposite --with-xcursor --with-xinerama --with-xinput --with-xml --with-xrandr --with-xrender --with-xshape --with-xslt --with-xxf86vm --with-x --x-include=/opt/local/include --x-lib=/opt/local/lib --disable-wineqtdecoder --disable-win16 --enable-win64 CFLAGS="-I/opt/local/include -L/opt/local/lib" CC=/opt/local/bin/gcc-mp-4.9 I also had to make an alternate version of my /usr/include/dispatch/object.c for gcc's sake. changing: typedef void (^dispatch_block_t)(void); to: typedef void* dispatch_block_t; Anyway, it got all the way to /dlls/ntdll/relay.c and it got caught up on some assembly stuff there. opt/local/bin/gcc-mp-4.9 -m64 -c -o relay.o relay.c -I. -I../../include -D__WINESRC__ -D_NTSYSTEM_ -D_REENTRANT -fPIC -Wall \ -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers \ -Wstrict-prototypes -Wtype-limits -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith \ -Wlogical-op -I/opt/local/include -L/opt/local/lib {standard input}:1406:suffix or operands invalid for `movq' {standard input}:1407:suffix or operands invalid for `movq' {standard input}:1408:suffix or operands invalid for `movq' {standard input}:1409:suffix or operands invalid for `movq' make[1]: *** [relay.o] Error 1 Is this a bug or is it user error? I'm fully inclined to believe the latter :) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38380 Josh Pettus <jshpettus(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Hardware|x86 |x86-64 OS|Linux |Mac OS X -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38380 Josh Pettus <jshpettus(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jshpettus(a)gmail.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38380 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish(a)gmail.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38380 Josh DuBois <duboisj(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |duboisj(a)codeweavers.com --- Comment #1 from Josh DuBois <duboisj(a)codeweavers.com> --- I have the same problem, and ntdll isn't the only place it crops up (also oleaut32 and rpcrt4 dlls, at the least). As far as I know, there are no released compilers which are capable of building 64-bit wine on OS X (gcc fails in the way you describe, and clang must be patched or exhibits other failures). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38380 --- Comment #2 from Josh DuBois <duboisj(a)codeweavers.com> --- Ken suggested the attached patches, which allow wine to compile with macports gcc 4.8 on my OS X 10.9.5 box. I am still in the process of testing, but it runs at least notepad (and relay logging seems to work OK, so the modified assembly works to that extent). For what it's worth, these failures: {standard input}:1409:suffix or operands invalid for `movq' ... appear to be caused by a known bug in Apple's assembler. The as I have in /usr/bin reports: duboisj:Downloads duboisj$ as -v Apple Inc version cctools-855, GNU assembler version 1.38 and an as installed from macports reports: duboisj:Downloads duboisj$ /opt/local/bin/as -v Apple Inc version cctools-845, GNU assembler version 1.38 Both of these suffer from failure to assemble the movq instructions which attempt to move from "normal" registers to the xmm0-3 registers. I wasn't able to find any assembler for OS X which did not suffer from the problem. GCC itself appears to have encountered the problem as well, calling the problem a lack of "interunit movq" support in the assembler, as documented in these bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56656 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65306 Note that you will also have to disable the mac driver by passing --disable-winemac.drv to configure, because there are Objective-C features which the mac driver uses which are only supported by clang. (You won't need to hack your /usr/include/dispatch/object.c that way). You can still run things with X11 even with the mac driver disabled. The attached patch should apply on top of winehq d15ca4edb9c3823a698c4bb6137c8777e1ad08dd. (The configure changes are unrelated to the movq problem, but still needed). I think the only alternative is to compile your own clang using the patches Charles Davis posted to wine-devel in January or February 2015, and that seems likely to be hard since it's been a while and they may not apply cleanly anymore. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38380 --- Comment #3 from Josh DuBois <duboisj(a)codeweavers.com> --- Created attachment 51353 --> https://bugs.winehq.org/attachment.cgi?id=51353 Allow GCC compilation of 64-bit wine on OS X -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38380 Josh DuBois <duboisj(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #4 from Josh DuBois <duboisj(a)codeweavers.com> --- confirmed. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38380 --- Comment #5 from Josh Pettus <jshpettus(a)gmail.com> --- Thanks for your help! (And Ken Too) I tried the patch and added --disable-winemac.drv. Strangely enough, it still required me to hack up /usr/include/dispatch/object.h and later /usr/include/xpc/base.h. hardly ideal. But it did compile! In theory I don't need the mac driver anyway. My goal is to try to run 64 bit chess engines, which are command line. So far so good! Got a 64 bit version of naum 4.6 playing my native stockfish in the osx xboard.app :) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38380 --- Comment #6 from Josh Pettus <jshpettus(a)gmail.com> --- I should point out that to get WoW working I followed the steps on the wiki, but I didn't actually run make install for 32bit wine or 64bit wine. I just call upon wine in the wine64 folder directly. I didn't even think of any library installation issues, I just didn't want to install stuff directly on the system without a package manager. :) eg.. ~/Documents/Wine64/wine /dir/win32bitOr64bit.exe. For the most part it works fine, but then chess engines are relatively simple programs. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38380 Sergey Isakov <isakov-sl(a)bk.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |isakov-sl(a)bk.ru --- Comment #7 from Sergey Isakov <isakov-sl(a)bk.ru> --- I used Clang to compile Wine64 under OSX. winemac.drv compiled as well. No need to patch registers. I only have to change --- diff --git a/include/msvcrt/crtdefs.h b/include/msvcrt/crtdefs.h index f2600ad..67a42cd 100644 --- a/include/msvcrt/crtdefs.h +++ b/include/msvcrt/crtdefs.h @@ -77,10 +77,17 @@ #ifndef __ms_va_list # if defined(__x86_64__) && defined (__GNUC__) -# define __ms_va_list __builtin_ms_va_list -# define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg) -# define __ms_va_end(list) __builtin_ms_va_end(list) -# define __ms_va_copy(dest,src) __builtin_ms_va_copy(dest,src) +# if defined(__APPLE__) +# define __ms_va_list __builtin_va_list +# define __ms_va_start(list,arg) __builtin_va_start(list,arg) +# define __ms_va_end(list) __builtin_va_end(list) +# define __ms_va_copy(dest,src) __builtin_va_copy(dest,src) +# else +# define __ms_va_list __builtin_ms_va_list +# define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg) +# define __ms_va_end(list) __builtin_ms_va_end(list) +# define __ms_va_copy(dest,src) __builtin_ms_va_copy(dest,src) +# endif # else # define __ms_va_list va_list # define __ms_va_start(list,arg) va_start(list,arg) --- and same in include/windef.h include/wine/test.h configure.ac I follow WIKI to WoW64 installation and got final result. But something else is wrong. The wine64 crashes with most applications. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38380 --- Comment #8 from Austin English <austinenglish(a)gmail.com> --- (In reply to Sergey Isakov from comment #7)
I used Clang to compile Wine64 under OSX. winemac.drv compiled as well.
The bug is about a hang with gcc-4.9, not clang. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38380 Sebastian Lackner <sebastian(a)fds-team.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian(a)fds-team.de --- Comment #9 from Sebastian Lackner <sebastian(a)fds-team.de> --- (In reply to Austin English from comment #8)
(In reply to Sergey Isakov from comment #7)
I used Clang to compile Wine64 under OSX. winemac.drv compiled as well.
The bug is about a hang with gcc-4.9, not clang.
Besides that replacing __builtin_ms_va_list with __builtin_va_list will obviously not work, not surprised that many apps crash. I would assume that the main problem of this bug (unsupported movq assembler operations) was already fixed by: http://source.winehq.org/git/wine.git/patch/44182ffb5b199893dfe3a4647efe1e85... Please retest. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38380 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |44182ffb5b199893dfe3a4647ef | |e1e8571599ea1 Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #10 from Austin English <austinenglish(a)gmail.com> --- (In reply to Sebastian Lackner from comment #9)
(In reply to Austin English from comment #8)
(In reply to Sergey Isakov from comment #7)
I used Clang to compile Wine64 under OSX. winemac.drv compiled as well.
The bug is about a hang with gcc-4.9, not clang.
Besides that replacing __builtin_ms_va_list with __builtin_va_list will obviously not work, not surprised that many apps crash.
I would assume that the main problem of this bug (unsupported movq assembler operations) was already fixed by: http://source.winehq.org/git/wine.git/patch/ 44182ffb5b199893dfe3a4647efe1e8571599ea1
Please retest.
Assuming fixed. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38380 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #11 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 1.7.52. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38380 --- Comment #12 from Sergey Isakov <isakov-sl(a)bk.ru> --- (In reply to Josh Pettus from comment #5)
Thanks for your help! (And Ken Too)
I tried the patch and added --disable-winemac.drv. Strangely enough, it still required me to hack up /usr/include/dispatch/object.h and later /usr/include/xpc/base.h. hardly ideal. But it did compile! In theory I don't need the mac driver anyway. My goal is to try to run 64 bit chess engines, which are command line. So far so good! Got a 64 bit version of naum 4.6 playing my native stockfish in the osx xboard.app :)
Instead of --disable-winemac.drv there is better solution Write CC=clang into dlls/winemac.drv/Makefile.in Enjoy! -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38380 --- Comment #13 from Josh Pettus <jshpettus(a)gmail.com> --- At the time, clang could not compile wine64 due to the lack of builtin_ms_va_list A few months ago, the patch to implement it finally was added to llvm master branch. I've been compiling 64bit versions of wine for a little bit now. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38380 --- Comment #14 from Sergey Isakov <isakov-sl(a)bk.ru> --- (In reply to Josh Pettus from comment #13)
At the time, clang could not compile wine64 due to the lack of builtin_ms_va_list
A few months ago, the patch to implement it finally was added to llvm master branch. I've been compiling 64bit versions of wine for a little bit now.
My proposition is to use clang ONLY for winemac.drv. It doesn't need builtin_ms_va_list. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38380 --- Comment #15 from Josh Pettus <jshpettus(a)gmail.com> --- I know, but it's not needed. If you have to go through the trouble of building installing gcc, its no problem to build and install the master build of clang, soon, it will find it's way into an xcode release. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org