Issue 292: Can't compile with Xcode 4.5.x

Reported by Richard Tan, Oct 4, 2012

Hello All,

Don't know what the problem is. There seems to be resulting errors 
while compiling regardless of any trunk revs source with Xcode 4.5.x 
& installed with the latest XcodeCLTools 4.5.x.

Here are the reproduced errors :

ivdi3.o) load command 3 unknown cmd field
oddi3.o) load command 3 unknown cmd field
vdi3.o) load command 3 unknown cmd field
ddi3.o) load command 3 unknown cmd field
make[3]: *** [boot] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


Well, guess i have to revert back to Xcode 4.4.1 & 

Would greatly appreciate if some one is able to fix this. 

You people have been GREAT!!!

Thank you!!!

Comment 1 by Alex TP Quick, Oct 11, 2012

Same problem here... can't compile Chameleon with latest Xcode 
version due to libcc_kext.a  :(

Comment 2 by zenith432, Oct 12, 2012

Here's a workaround I used

- Downloaded Command Line Tools from August 2012.
- Extracted older libcc_kext.a with Pacifist.
- put the older libcc_kext.a into i386/boot2
- Edited i386/boots/Makefile and changed the path to libcc_kext.a (3 
locations) to take it locally from i386/boot2.

After this, build succeeded (with latest Command Line Tools from 
October 2012.)

Comment 3 by Alex TP Quick, Oct 13, 2012

Thanks for the hint! 
If anyone need it, here's the file

Comment 4 by Richard Tan, Oct 14, 2012

Hi All...

To All the lazy ones....;)

Below is .zip file of two command(including a Xcode 4.5.x 
Workaround)scripts i've made for downloading and compiling chameleon 
source (but only for main & EmaC Trunks) to produce the basic 
lifesaver i386 folder & pkg file.

Hope it works for you and feel to to modify them to fit your needs...

Comment 5 by Richard Tan, Oct 14, 2012

Ooops...I forgot to say that the 'Chameleon Compile.command' script 
that came with the 'Xcode 4.4.X & Below-Script' folder in the 
zip file can be used for day to day needs when the Xcode 4.5.x 
problems are resolved..;)

Comment 6 by Cosmosis Jones, Oct 16, 2012

cc1: error: invalid option argument '-Oz'
cc1: error: unrecognized command line option "-arch"
cc1: error: unrecognized command line option "-Wmost"

what did you do to workaround those?

Comment 7 by zenith432, Oct 16, 2012

Those don't happen to me.  Either your build environment is screwed 
up or the Makefiles are malformed.  The errors mention valid 
command-line options to gcc.

Comment 8 by Cosmosis Jones, Oct 16, 2012

lol i used the script which downloaded new source/etc..

probably need to port select gcc.. 


Comment 9 by Cosmosis Jones, Oct 16, 2012

also was thinking of just integrating this

and then making people use apple-gcc42.. dont' know yet

Comment 10 by Cosmosis Jones, Oct 27, 2012

fixed rev 2090
Status: Fixed

Created: 7 years 10 months ago by Richard Tan

Updated: 7 years 9 months ago

Status: Fixed

Followed by: 3 persons