Author Topic: XCode4 crashing on compile  (Read 5918 times)

0 Members and 1 Guest are viewing this topic.

XCode4 crashing on compile
Hi,

Has anyone been able to successfully compile FS2 on XCode4 in OSX Lion? I've tried pretty much every single combination of settings between build targets (10.4 - 10.7), compiler choice (GCC4.2, GCC LLVM 4.2 & Clang) among other things but nothing seems to work. Xcode ends up eating all 8GB of memory and eventually crashing due to lack of memory. Does anyone have any ideas?

Thanks!
MentalPower
Lead Developer for the Auctioneer AddOns package.
http://auctioneeraddon.com/  |  http://enchantrix.org/

"When life hands you lemons, ask for tequila and salt." -Anonymous

 

Offline Echelon9

  • 210
Re: XCode4 crashing on compile
I saw this too with early testing. I think our best solution is to create a new Xcode4 project file, which isn't a carry forward of the current Xcode project file (which has built up cruft since Xcode 2.4).

This may mean it will only build an Intel 32/64bit, 10.6+ binary -- but a break was going to be needed soon regardless.
« Last Edit: August 07, 2011, 10:02:33 am by Echelon9 »

 
Re: XCode4 crashing on compile
I'll try that and let you guys know how it goes.
MentalPower
Lead Developer for the Auctioneer AddOns package.
http://auctioneeraddon.com/  |  http://enchantrix.org/

"When life hands you lemons, ask for tequila and salt." -Anonymous

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: XCode4 crashing on compile
What about creating a new 3.2.x project, with PPC and 10.5 support still, and then seeing if that can be carried forward cleanly to Xcode4? 
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 
Re: XCode4 crashing on compile
I don't have Xcode 3.2, if you want to try that by all means. However, why is PPC support needed still?
MentalPower
Lead Developer for the Auctioneer AddOns package.
http://auctioneeraddon.com/  |  http://enchantrix.org/

"When life hands you lemons, ask for tequila and salt." -Anonymous

 

Offline Echelon9

  • 210
Re: XCode4 crashing on compile
Why is PPC support needed still?
This was raised as an option before, see here for the discussion. It may be worth revisiting it.

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: XCode4 crashing on compile

I think what we have project wise works just fine for providing "older" builds as necessary.

I'm in favor for a clean XCode 4 on Lion (and -if- we can compile it on 10.5/6 then awesome, but I would not want to go lumping in anything else on top of that)

Adding in options such as -msse and other forward looking enhancements would be a good idea in the new project as well, in my opinion.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 
Re: XCode4 crashing on compile
Well, I'm mostly done. I have an Xcode4 project that compiles but does not link. I'm off to bed for the night, but I've uploaded the entire tree to my server (http://mentalpower.us/fs2_open_r7435.zip for the full directory or http://mentalpower.us/fs2_xcode4_r7435.diff.zip just the unified diff) if anyone wants to try and fix it. Currently its set to target 10.7 32bit, and I took the liberty of adding the Framework source files and build targets so that we have a "complete" project to build from. Currently those frameworks are a bit big since they contain the non-Mac parts as well. There are some build targets that are missing (like scramble, and a few others whose purpose evades me ATM). Please do let me know if you manage to fix the link errors.

Thanks!
MentalPower
Lead Developer for the Auctioneer AddOns package.
http://auctioneeraddon.com/  |  http://enchantrix.org/

"When life hands you lemons, ask for tequila and salt." -Anonymous

 

Offline Echelon9

  • 210
Re: XCode4 crashing on compile

I think what we have project wise works just fine for providing "older" builds as necessary.

I'm in favor for a clean XCode 4 on Lion (and -if- we can compile it on 10.5/6 then awesome, but I would not want to go lumping in anything else on top of that)

Adding in options such as -msse and other forward looking enhancements would be a good idea in the new project as well, in my opinion.

Yes, I agree.

  
Re: XCode4 crashing on compile
Hmm... this is interesting. Whilst trying to fix the link errors, the memory issues reappeared. It seems that the way we're building FreeSpace doesn't jive with Xcode. I'll try to track down the cause and keep you all posted. PS: I don't suppose any of you has a Mac developer account that can spare a support ticket?
MentalPower
Lead Developer for the Auctioneer AddOns package.
http://auctioneeraddon.com/  |  http://enchantrix.org/

"When life hands you lemons, ask for tequila and salt." -Anonymous

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: XCode4 crashing on compile
I have a non-paid developer account.  Not sure if that helps.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 
Re: XCode4 crashing on compile
Hmm... this is interesting. Whilst trying to fix the link errors, the memory issues reappeared. It seems that the way we're building FreeSpace doesn't jive with Xcode. I'll try to track down the cause and keep you all posted. PS: I don't suppose any of you has a Mac developer account that can spare a support ticket?

I would be happy to try with my developer account. What specifically should I ask or can I transfer to you?

 

Offline jg18

  • A very happy zod
  • 210
  • can do more than spellcheck
Re: XCode4 crashing on compile
Okay, so now I have a Lion VM with 2 GB of RAM set up with Xcode 4.2.1, and I've just started to take a look at MentalPower's work. He hasn't been around for a couple of weeks, but maybe he's had more progress/insight since his last post on this from five months ago.

In any case, are there any recommended reading sources on either the structure of the FSO codebase or on how to create/update an Xcode project file? I'll go looking for stuff on my own, too. I don't yet know whether I'll end up using his work or writing a new project file, although I'll look at his work and at the current FSO Xcode project file for inspiration.

 

Offline Valathil

  • ...And I would have had a custom title if it wasn't for you meddling kids!
  • 29
  • Custom Title? Wizards need no Custom Title!
Re: XCode4 crashing on compile
So i think i got everything working as it should. In the attached zip are the new xcode4 project files. extract them to the projects dir extract the included frameworks.tgz open in xcode select a scheme(debug debug_inferno release release_inferno) and hit build it should work with the newest trunk (cause libpng got updated to fix a linker error with the new clang)

[attachment deleted by a basterd]
┏┓╋┏┓╋╋╋╋╋╋╋╋╋┏┓
┃┃╋┃┃╋╋╋╋╋╋╋╋╋┃┃
┃┃┏┫┃┏┳━━┓┏━━┓┃┗━┳━━┳━━┳━━┓
┃┃┣┫┗┛┫┃━┫┃┏┓┃┃┏┓┃┏┓┃━━┫━━┫
┃┗┫┃┏┓┫┃━┫┃┏┓┃┃┗┛┃┗┛┣━━┣━━┃
┗━┻┻┛┗┻━━┛┗┛┗┛┗━━┻━━┻━━┻━━┛

 

Offline Echelon9

  • 210
Re: XCode4 crashing on compile
Awesome. Thanks.

 

Offline Echelon9

  • 210
Re: XCode4 crashing on compile
Hrrrm, we should retest with the latest Xcode 4.3 as it's done some changes under the hood in the default setup of the compiler and infrastructure.

In fact, I'd love to have more robust project file maintenance through Premake or something similar.
« Last Edit: February 25, 2012, 10:43:59 am by Echelon9 »

 

Offline Iss Mneur

  • 210
  • TODO:
Re: XCode4 crashing on compile
In fact, I'd love to have more robust project file maintenance through Premake or something similar.
There was some work being done on a CMake file a while ago, though I don't know what happened to that.
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments