User Name
Password
AppleNova Forums » Programmer's Nook »

xcode - i didnt want universal binaries


Register Members List Calendar Search FAQ Posting Guidelines
xcode - i didnt want universal binaries
Thread Tools
AsLan^
Not a tame lion...
 
Join Date: May 2004
Location: Narnia
 
2005-12-26, 20:03

Here's something odd...

I didnt install the cross architecture stuff for xcode, and I can't make a release build...

Quote:
Building target “CardTable” of project “CardTable” — (1 error, 2 warnings)
cd /Users/fredrick/CardTable
/usr/bin/gcc-4.0 -o /Users/fredrick/CardTable/build/CardTable.build/Release/CardTable.build/Objects-normal/i386/CardTable -L/Users/fredrick/CardTable/build/Release -F/Users/fredrick/CardTable/build/Release -filelist /Users/fredrick/CardTable/build/CardTable.build/Release/CardTable.build/Objects-normal/i386/CardTable.LinkFileList -framework Cocoa -arch i386 -mmacosx-version-min=10.3 -isysroot /Developer/SDKs/MacOSX10.3.9.sdk
/usr/bin/ld: warning /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/Cocoa.framework/Cocoa cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
/usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored)
/usr/bin/ld: Undefined symbols:
___keymgr_dwarf2_register_sections
__cthread_init_routine
_atexit
_errno
_exit
_mach_init_routine
_NSApplicationMain
.objc_class_name_NSObject
_objc_msgSend
_objc_msgSendSuper
_printf
.objc_class_name_NSAutoreleasePool
.objc_class_name_NSDate
.objc_class_name_NSImage
.objc_class_name_NSThread
.objc_class_name_NSView
___CFConstantStringClassReference
collect2: ld returned 1 exit status
/usr/bin/ld: warning /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/Cocoa.framework/Cocoa cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
/usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored)
/usr/bin/ld: Undefined symbols:
I only have ppc selected for my target build and debug works fine, its only when I try to build a release build that I get this error...

Anyway, I'm re-downloading xcode now to try and install the cross arch stuff, I just thought it was interesting is all.
  quote
AsLan^
Not a tame lion...
 
Join Date: May 2004
Location: Narnia
 
2005-12-26, 21:39

Hmm... well after I installed the stuff for universal binaries, I can make a release build for 10.4 (Universal).

But what I can't do and what's sort of important to me is make a build for 10.3.9

I get a very similar error saying "arch doesnt match cpu flag etc. "

Has anyone else had similar problems ?

This is xcode 2.2 by the way.

EDIT: Removed "cross platform", my bad.

Last edited by AsLan^ : 2005-12-26 at 22:51.
  quote
pmazer
Member
 
Join Date: May 2005
Location: Atlanta, GA
Send a message via AIM to pmazer  
2005-12-26, 22:08

I don't understand why you need to create a cross-platform build for 10.3.9. All Intel Macs should be running 10.4 or higher. I'm not even sure if 10.3.9 will run on x86.
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2005-12-26, 22:11

Quote:
Originally Posted by AsLan^
But what I can't do and what's sort of important to me is make a cross platform build for 10.3.9
You can't do that.
  quote
Enki
Senior Member
 
Join Date: Nov 2004
 
2005-12-26, 22:14

Yep, PPC only for pre-10.4
  quote
AsLan^
Not a tame lion...
 
Join Date: May 2004
Location: Narnia
 
2005-12-26, 22:47

Sorry guys perhaps its a little misleading...

I didnt want to make universal binaries, but it wouldn't compile for 10.4 (with only ppc arch selected) until after i installed the universal binaries.

It still doesn't work when I try and compile for 10.3.9 (selecting the 10.3.9 sdk and selecting ppc arch without intel) it still give me the same error that I was getting before.

Looking back at my first post I can see I posted the wrong error message, but I assure you I got something very similar to that when trying to compile for 10.4 without the universal sdk installed.
  quote
AsLan^
Not a tame lion...
 
Join Date: May 2004
Location: Narnia
 
2005-12-26, 22:49

In a nutshell... I cant compile for 10.3.9 and thats what I wanted to do
  quote
faramirtook
A for effort.
 
Join Date: Nov 2004
Location: New Jersey
 
2005-12-26, 23:07

Quote:
Originally Posted by AsLan^
In a nutshell... I cant compile for 10.3.9 and thats what I wanted to do

Could you put 2 binaries in the MacOS folder and have a script pick which one is the right one?
  quote
AsLan^
Not a tame lion...
 
Join Date: May 2004
Location: Narnia
 
2005-12-26, 23:09

