Building Qemu 0.15.1 on OS X 10.5.8

End of the line for the PPC

So I was wanting to build Qemu for my somewhat new G5.  After going through some hardware hell, of a bad hard disk, ram, and having to reseat the video card (should have figure it’d get shaken in the transit) and blowing out all the gunk, my G5 is now in action! … But silly me I wanted to play with OS/2 and while I do have Virtual PC for OS X (yeah MSDN) I wanted to play with Qemu.

I didn’t feel like dealing with 1.0.1, I thought I’d take a stab at the older stable branch, 0.15.1 .. And what a joy that was.

So first off I installed OS X 10.5 from the nicely provided install DVD.  That went fine with good RAM (shockingly with bad memory it gets corrupted and has all kinds of errors, if only the RAM test from the boot ROM was worth anything…. but it makes a nice chime noise).  So I found out much to my amazement after unpacking and going to build 10.15.1 that it requires.. glib-2.0 .  Well damn, this puts me in the same build hell that made Qemu 1.0+ in Win32.

But I figured OS X being a UNIX it may be somewhat easier to build… Somewhat.

So I started with glib-2.30.2, which of course dies because there is no pkg-config.  I download pkg-config-0.26 which won’t build because… yes, there is no glib-2.0 …. GRRRR!!!!  So I try pkg-config-0.18.1 and it actually builds!  One thing to keep in mind is that you *MUST* have the environment variable “PKG_CONFIG_PATH” set to something like this:

PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH

or it won’t work. I tried to build glib again, and now it fails because there is no libffi.  I try libffi-3.0.10 and it won’t build with some weird error of:

$ make
MAKE powerpc-apple-darwin9.8.0 : 0 * all-all
make: *** [all-all] Error 1

And yes it still did it after I was able to build glib2 (spoiler!?)…

Thankfully, libffi-3.0.4 did build, and installed fine.  So I try to build glib2 again, and now I fail because it wants gettext, so I went ahead and was able to build and install gettext-0.18.1.1 .  I went to build glib-2 and was totally shocked when it not only configured, but actually compiled!

I installed it, and was able to build Qemu 0.15.1, I just did the i386-softmmu target with the NE2000 fixed to be 0x300,IRQ 10, and enabled the AdLib!  And it compiled!

Now I’m sure some of the things that I’m fighting is that I’m on a PowerPC (G5!) and needless to say this version has been pretty much abandoned by everyone. I’m also using the dev tools that came on the 10.5 DVD, gcc version 4.0.1 (Apple Inc. build 5465) Which is great because they don’t seem to let you download any of the old X-Code stuff anymore..

The good news is that I could boot up my OS/2 disk image, the TCP/IP worked, however the mouse was all screwed up, left clicking just jumps the mouse like crazy, but it seems to track correctly, it just doesn’t click correctly… However the sound works GREAT!

Doom 1.1 on OS/2 2.0 via Qemu 0.15.1 on OS X

I know it isn’t much to look at, but it actually runs!

So here, for my fellow PowerPC OS X refugees, here is Qemu 0.15.1, I just built it for the i386. Doom in OS/2 on it is quite playable, but I’ve got a 2.5Ghz G5 so…. Your millage may vary.  Greatly.

And for the real daring people, here is Qemu 1.0.1 for the PowerPC.  I haven’t done much of any testing outside of loading up OS/2 2.0 from an image I had on my Windows 8 PC, connecting to the internet, and then loading up the shareware version of Doom 1.1

Leave a Reply