The current Qemu master branch crashes under OSX with a GThread error. Commenting out vlc.c line 2188 (call to g_thread_init) allows it to run successfully. I am running OSX Lion. Two caveats:
1) You need to apply Andreas' patch to softfloat.h to fix compile error for uint16 2) You need to compile with gcc-4.2 (non LLVM gcc) and specify --disable-user to successfully compile See log below. Thanks! -Juan $ ./configure --disable-user --enable-debug --cc=gcc-4.2 --host-cc=gcc-4.2 $ make $ gdb ./i386-softmmu/qemu-system-i386 ... GThread-ERROR **: GThread system may only be initialized once. aborting... Program received signal SIGABRT, Aborted. 0x00007fff8e50dce2 in __pthread_kill () (gdb) bt #0 0x00007fff8e50dce2 in __pthread_kill () #1 0x00007fff94dc17d2 in pthread_kill () #2 0x00007fff94db2a7a in abort () #3 0x0000000100da28c3 in g_logv () #4 0x0000000100da247e in g_log () #5 0x0000000100d74333 in g_thread_init () #6 0x00000001000e6d8c in qemu_main (argc=3, argv=0x10a896710, envp=0x7fff5fbff120) at /Users/juan/Temp/build/qemu-source_code/vl.c:2188 #7 0x0000000100142e65 in -[QemuCocoaAppController startEmulationWithArgc:argv:] (self=0x1011299d0, _cmd=0x1002818e4, argc=3, argv=0x10a896710) at cocoa.m:798 #8 0x000000010014306a in -[QemuCocoaAppController openPanelDidEnd:returnCode:contextInfo:] (self=0x1011299d0, _cmd=0x1002818aa, sheet=0x10114e450, returnCode=1, contextInfo=0x0) at cocoa.m:822 #9 0x00007fff9551955e in -[NSSavePanel _didEndSheet:returnCode:contextInfo:] () #10 0x00007fff952987d7 in -[NSApplication endSheet:returnCode:] () #11 0x00007fff94a78a1d in -[NSObject performSelector:withObject:] () #12 0x00007fff950e7710 in -[NSApplication sendAction:to:from:] () #13 0x00007fff950e7642 in -[NSControl sendAction:to:] () #14 0x00007fff950e756d in -[NSCell _sendActionFrom:] () #15 0x00007fff950e6a30 in -[NSCell trackMouse:inRect:ofView:untilMouseUp:] () #16 0x00007fff951668e0 in -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] () #17 0x00007fff950e563a in -[NSControl mouseDown:] () #18 0x00007fff950b00e0 in -[NSWindow sendEvent:] () #19 0x00007fff9504868f in -[NSApplication sendEvent:] () #20 0x00007fff94fde682 in -[NSApplication run] () #21 0x0000000100144254 in main (argc=1, argv=0x7fff5fbff110) at cocoa.m:945 (gdb) up #1 0x00007fff94dc17d2 in pthread_kill () (gdb) up #2 0x00007fff94db2a7a in abort () (gdb) up #3 0x0000000100da28c3 in g_logv () (gdb) up #4 0x0000000100da247e in g_log () (gdb) up #5 0x0000000100d74333 in g_thread_init () (gdb) up #6 0x00000001000e6d8c in qemu_main (argc=3, argv=0x10a896710, envp=0x7fff5fbff120) at /Users/juan/Temp/build/qemu-source_code/vl.c:2188 2188 g_thread_init(NULL); Current language: auto; currently c (gdb) On Oct 31, 2011, at 8:32 AM, Juan Pineda wrote: > Hi Andreas, > > Thanks for your reply. You can verify that my cocoa.m patch works 100% under > 0.15.1. That's where I was testing it. The fix is completely independent of > the other problems in the OSX build (uint16, GThread, etc.) that have cropped > up since 0.15.1, so there should be no problem merging it. > > I will us GDB on that GThread error to find the source code line where it > failed and post what I find. > > Thanks! > -Juan > > > > On Oct 30, 2011, at 3:45 PM, Andreas Färber wrote: > >> Am 18.10.2011 16:35, schrieb Juan Pineda: >>>>> What command line do you use? If using the right arguments you >>>>> shouldn't see a window at all. Are you maybe using -drive instead of >>>>> -hda and that is not yet handled correctly? >>> >>> The boot volume dialog appears only when a hard disk file is not supplied >>> on the command line. I would think the failure of the dialog to close is >>> not unique to Lion. However in prior OS releases it probably does not >>> present a problem as the main window can be raised above the dialog. >> >> If that were the case I would see it as worth fixing there, too. :) >> >>>>> Apart from this issue, is it working correctly for you? >> >>> However building the main branch (with flags as above) does not work. The >>> build fails with error about redefinition of uint16 in fpu/softfloat.h. If >>> that is fixed the build completes. But trying to run qemu-system-i386 quits: >>> >>>> $ i386-softmmu/qemu-system-i386 -hda ~/Downloads/linux-0.2.img >>>> >>>> GThread-ERROR **: GThread system may only be initialized once. >>>> aborting... >>>> Abort trap: 6 >> >> That's what I'm seeing, too, so I don't feel comfortable committing this >> patch now. It compiles file, but it crashes either way with a message >> similar to the above, so I don't see an improvement (yet). >> >> If you could pinpoint where this error stems from (e.g., single-stepping >> in gdb) that might help getting it fixed. >> >> Thanks, >> Andreas >