Quote:
Originally Posted by faramirtook
Could you put 2 binaries in the MacOS folder and have a script pick which one is the right one?
I'm not sure what you mean ? I cant generate a binary for 10.3.9 at all, the build fails with that error message.
  quote
faramirtook
A for effort.
 
Join Date: Nov 2004
Location: New Jersey
 
2005-12-26, 23:12

Oh. never mind me then.
  quote
AsLan^
Not a tame lion...
 
Join Date: May 2004
Location: Narnia
 
2005-12-26, 23:40

Alright, it sort of works now...

I had check "Continue buliding after errors" in preferences.

After that I was able to compile for Panther (with aforementioned errors) and then run it on Panther too
  quote
scratt
Veteran Member
 
Join Date: Jul 2004
Location: M-F: Thailand Weekends : F1 2010 - Various Tracks!
Send a message via Skype™ to scratt 
2005-12-26, 23:58

Quote:
Originally Posted by AsLan^
Alright, it sort of works now...

I had check "Continue buliding after errors" in preferences.

After that I was able to compile for Panther (with aforementioned errors) and then run it on Panther too
*scribble furiously in tatty note book on desk* 'Another setting to watch out for in Xcode'
  quote
AsLan^
Not a tame lion...
 
Join Date: May 2004
Location: Narnia
 
2005-12-27, 00:02

Quote:
Originally Posted by scratt
*scribble furiously in tatty note book on desk* 'Another setting to watch out for in Xcode'
I was hoping it was something like that, and that someone else could point it out to me !
  quote
Mr Beardsley
Member
 
Join Date: Jul 2004
Location: Colorado Springs
Send a message via AIM to Mr Beardsley  
2005-12-27, 23:34

A couple of questions:

Did you install the 10.3 sdk when you installed the developer tools?
Under the "Get Info" for your project did you select the 10.3 SDK for your project?

"Slow vehicle speeds with frequent stops would signal traffic congestion, for instance."

uh... it could also signal that my Mom is at the wheel...
  quote
AsLan^
Not a tame lion...
 
Join Date: May 2004
Location: Narnia
 
2005-12-28, 02:59

Quote:
Originally Posted by Mr Beardsley
A couple of questions:

Did you install the 10.3 sdk when you installed the developer tools?
Under the "Get Info" for your project did you select the 10.3 SDK for your project?
Yes I most certainly did, it's important to me because I want to run my apps on my Panther running ibook too. When I originally installed xcode, I installed the 10.3.9 SDK but not the ~250mb Universal Binaries SDK (hard disk drive was precious to me that day). And as for selecting the correct SDK, before going back and re-install the universal binaries part of xcode, it couldn't build a "release" build for 10.4 or 10.3.9, you can see I incorrectly posted the error message generated when I tried with 10.3.9 but that was the same error I was getting with 10.4 as well. Only on the "release" build mind you, they could both build in debug just fine, and I made sure to check the settings of both build types as well.

Funnily enough, xcode has started playing up again when trying to cross compile the same project again. This time the binary generated wouldnt run at all, saying something like "OSX cannot open this application because it may be damaged or corrupted." I know it can work because there is a binary version of the app which I can run on my ibooks desktop right now !

I think it's a genuine bug, perhaps Apple didn't think anyone wouldn't install the Universal Binaries option and that somehow broke it. It looks like that -i386 flag is hardwired into a gcc setting somewhere.
  quote
AsLan^
Not a tame lion...
 
Join Date: May 2004
Location: Narnia
 
2005-12-30, 00:11

For anyone that's interested or may be encountering the same problem.

After working once it continued to play up, so I re-installed xcode... but that didn't work either.

Then I discovered you can leave the SDK set to 10.4 and just set the Deployment Target (in the Build tab of Project Info) to 10.3.

This compiles cleanly without errors, and creates a binary that will run on 10.3 (providing you havnt used any 10.4 features of course).

I double checked it this time too (with two different projects) before posting
  quote
Posting Rules Navigation
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Post Reply

Forum Jump
Thread Tools
Similar Threads
Thread Thread Starter Forum Replies Last Post
Locating Errors in Xcode 2.2 kartel9 Programmer's Nook 4 2005-11-26 18:25
Xcode importing.. Good references.. scratt Programmer's Nook 0 2005-11-18 03:07
Creating a standalone exacutable with Xcode.. scratt Programmer's Nook 1 2005-11-15 22:17
Xcode - No such file or directory problem... scratt Programmer's Nook 14 2005-11-10 23:41
XCode linking problems faramirtook Genius Bar 5 2005-10-09 17:42


« Previous Thread | Next Thread »

All times are GMT -5. The time now is 03:58.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2024, AppleNova