On Dec 14, 2007, at 4:17 PM, Andreas Färber wrote:
Am 14.12.2007 um 12:24 schrieb Alexander Graf:
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
No, this is an unrelated compilation of an .o file; LDFLAGS are used
when linking the object files to an executable. ARCH_LDFLAGS has no
influence here.
Yes, you're right. I did not see that.
-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,
[...]
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.
This is on Leopard ppc. I went back up to 20071001 and I still get
the same compilation problem, which didn't surface in Tiger back
then (and I didn't need to set any LDFLAGS there). This is really
puzzling!
Sounds like a Leopard problem then. -framework adds not only the
Library path (-L) of the framework, but also the header path (-I) to
the build. So maybe a -framework xxx would still help here. I can only
tell you that I have seen that problem on x86_64 as well and I did fix
it locally. I just can't remember how exactly I did it and it's
somewhere deep inside dark and gloomy git trees right now.
It looks like a conflict between QEMU's and the system's
definitions, no?
I always needed to add --enable-cocoa to configure, otherwise
configure aborts complaining about SDL not being present. If I do --
disable-sdl it still adds Cocoa support, and there is no --disable-
cocoa. The only VNC option I see is disabling TLS.
You can patch the configure script to not use cocoa (there is a
cocoa=yes line somewhere) and coreaudio, even if the system is darwin.
Do a --disable-sdl then and a --disable-gfx-check and it _should_
compile. See my first x86_64 osx patch for the places. I did remove
cocoa support for x86_64 there.
Cheers,
Alex