Page 1 of 1
Compiling on Lion with XCode 4.3
Posted: Thu Mar 22, 2012 3:15 pm
by waci
I am trying to get the source code to compile on my new Mac Book Pro. It is running Lion, and I have downloaded the latest version of X Code as I am going to be moving into developing software for Mac's (after 15yrs on a PC).
When I build I am getting Deprecation errors (which I have cleared by checking the ignore deprecation warnings), but it now fails when trying to link. I am new to X Code so I am not sure where the error is coming from. It says a file is missing, which may be because the Depracation errors are stopping that part to be built.
Has anyone had any success in building / compiling using the latest version of X Code? If so, what steps am I missing on getting the application to compile.
Thanks,
James
Re: Compiling on Lion with XCode 4.3
Posted: Thu Mar 22, 2012 5:42 pm
by Eric Walch
waci wrote:Has anyone had any success in building / compiling using the latest version of X Code? If so, what steps am I missing on getting the application to compile.
Thanks,
James
Hello James,
It should compile without problems on XCode 4.3 as all settings are made for XCode 4.x. I still use the older XCode 3.2.6 and with that version are some problems. One setting has to be manually deleted as 4.x needs it and 3.x does not know it
.
I asume a 4.3 user can help you here as trunk should compile okay out of box with your setup as far as I know.
Re: Compiling on Lion with XCode 4.3
Posted: Thu Mar 22, 2012 6:56 pm
by Kaks
One requirement that doesn't seem to be listed anymore on the wiki is the RBSplitView component.
The following passage is taken from an earlier version of the relevant wiki page: (
http://wiki.alioth.net/index.php?title= ... r_versions)
To build the “Build All” target, which includes the Debug OXP, you must install the RBSplitView Interface Builder plug-in. (To install it, simply put it somewhere tidy and open it; Interface Builder should load and register the plug-in.) Important: due to an unfortunate change between versions, you must use the 1.1.4 version of the RBSplitView IB plug-in, or use 1.2 but change its bundle identifier from net.brockerhoff.RBSplitView.IBPlugin to net.brockerhoff.RBsplitView.IBPlugin.
You might also have to register the automatic updates component, but I'm a bit hazy on the details at the moment, my dev mac is far, far away...
Oh, and welcome to the friendliest board this side of Riedquat
(tm)!
Re: Compiling on Lion with XCode 4.3
Posted: Fri Mar 23, 2012 9:10 am
by waci
Thanks all,
I will try your suggestions and let you know the results.
James
Re: Compiling on Lion with XCode 4.3
Posted: Sun Apr 08, 2012 4:00 pm
by JensAyton
Kaks wrote:One requirement that doesn't seem to be listed anymore on the wiki is the RBSplitView component.
It’s not supposed to be. The relevant view is now set up in code, and IB plug-ins aren’t supported in Xcode 4 anyway.
Kaks wrote:You might also have to register the automatic updates component
No, it’s updated and built automatically.
waci, if you happen to wander back:
- Any luck?
- What version of Oolite are you trying to build? Trunk should work, the 1.76 tag and 1.76-maintenance branch need Xcode 3.2.6.
- If there’s still a problem, what are the actual errors? (To get the full error text, select View → Navigators → Show Log Navigator, select the most recent build in the navigator on the left of the window. You can then select and copy individual errors, or select build actions – like “Compiling Foo.m…” – to copy the full command invocation and all output, which is possibly more useful.)
I’ve put a significant amount of effort into making a one-shot build process, so I’d appreciate any further feedback.
Re: Compiling on Lion with XCode 4.3
Posted: Fri Oct 12, 2012 8:39 am
by Eric Walch
As written elsewhere I got a second hand laptop with OS Lion on it. I installed the latest version of XCode on it and checked out the Oolite sourcecode with a SVN command.
Oolite compiled on the first go. But, (there is always a but) I got one error about linking the console. And I see no direct way to fix it. It happens in debug, testrelease and deployment. Result is that I have a working version of Oolite, but without access to the console. Manually dropping a version of the "debug.oxp" in the addOns folder does not help. The compiled Oolite just refuses the see the console.
Re: Compiling on Lion with XCode 4.3
Posted: Fri Oct 12, 2012 2:38 pm
by Eric Walch
While playing on the new laptop, it made sense to load my last used save file over the network from my desktop computer. Or actually I stored it on the NAS and got it from there. As long as you are connected to that volume when opening Oolite, it asks to load a previous game. And it even defaults correctly to the last used location on that server.
However, when volume on the server was not mounted yet, you don't get the option to load a previous game. Instead you are forced to start with a Jameson.
Would it not be better to always offer to load a previous commander when the last used path is not empty? At least in above situation it would be more friendly.
This is probably only a mac issue, as on the mac you can mount that volume through the load dialog. I assume you must leave Oolite on other platforms to mount the server volume.
Re: Compiling on Lion with XCode 4.3
Posted: Fri Oct 12, 2012 3:57 pm
by JensAyton
Eric Walch wrote:Oolite compiled on the first go. But, (there is always a but) I got one error about linking the console.
Please post the exact error.
To copy an error: View→Navigator→Log Navigator (⌘7), select the latest (top) log, select the error, and press the little button with four horizontal lines on the right. This opens a text view with the full input and output of the command that failed.
Re: Compiling on Lion with XCode 4.3
Posted: Fri Oct 12, 2012 4:13 pm
by Eric Walch
I was already looking at that error:
Code: Select all
Ld /Users/ericwalch/Library/Developer/Xcode/DerivedData/Oolite-crbvvslipzflyabnxjeymmcklcyu/Build/Products/Debug/Debug.oxp/Contents/MacOS/Debug normal x86_64
cd /Users/ericwalch/trunk/DebugOXP
setenv MACOSX_DEPLOYMENT_TARGET 10.6
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -L/Users/ericwalch/Library/Developer/Xcode/DerivedData/Oolite-crbvvslipzflyabnxjeymmcklcyu/Build/Products/Debug -F/Users/ericwalch/Library/Developer/Xcode/DerivedData/Oolite-crbvvslipzflyabnxjeymmcklcyu/Build/Products/Debug -F/Users/ericwalch/trunk/DebugOXP -filelist /Users/ericwalch/Library/Developer/Xcode/DerivedData/Oolite-crbvvslipzflyabnxjeymmcklcyu/Build/Intermediates/DebugOXP.build/Debug/DebugOXP.build/Objects-normal/x86_64/Debug.LinkFileList -mmacosx-version-min=10.6 -bundle_loader ../build/Debug/Oolite.app/Contents/MacOS/Oolite -fobjc-link-runtime -framework Cocoa -o /Users/ericwalch/Library/Developer/Xcode/DerivedData/Oolite-crbvvslipzflyabnxjeymmcklcyu/Build/Products/Debug/Debug.oxp/Contents/MacOS/Debug
ld: file not found: ../build/Debug/Oolite.app/Contents/MacOS/Oolite
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I see that there is a path mismatch. The default location for the compiled products is at:
Build/
Products/Debug/Debug.oxp/Contents/MacOS/Debug
But it is searching for an other location.
Re: Compiling on Lion with XCode 4.3
Posted: Fri Oct 12, 2012 5:02 pm
by JensAyton
Eric Walch wrote:I see that there is a path mismatch. The default location for the compiled products is at:
Build/Products/Debug/Debug.oxp/Contents/MacOS/Debug
That’s very odd. It’s build/$CONFIGURATION/… for me, and I don’t see anything changing that in my xcuserdata or preferences. Anyway, I’ve attempted a fix in r5424.
Re: Compiling on Lion with XCode 4.3
Posted: Fri Oct 12, 2012 7:40 pm
by Eric Walch
r5424 did the trick, No errors this time.
Re: Compiling on Lion with XCode 4.3
Posted: Sat Oct 13, 2012 9:28 am
by Eric Walch
Eric Walch wrote:However, when volume on the server was not mounted yet, you don't get the option to load a previous game. Instead you are forced to start with a Jameson.
I am still lost in al these new XCode features.
Access to the repositories used to go through one menu in 3.x. Now it is so integrated that it pops up everywhere. Probably for the good, once you get used to it. e.g. no need to go to the terminal to 'blame' but a nice button inside XCode.
So for those lines Kaks pops up with a change in January 2012. I don't want to throw away that stuff, instead I added a few lines, that when the last saved path starts with "/Volumes", you also get the option to load a saved game.
Re: Compiling on Lion with XCode 4.3
Posted: Sat Oct 13, 2012 12:22 pm
by JensAyton
I honestly don’t think that “feature” provides any benefit ever.
Re: Compiling on Lion with XCode 4.3
Posted: Sat Oct 13, 2012 2:39 pm
by Eric Walch
I am generally quite reluctant to throw away other people code. But in this case I also see no benefits of not giving a load dialog when there is no file found at the last known location. Apart from having the save files on an extern medium, a payer could also have moved his files to a new location, or started Oolite on a new computer. Also than you want a load dialog to find your files and no new commander.
So, the only time it might be useful is at the very first use of Oolite. And than a user still can press 'no'. You are right, it is probably better to not change the code further, but remove it completely and revert to the way it is handled with 1.76