plisskin Posted February 17, 2007 Share Posted February 17, 2007 So I was able to set up OS X on my PC and have been playing with it for a little while (trying to decide if my next computer will be a real Mac or not) and the system has been rock solid after I found a combination of hardware where everything worked "out of the box". The other day I installed the Apple developer tools to see how development on Mac is and compiled myself a simple command line Hello World type program that prints the size of some basic data types (int, double, long double, and char*, etc). I compiled using "gcc sizeof.c -o sizeof" and run my program which tells me that a char* (i.e. a pointer) is 4 bytes long. Hmm, I thought OX X was 64 bit. So after a bit of googling I find that I can do "gcc -arch x86_64 sizeof.c -o sizeof" to compile for 64 bit specifically. gcc compiles and links fine but when I run the program, I get a "Bus error" and then sometime after that the entire OS craps out and pops a message saying the System has crashed, press Power or Reset. My system: CPU: P4 630 (3.0 GHz Prescott) (with EM64T) Mobo: Abit IG-80 (915 chipset) Sound: Built-in to the mobo Network: D-Link something or other Video: NVidia 7100 GS (can't recall the make) Memory: 1GB OS X: Jas 10.4.8 with PPF1 and PPF2 applied (I started with an .iso of Jas 10.4.8 w/PPF1) and applied the PPF2 patch myself) and no other patches. After installing, I did a software update. uname -a: "Darwin chris-computer.local 8.8.1 Darwin Kernel Version 8.8.1: Sat Dec 9 22:18:27 AZOT 2006; semthex:/nebukadnezar/BUILD/obj/RELEASE_I386 i386 i386" Which I see has i386 in it, not x86_64. What do I have to do to enable 64-bit? Thanks for any help... Link to comment https://www.insanelymac.com/forum/topic/42726-gcc-and-x86_64/ Share on other sites More sharing options...
niteice Posted February 17, 2007 Share Posted February 17, 2007 My guess is that long mode is enabled automatically if present and the kernel is built for x86_64...which I guess semthex's isn't? Link to comment https://www.insanelymac.com/forum/topic/42726-gcc-and-x86_64/#findComment-305567 Share on other sites More sharing options...
asap18 Posted February 18, 2007 Share Posted February 18, 2007 os x is only 64 bit on mac pros and g5's on the command line level. Maybe updating gcc will help. Link to comment https://www.insanelymac.com/forum/topic/42726-gcc-and-x86_64/#findComment-305682 Share on other sites More sharing options...
gnubeard Posted April 25, 2007 Share Posted April 25, 2007 the JaS images stuff -legacy into the com.apple.boot.plist. You're booting into 32bit mode. Remove this flag and try again. Link to comment https://www.insanelymac.com/forum/topic/42726-gcc-and-x86_64/#findComment-353680 Share on other sites More sharing options...
sg Posted April 27, 2007 Share Posted April 27, 2007 a bunch of the semthex kernels have been complete junk when dealing with 64 bit stuff too causing apps to get bus errors. Link to comment https://www.insanelymac.com/forum/topic/42726-gcc-and-x86_64/#findComment-354533 Share on other sites More sharing options...
Recommended Posts