Was someone able to compile the Bochs simulator under Snow Leopard. Leopard worked fine for me but under Snow Leopard I get alot of problems related to the Carbon library...
Ok, some more information was request.
- I compile with make on the shell; stanard build process coming with the bochs sources
- I was successfully able to compile against the 10.5 SDK. Unfortunatley, it was not running under Snow Leopard... always crashed
- then I installed the latest XCode from the SnowLeopard CD and compiled against the 10.6 SDK; withot changing nothing but the isysroot flag to point to the 10.6 instead of 10.5 now the compiler has problems to find some carbon headers... (-framework Carbon is included as a parameter to g++)
Here the error... it fails when it comes to compiling the carbon-based gui for bochs:
g++ -c -I.. -I./.. -I../iodev -I./../iodev -I../instrument/stubs -I./../instrument/stubs -pipe -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -framework Carbon -fomit-frame-pointer -finline-functions -falign-loops=16 -falign-jumps=16 -falign-functions=16 -falign-labels=16 -falign-loops-max-skip=15 -falign-jumps-max-skip=15 -fprefetch-loop-arrays -fpascal-strings -fno-common -Wno-four-char-constants -Wno-unknown-pragmas -Dmacintosh -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES carbon.cc -o carbon.o
carbon.cc:154: warning: non-local variable ‘<anonymous enum> last_screen_state’ uses anonymous type
carbon.cc:154: warning: non-local variable ‘<anonymous enum> screen_state’ uses anonymous type
carbon.cc:163: error: ‘CIconHandle’ does not name a type
carbon.cc: In function ‘OSStatus CEvtHandleWindowBackdropUpdate(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*)’:
carbon.cc:278: error: ‘GetWindowPortBounds’ was not declared in this scope
carbon.cc:279: error: ‘BackColor’ was not declared in this scope
carbon.cc:280: error: ‘EraseRect’ was not declared in this scope
... many more undeclared xxx errors
thanks in advance Mac
If you want to run Bochs on a 64-bit Mac, you will need to use a different GUI library. I recommend using X or SDL.
SDL: To do so, first download and install the LibSDL from http://www.libsdl.org/download-1.2.php, you will need the binaries and development libraries.
After extracting the Bochs source files, run
./configure --with-sdl=path-to-libsdl-dev-files
.X11: It should build out of the box:
./configure --with-x11 && make
@user6779
Make sure you do not use the flat unix binary that is created, but rather the Mac OS bundle (called bochs.app).
Eg from the terminal:
And you will no longer receive that assertation.
First, you'll have to run "make dist-clean" to get rid of some of the library code which will have compiled successfully in 64-bit mode - this isn't deleted by a regular "make clean", only the more radical dist-clean. Otherwise, your build will try to mix 32 and 64 bit code, which doesn't work.
Now set CFLAGS and CXXFLAGS to contain the -m32 switch to force 32 bit mode. Re-run ./configure, then make, and you should get a working 'bochs' binary.
Having got past the build problems, though, you'll probably find the Carbon version no longer runs; the X11 version seems to be a better bet. (At least, on my Snow Leopard system, the Carbon build fails early with an assertion failure; X11 works as expected.) You may be able to get a 64 bit X11 build running, without the Carbon dependency, but I haven't tried this yet, only 32 bit.