qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] compiling on Mac OS X


From: David E . Still
Subject: Re: [Qemu-devel] compiling on Mac OS X
Date: Thu, 14 Oct 2004 11:43:23 -0700

Here's the solution I posted on Tuesday regarding this and a couple of other OS X build issues:
---
I'm still having build issues with the latest cvs builds. I've been able to resolve them all, but they should probably be fixed at the source:

1. In OS X, <sys/mman.h> does not include <sys/types.h>. I was able to get it to compile by adding #include <sys/types.h> in front of #include <sys/mann.h> in exec.c, but it should probably be added to each file where sys/mman.h is called. Perhaps with the following (sorry, I'm feeling too lazy to create a patch file :) ):

#ifdef __APPLE__
#include <sys/types.h>
#endif
#include <sys/mman.h>

2. A minor problem with the sparc guest build. In Mac OS X, the _sqrtf function is in lmx, not lm. So a minor change to the Makefile.target file:

--- qemu/Makefile.target        Mon Oct  4 14:23:09 2004
+++ qemu-cvs-20041011/Makefile.target   Mon Oct 11 12:05:10 2004
@@ -187,6 +187,9 @@
 ifdef CONFIG_WIN32
 LIBS+=-lwinmm -lws2_32 -liphlpapi
 endif
+ifeq ($(CONFIG_DARWIN),yes)
+LIBS+=-lmx
+endif

 # profiling code
 ifdef TARGET_GPROF

and sparc target will build. I presume that it works; I haven't tested it.

3. This isn't really a build issue, but I thought I'd include it. Since OS X doesn't use OSS for audio, why not have SDL built by default on OS X? Try this patch:

--- qemu/oss.c  Sat Oct  9 10:20:54 2004
+++ qemu-cvs-20041011/oss.c     Mon Oct 11 11:37:51 2004
@@ -30,7 +30,7 @@

 /* TODO: Graceful error handling */

-#if defined(_WIN32)
+#if defined(_WIN32) || defined(__APPLE__)
 #define USE_SDL_AUDIO
 #endif

That's all I have for now, other than latest cvs appears to be broken. :( Everything builds the same between yesterday (which I created the patches) and today, but today's qemu just pulls up a blank screen, or occaissionally some garbage. Not sure how to test that further. And I may be making some incorrect assumptions, such as the __APPLE__ flag indicating an OS X environment. [Ed: Tested, this flag does work.] Also, I have yet to get Win98 guest to produce any sound, even with the above patch. Still haven't tried Malc's patch, though. Perhaps later.

- Dave

--
David E. Still
Writer/Producer
TripleCat Productions
http://www.triplecatproductions.com
On Oct 14, 2004, at 3:22 AM, Benjamin Burke wrote:

On Oct 14, 2004, at 1:30 AM, Thal Ion wrote:
Hey everyone, I have downloaded and installed the OS X
package. [...] I got the following response from the terminal:
[...]
/usr/include/sys/mman.h:176: error: parse error before "size_t"

Try this instead of stddef.h

--- exec.c      Sat Oct  9 14:08:01 2004
+++ exec.c        Sun Oct 10 01:47:59 2004
@@ -21,6 +21,7 @@
 #ifdef _WIN32
 #include <windows.h>
 #else
+#include <sys/types.h>
 #include <sys/mman.h>
 #endif
 #include <stdlib.h>



_______________________________________________
Qemu-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/qemu-devel







reply via email to

[Prev in Thread] Current Thread [Next in Thread]