qemu 0.10.6 on Mac OS X Tiger: NSFullScreenModeAllScreens undeclared
A message that is not in the archive (sent off-list or not yet received): [email protected]
I have made so many patches that fixed problems with the cocoa.m file. I sent them all in and not a single one of them made it into cocoa.m. I have emailed Anthony Liguori about these missing patches. He said they were already committed. They weren't. I don't know what else to do. I could send the modified cocoa.m to you if you want.
Quoted 57 lines · On Aug 12, 2009, at 7:46 AM, [email protected] wrote:
Message: 1
Date: Wed, 12 Aug 2009 05:11:53 -0500
From: Ryan Schmidt <[email protected]>
Subject: [Qemu-devel] qemu 0.10.6 on Mac OS X Tiger:
NSFullScreenModeAllScreens undeclared
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowedHi. I'm with the MacPorts project (a package management system for Mac OS X), and we've received some reports that qemu 0.10.6 can't be built on Mac OS X 10.4 Tiger. This is what I get on 10.4.11 Intel:
OBJC cocoa.o
cocoa.m:233: warning: no previous prototype for 'cocoa_keycode_to_qemu' cocoa.m: In function '-[QemuCocoaView toggleFullScreen:]':
cocoa.m:426: warning: 'QemuCocoaView' may not respond to '- exitFullScreenModeWithOptions:'
cocoa.m:426: warning: (Messages without a matching method signature cocoa.m:426: warning: will be assumed to return 'id' and accept cocoa.m:426: warning: '...' as arguments.)
cocoa.m:444: error: 'NSFullScreenModeAllScreens' undeclared (first use in this function)
cocoa.m:444: error: (Each undeclared identifier is reported only once cocoa.m:444: error: for each function it appears in.) cocoa.m:445: error: 'NSFullScreenModeSetting' undeclared (first use in this function)
cocoa.m:446: warning: 'QemuCocoaView' may not respond to '- enterFullScreenMode:withOptions:'
cocoa.m: In function '-[QemuCocoaAppController openPanelDidEnd:returnCode:contextInfo:]':
cocoa.m:786: warning: initialization discards qualifiers from pointer target type
make: *** [cocoa.o] Error 1This has been reported in many places:
http://lists.gnu.org/archive/html/qemu-devel/2008-10/msg00336.html
http://lists.macosforge.org/pipermail/macports-users/2009-April/
014665.htmlhttp://lists.macosforge.org/pipermail/macports-users/2009-May/
015353.htmlhttp://qemu-forum.ipi.fi/viewtopic.php?f=6&t=5161&p=15200
In response to the October 2008 report of this problem on qemu-devel, this response included a patch:
http://lists.gnu.org/archive/html/qemu-devel/2008-10/msg00393.html
So, what is the status of this issue? Will the patch be incorporated? It doesn't apply cleanly anymore to the 0.10.6 sources; 3 of the 16 hunks fail to apply, so I don't know if it actually fixes the issue.
Quoted 1 line · On Aug 12, 2009, at 09:20, G 3 wrote:
I have made so many patches that fixed problems with the cocoa.m file. I sent them all in and not a single one of them made it into cocoa.m. I have emailed Anthony Liguori about these missing patches. He said they were already committed. They weren't. I don't know what else to do. I could send the modified cocoa.m to you if you want.
Thank you, that would be kind. If you could send a diff for cocoa.m from 0.10.6 that would be great.
Quoted 3 lines · Ryan Schmidt
Quoted 1 line · On Aug 12, 2009, at 09:20, G 3 wrote:
I have made so many patches that fixed problems with the cocoa.m file. I sent them all in and not a single one of them made it into cocoa.m. I have emailed Anthony Liguori about these missing patches. He said they were already committed. They weren't. I don't know what else to do. I could send the modified cocoa.m to you if you want.
Those cocoa patches never applied cleanly to git.
Regards,
Anthony Liguori
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · On Aug 12, 2009, at 17:29, G 3 wrote:
Quoted 4 lines · Ryan Schmidt
Quoted 1 line · On Aug 12, 2009, at 09:20, G 3 wrote:
I have made so many patches that fixed problems with the cocoa.m file. I sent them all in and not a single one of them made it into cocoa.m. I have emailed Anthony Liguori about these missing patches. He said they were already committed. They weren't. I don't know what else to do. I could send the modified cocoa.m to you if you want.
Quoted 7 lines
Quoted 1 line
Thank you, that would be kind. If you could send a diff for cocoa.m from 0.10.6 that would be great.
Sending you the entire file would be a lot easier. All you have to do is replace the old file with the new one. Enjoy.
<cocoa.m>
Note: I haven't compiled this file under 10.4. I do know it compiles cleanly under 10.3. I used gcc 3.3 and make 3.81.
Attached is the diff between the version of cocoa.m in qemu 0.10.6 and the one you sent me. The changes you propose don't seem to relate to the code that is failing for me, and I still get the same error message when I try to build on 10.4.
cocoa.m renamed from cocoa.m.orig +11 -3
@@ -23,11 +23,17 @@ */ #import <Cocoa/Cocoa.h> - #include "qemu-common.h" #include "console.h" #include "sysemu.h" +#ifndef MAC_OS_X_VERSION_10_4 +#define MAC_OS_X_VERSION_10_4 1040 +#endif + +#ifndef __LITTLE_ENDIAN__ +#define __LITTLE_ENDIAN__ 0 /* assume PowerPC*/ +#endif //#define DEBUG
@@ -55,6 +61,8 @@ } QEMUScreen; int qemu_main(int argc, char **argv); // main defined in qemu/vl.c +int cocoa_keycode_to_qemu(int keycode); + NSWindow *normalWindow; id cocoaView; static DisplayChangeListener *dcl;
@@ -783,8 +791,8 @@ if(returnCode == NSCancelButton) { exit(0); } else if(returnCode == NSOKButton) { - char *bin = "qemu"; - char *img = (char*)[ [ sheet filename ] cStringUsingEncoding:NSASCIIStringEncoding]; + char bin[5] = "qemu"; + char *img = (char*)[ [ sheet filename ] cString]; char **argv = (char**)malloc( sizeof(char*)*3 );
Quoted 14 lines · Ryan Schmidt
Quoted 12 lines · On Aug 12, 2009, at 17:29, G 3 wrote:
Quoted 5 lines · Ryan Schmidt
Quoted 1 line · On Aug 12, 2009, at 09:20, G 3 wrote:
I have made so many patches that fixed problems with the cocoa.m file. I sent them all in and not a single one of them made it into cocoa.m. I have emailed Anthony Liguori about these missing patches. He said they were already committed. They weren't. I don't know what else to do. I could send the modified cocoa.m to you if you want.
Thank you, that would be kind. If you could send a diff for cocoa.m from 0.10.6 that would be great.
Sending you the entire file would be a lot easier. All you have to do is replace the old file with the new one. Enjoy.
<cocoa.m>
Quoted 7 lines
Quoted 1 line
Note: I haven't compiled this file under 10.4. I do know it compiles cleanly under 10.3. I used gcc 3.3 and make 3.81.
Attached is the diff between the version of cocoa.m in qemu 0.10.6 and the one you sent me. The changes you propose don't seem to relate to the code that is failing for me, and I still get the same error message when I try to build on 10.4.
<cocoa.m.diff>
I did a little research and found out why you are having problems compiling the cocoa.m file. It is a problem with this line: #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4). It is located just a few lines above this line: if ([NSView respondsToSelector:@selector(enterFullScreenMode:withOptions:)]).
The greater than or equal to sign should be switched to just greater
than. The method enterFullScreenMode:withOptions: is only available on Mac OS 10.5 or higher. That is why you are seeing the error with NSFullScreenModeAllScreens on 10.4. Hope this helps.
On Aug 13, 2009, at 6:18 PM, Ryan Schmidt wrote:
<excerpt>On Aug 12, 2009, at 17:29, G 3 wrote:
<excerpt>On Aug 12, 2009, at 5:18 PM, Ryan Schmidt wrote:
<excerpt>On Aug 12, 2009, at 09:20, G 3 wrote:
<excerpt>I have made so many patches that fixed problems with the cocoa.m file. I sent them all in and not a single one of them made it into cocoa.m. I have emailed Anthony Liguori about these missing patches. He said they were already committed. They weren't. I don't know what else to do. I could send the modified cocoa.m to you if you want.
</excerpt>
Thank you, that would be kind. If you could send a diff for cocoa.m from 0.10.6 that would be great.
</excerpt>
Sending you the entire file would be a lot easier. All you have to do is replace the old file with the new one. Enjoy.
<<cocoa.m>
Note: I haven't compiled this file under 10.4. I do know it compiles cleanly under 10.3. I used gcc 3.3 and make 3.81.
</excerpt>
Attached is the diff between the version of cocoa.m in qemu 0.10.6 and the one you sent me. The changes you propose don't seem to relate to the code that is failing for me, and I still get the same error message when I try to build on 10.4.
<<cocoa.m.diff>
</excerpt>
I did a little research and found out why you are having problems
compiling the cocoa.m file. It is a problem with this line: #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4). It is located
just a few lines above this line:
<fixed><color><param>7676,0F0F,5050</param>if</color> ([NSView respondsToSelector:<color><param>7676,0F0F,5050</param>@selector</color>(enterFullScreenMode:withOptions:)]).
</fixed> The greater than or equal to sign should be switched to just greater than. The method enterFullScreenMode:withOptions: is only available on Mac OS 10.5 or higher. That is why you are seeing the error with NSFullScreenModeAllScreens on 10.4. Hope this helps.