On Dec 14, 2007, at 12:19 AM, Andreas Färber wrote:
Am 12.12.2007 um 13:08 schrieb Alexander Graf:
Does it work if you specify "-framework CoreFoundation -framework
IOKit" in your LDFLAGS? That's what was needed on my Leopard x86_64
build.
If I configure with LDFLAGS:
LDFLAGS="-framework CoreFoundation -framework IOKit" ./configure --
prefix=/Users/andreas/Q/latest --target-list=sparc-softmmu --enable-
cocoa
it now ends like this:
gcc-3.3 -Wall -O2 -g -fno-strict-aliasing -I. -I.. -I/Users/andreas/
Q/myqemu/target-sparc -I/Users/andreas/Q/myqemu -D__powerpc__ -
D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/Users/
andreas/Q/myqemu/fpu -I/Users/andreas/Q/myqemu/slirp
the -framework flags are missing here
-mdynamic-no-pic -c -o cocoa.o /Users/andreas/Q/myqemu/cocoa.m
In file included from /System/Library/Frameworks/
Foundation.framework/Headers/Foundation.h:15,
from /System/Library/Frameworks/Cocoa.framework/
Headers/Cocoa.h:12,
from /Users/andreas/Q/myqemu/cocoa.m:38:
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:
62: error: parse error before "__attribute__"
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:
66: error: parse error before "__attribute__"
In file included from /System/Library/Frameworks/
Foundation.framework/Headers/NSAttributedString.h:6,
from /System/Library/Frameworks/Foundation.framework/
Headers/Foundation.h:16,
from /System/Library/Frameworks/Cocoa.framework/
Headers/Cocoa.h:12,
from /Users/andreas/Q/myqemu/cocoa.m:38:
/System/Library/Frameworks/Foundation.framework/Headers/
NSDictionary.h:45: error: parse error before "__attribute__"
/System/Library/Frameworks/Foundation.framework/Headers/
NSDictionary.h:50: error: parse error before "__attribute__"
In file included from /System/Library/Frameworks/
Foundation.framework/Headers/NSHashTable.h:5,
from /System/Library/Frameworks/Foundation.framework/
Headers/Foundation.h:43,
from /System/Library/Frameworks/Cocoa.framework/
Headers/Cocoa.h:12,
from /Users/andreas/Q/myqemu/cocoa.m:38:
/System/Library/Frameworks/Foundation.framework/Headers/
NSPointerFunctions.h:59: error: parse error before '@' token
In file included from /System/Library/Frameworks/
Foundation.framework/Headers/NSKeyValueCoding.h:9,
from /System/Library/Frameworks/Foundation.framework/
Headers/Foundation.h:49,
from /System/Library/Frameworks/Cocoa.framework/
Headers/Cocoa.h:12,
from /Users/andreas/Q/myqemu/cocoa.m:38:
/System/Library/Frameworks/Foundation.framework/Headers/NSSet.h:45:
error: parse error before "__attribute__"
/System/Library/Frameworks/Foundation.framework/Headers/NSSet.h:50:
error: parse error before "__attribute__"
In file included from /System/Library/Frameworks/AppKit.framework/
Headers/AppKit.h:19,
from /System/Library/Frameworks/Cocoa.framework/
Headers/Cocoa.h:13,
from /Users/andreas/Q/myqemu/cocoa.m:38:
/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:
68: error: parse error before "__weak"
In file included from /System/Library/Frameworks/AppKit.framework/
Headers/AppKit.h:78,
from /System/Library/Frameworks/Cocoa.framework/
Headers/Cocoa.h:13,
from /Users/andreas/Q/myqemu/cocoa.m:38:
/System/Library/Frameworks/AppKit.framework/Headers/NSPrintPanel.h:
57: error: parse error before '@' token
In file included from /System/Library/Frameworks/AppKit.framework/
Headers/AppKit.h:95,
from /System/Library/Frameworks/Cocoa.framework/
Headers/Cocoa.h:13,
from /Users/andreas/Q/myqemu/cocoa.m:38:
/System/Library/Frameworks/AppKit.framework/Headers/NSTrackingArea.h:
44: error: parse error before "__weak"
In file included from /System/Library/Frameworks/AppKit.framework/
Headers/NSTextView.h:16,
from /System/Library/Frameworks/AppKit.framework/
Headers/AppKit.h:112,
from /System/Library/Frameworks/Cocoa.framework/
Headers/Cocoa.h:13,
from /Users/andreas/Q/myqemu/cocoa.m:38:
/System/Library/Frameworks/AppKit.framework/Headers/
NSTextInputClient.h:17: error: parse error before '@' token
/System/Library/Frameworks/AppKit.framework/Headers/
NSTextInputClient.h:62: error: parse error before '@' token
In file included from /System/Library/Frameworks/AppKit.framework/
Headers/NSObjectController.h:10,
from /System/Library/Frameworks/AppKit.framework/
Headers/AppKit.h:158,
from /System/Library/Frameworks/Cocoa.framework/
Headers/Cocoa.h:13,
from /Users/andreas/Q/myqemu/cocoa.m:38:
/System/Library/Frameworks/CoreData.framework/Headers/
NSFetchRequest.h:24: error: parse error before "__weak"
In file included from /System/Library/Frameworks/CoreData.framework/
Headers/NSAttributeDescription.h:10,
from /System/Library/Frameworks/AppKit.framework/
Headers/NSPredicateEditorRowTemplate.h:13,
from /System/Library/Frameworks/AppKit.framework/
Headers/AppKit.h:175,
from /System/Library/Frameworks/Cocoa.framework/
Headers/Cocoa.h:13,
from /Users/andreas/Q/myqemu/cocoa.m:38:
/System/Library/Frameworks/CoreData.framework/Headers/
NSPropertyDescription.h:25: error: parse error before "__weak"
In file included from /System/Library/Frameworks/AppKit.framework/
Headers/AppKit.h:176,
from /System/Library/Frameworks/Cocoa.framework/
Headers/Cocoa.h:13,
from /Users/andreas/Q/myqemu/cocoa.m:38:
/System/Library/Frameworks/AppKit.framework/Headers/NSPathCell.h:
148: error: parse error before '@' token
In file included from /System/Library/Frameworks/AppKit.framework/
Headers/AppKit.h:177,
from /System/Library/Frameworks/Cocoa.framework/
Headers/Cocoa.h:13,
from /Users/andreas/Q/myqemu/cocoa.m:38:
/System/Library/Frameworks/AppKit.framework/Headers/NSPathControl.h:
73: error: parse error before '@' token
In file included from /System/Library/Frameworks/CoreData.framework/
Headers/CoreData.h:14,
from /System/Library/Frameworks/Cocoa.framework/
Headers/Cocoa.h:14,
from /Users/andreas/Q/myqemu/cocoa.m:38:
/System/Library/Frameworks/CoreData.framework/Headers/
NSEntityDescription.h:28: error: parse error before "__weak"
/System/Library/Frameworks/CoreData.framework/Headers/
NSEntityDescription.h:32: error: parse error before "__weak"
In file included from /System/Library/Frameworks/CoreData.framework/
Headers/CoreData.h:17,
from /System/Library/Frameworks/Cocoa.framework/
Headers/Cocoa.h:14,
from /Users/andreas/Q/myqemu/cocoa.m:38:
/System/Library/Frameworks/CoreData.framework/Headers/
NSRelationshipDescription.h:28: error: parse error before "__weak"
In file included from /System/Library/Frameworks/CoreData.framework/
Headers/CoreData.h:22,
from /System/Library/Frameworks/Cocoa.framework/
Headers/Cocoa.h:14,
from /Users/andreas/Q/myqemu/cocoa.m:38:
/System/Library/Frameworks/CoreData.framework/Headers/
NSManagedObject.h:26: error: parse error before "__weak"
In file included from /System/Library/Frameworks/CoreData.framework/
Headers/CoreData.h:27,
from /System/Library/Frameworks/Cocoa.framework/
Headers/Cocoa.h:14,
from /Users/andreas/Q/myqemu/cocoa.m:38:
/System/Library/Frameworks/CoreData.framework/Headers/
NSPersistentStore.h:16: error: parse error before "__weak"
In file included from /Users/andreas/Q/myqemu/target-sparc/cpu.h:20,
from /Users/andreas/Q/myqemu/vl.h:85,
from /Users/andreas/Q/myqemu/cocoa.m:40:
/Users/andreas/Q/myqemu/fpu/softfloat.h:51: warning: redefinition of
`uint8'
/System/Library/Frameworks/Security.framework/Headers/cssmconfig.h:
72: warning: `uint8' previously declared here
/Users/andreas/Q/myqemu/fpu/softfloat.h:53: error: conflicting types
for `uint16'
/System/Library/Frameworks/Security.framework/Headers/cssmconfig.h:
68: error: previous declaration of `uint16'
/Users/andreas/Q/myqemu/fpu/softfloat.h:55: warning: redefinition of
`uint32'
/System/Library/Frameworks/Security.framework/Headers/cssmconfig.h:
64: warning: `uint32' previously declared here
/Users/andreas/Q/myqemu/fpu/softfloat.h:57: warning: redefinition of
`uint64'
/System/Library/Frameworks/Security.framework/Headers/cssmconfig.h:
48: warning: `uint64' previously declared here
/Users/andreas/Q/myqemu/cocoa.m: In function `setApplicationMenu':
/Users/andreas/Q/myqemu/cocoa.m:860: warning: cannot find method `-
setAppleMenu:'; return type `id' assumed
make[1]: *** [cocoa.o] Error 1
Do you have a workaround for this as well?
I put the -framework definitions in ARCH_LDFLAGS. Basically what you
could do to reproduce that is
1. run configure normally
2. edit config-host.mak
3. add the -framework flags to ARCH_LDFLAGS
If that doesn't work, copy the above gcc line and add the flags
manually. Make should find the file as compiled afterwards and you can
at least complete the build.
Is this on Mac OS X PPC? My iBook is broken right now, so I can't
really check if any of this works. You can always compile qemu without
cocoa, using only vnc as output and have no framework dependencies
then.
Andreas