Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Cross-Platform Development => Topic started by: MentalPower on August 06, 2011, 08:39:22 pm
-
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!
-
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.
-
I'll try that and let you guys know how it goes.
-
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?
-
I don't have Xcode 3.2, if you want to try that by all means. However, why is PPC support needed still?
-
Why is PPC support needed still?
This was raised as an option before, see here for the discussion (http://www.hard-light.net/forums/index.php?topic=65445.0). It may be worth revisiting it.
-
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.
-
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!
-
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.
-
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 have a non-paid developer account. Not sure if that helps.
-
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?
-
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.
-
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]
-
Awesome. Thanks.
-
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.
-
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.