Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Bad CPU type" when building on G4



You are probably building both Intel and PPC as 64 bit, and you are lucking out on the Core 2 Duo being a 64 bit CPU and not noticing.

Normally you have to specifically ask for 64 bit via -arch ppc64 -arch x86_64; if you are doing this, then you probably also want -arch i386 - arch plc
ppc to build it 4-way universal (if you need it to be 64 bit for the address space on 64 bit machines, or to get twice as many registers for the compiler to use on Intel for performance reasons, etc,.).


-- Terry

On Aug 20, 2007, at 3:28 PM, John Zorko <email@hidden> wrote:


Hello, all ...

I'm working on an application that runs on Intel / PPC Macs (OSX) as well as Windows. When I build this app on my MacBook (Core2 Duo) or G5 (2.3ghz 970MP at work, dual 2.7ghz at home), the app runs. However, when I try to build and run it on a G4, it builds, but does not run. The error returned is "Bad CPU type for executable." The issue seems to be 64-bit vs. 32-bit.

I've googled around and found references to --disable-multilib, but these references were always with respect to bootstrapping gcc. I'm not trying to build a new gcc, I just want to use the one that comes with OSX (Apple's gcc4.0.1). Will just passing "-m32" in the gcc parameters fix this? I'm trying this now, but this app takes hours to build on a G4 (1.33ghz 12" PowerBook), and I figure I might get an answer here before it's finished :-)

Regards,

John

Falling You - exploring the beauty of voice and sound
http://www.fallingyou.com











_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >"Bad CPU type" when building on G4 (From: John Zorko <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.