[solved] Mac OS 10.4 compile issues

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Message
Author
jsena
Space Floater
Posts: 36
Joined: Tue Feb 16, 2010 4:12 pm

[solved] Mac OS 10.4 compile issues

#1 Post by jsena »

Greetings. I have slowly worked my way through compiling FO using XCode (with which I'm not very proficient), but I'm at a loss with this one.

Building target “FreeOrion” of project “FreeOrion” with configuration “ReleaseUniversal” — (1 error)
cd /Users/jsena/Desktop/FreeOrion/Xcode
/Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -strip-debug-symbols -resolve-src-symlinks /Users/jsena/Desktop/FreeOrion/Xcode/build/ReleaseUniversal/FreeOrion /Users/jsena/Desktop/FreeOrion/Xcode/build/ReleaseUniversal/FreeOrion.app/Contents/MacOS
pbxcp: FreeOrion: No such file or directory
pbxcp: FreeOrion: No such file or directory
Build failed (1 error)

I was able to fix a bunch of other compilation errors, but I'm not sure how to fix (what seems like) the compiler complaining that the file it's trying to create doesn't previously exist. Huh?

Please let me know if you have any ideas as to how to resolve this issue. This is build 3353, if that matters.
Last edited by jsena on Fri Mar 19, 2010 7:13 pm, edited 1 time in total.

User avatar
Bigjoe5
Designer and Programmer
Posts: 2058
Joined: Tue Aug 14, 2007 6:33 pm
Location: Orion

Re: Mac OS 10.4 compile issues

#2 Post by Bigjoe5 »

Try setting the configuration to "debug" instead. Also, make sure the active executable is set to FreeOrion.
Warning: Antarans in dimensional portal are closer than they appear.

jsena
Space Floater
Posts: 36
Joined: Tue Feb 16, 2010 4:12 pm

Re: Mac OS 10.4 compile issues

#3 Post by jsena »

Thank you for your help!
I switched to Debug (the target is FreeOrion) and got a different error

Command /Developer/usr/bin/g++-4.0 failed with an exit code 1
Build failed (1 error, 13 warnings)

I've attached the error text
error.txt
(83.75 KiB) Downloaded 157 times

User avatar
Bigjoe5
Designer and Programmer
Posts: 2058
Joined: Tue Aug 14, 2007 6:33 pm
Location: Orion

Re: Mac OS 10.4 compile issues

#4 Post by Bigjoe5 »

Last time I got such an error, it was a problem with the code itself, which has since been fixed (3353 works just fine for me on OS X 10.6). I'm not exactly a compilation expert, so I can't really give you any more help. You might want to search around the compile forum to look for other similar errors and try to find a solution.

Otherwise, you'll have to wait for someone more knowledgeable. Sorry I couldn't be of more help.

Btw, did you download the v.3.13 Mac OS X sdk from sourceforge, then update it using svn, or did you just download the latest revision from sourceforge? If the latter, you could possibly try the former, and see if that helps...
Warning: Antarans in dimensional portal are closer than they appear.

jsena
Space Floater
Posts: 36
Joined: Tue Feb 16, 2010 4:12 pm

Re: Mac OS 10.4 compile issues

#5 Post by jsena »

I had downloaded the latest version, then added in the SDK files (not allowing it to overwrite newer files). I suppose something happened. I'll try again tonight, this time in reverse (start with SDK, dump newer files into that folder)

On a side note, on an earlier attempt to compile, I got an error that the icns file was missing. That file was neither in the latest version *nor* in the SDK. I had to download the latest "official" version of the game, open the package, and find/copy the icns file.

User avatar
Bigjoe5
Designer and Programmer
Posts: 2058
Joined: Tue Aug 14, 2007 6:33 pm
Location: Orion

Re: Mac OS 10.4 compile issues

#6 Post by Bigjoe5 »

Are you using subversion for this process? From the terminal, cd-ing to the sdk and commanding "svn update" should give you what you need to build successfully (make sure you enter "tc" for "theirs conflict" when the option comes up), if you have subversion. If you don't, I suggest you get it and use it, because it will be a lot simpler and more reliable than downloading the latest revision and copy-pasting each individual file into the sdk.
Warning: Antarans in dimensional portal are closer than they appear.

jsena
Space Floater
Posts: 36
Joined: Tue Feb 16, 2010 4:12 pm

Re: Mac OS 10.4 compile issues

#7 Post by jsena »

So I figured I would try just getting the SDK to compile before updating it. I downloaded a fresh copy, went into XCode, made one change (had to change Project Settings -> Target SDK to "Current Mac OS" otherwise the compiler errors out pretty quickly).

Guess what? I get the same error compiling just the SDK

Command /Developer/usr/bin/g++-4.0 failed with an exit code 1

I realize you said that happened the first time you did it, but it doesn't seem very promising that I get the same error whether the code is at (what should be) a known working version vs. the latest version.

User avatar
Bigjoe5
Designer and Programmer
Posts: 2058
Joined: Tue Aug 14, 2007 6:33 pm
Location: Orion

Re: Mac OS 10.4 compile issues

#8 Post by Bigjoe5 »

As long as you

- downloaded the sdk from sourceforge, and didn't alter it,
- set active target and active executable to FreeOrion,
- set configuration to "debug", and
- set GCC compiler version to 4.0 (in project settings, under "Build")

I know of no reason that it would not build.

.Id might be able to help you, but he hasn't logged in since Fri Feb 12, 2010 11:45 am, so he obviously hasn't seen this. I would recommend checking other posts on the Compile forum to see if anyone else has experienced the same problem, and if so, how they were able to fix it.
Warning: Antarans in dimensional portal are closer than they appear.

User avatar
.Id
Space Squid
Posts: 76
Joined: Fri Feb 06, 2009 6:54 pm

Re: Mac OS 10.4 compile issues

#9 Post by .Id »

jsena wrote:I had downloaded the latest version, then added in the SDK files (not allowing it to overwrite newer files).
This is a potential cause for problems.
Download the SDK first and then `svn update` from the included sources.
jsena wrote:So I figured I would try just getting the SDK to compile before updating it. I downloaded a fresh copy, went into XCode, made one change (had to change Project Settings -> Target SDK to "Current Mac OS" otherwise the compiler errors out pretty quickly).

Guess what? I get the same error compiling just the SDK

Command /Developer/usr/bin/g++-4.0 failed with an exit code 1

I realize you said that happened the first time you did it, but it doesn't seem very promising that I get the same error whether the code is at (what should be) a known working version vs. the latest version.
I think you've found a legitimate bug in the Xcode project and/or packaging of the SDK. From the error messages it looks like it would be "resolvable" by playing around with the Xcode project.

I'd first suggest being mindful of the Xcode release mode. I'm more confident in the "debug" release working. Another thing to play around with would be the "zerolink" Xcode settings. I have a feeling that those one or both of those things is what is causing the discrepancy between your results and ours.

Your error text is pointing out to me that there could be an unforeseen overlap in libraries:
libFREEALUT.a overlaps with OpenAL.framework
libfreetype.a overlaps with Ogre.framework

I'm curious as to whether libFREEALUT.a and libfreetype.a are necessary at all. I won't be able to experiment until next week, but what I'd try is changing the Xcode build settings to completely remove those libraries from getting linked in.

In case it encourages you to not give up entirely: you seem to be reaching the linking step in the build, which is very close to the end.

User avatar
.Id
Space Squid
Posts: 76
Joined: Fri Feb 06, 2009 6:54 pm

Re: Mac OS 10.4 compile issues

#10 Post by .Id »

Another thought occurred to me: is your Mac PowerPC or Intel-based?

Right now everything's setup for Intel Macs only and I'm not quite sure how a PowerPC-based Mac will behave given the current Xcode project.

jsena
Space Floater
Posts: 36
Joined: Tue Feb 16, 2010 4:12 pm

Re: Mac OS 10.4 compile issues

#11 Post by jsena »

My computer is intel-based. I tried unchecking the "Allow ZeroLink" option in the build menu, and turned off the "User ZeroLink" option wherever I saw it in the build options. No luck -- but I might have missed 15 other places where I would need to do it.

I appreciate the help you guys are providing. Unfortunately I'm not well-versed in XCode, so I'm just fumbling about. If I need to remove libraries or change code or settings, I'll probably need pretty explicit instructions. Also I would need to figure out how to update the code other than downloading the latest tarball and replacing the files using the OS X Finder. But that's another story.

Out of curiosity, is there going to be another "official" release of FO soon? The "current" version is pretty old at this point and doesn't run if you have a nonzero amount of AI players.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Mac OS 10.4 compile issues

#12 Post by Geoff the Medio »

jsena wrote:Out of curiosity, is there going to be another "official" release of FO soon?
I'd like to put up a new version "soon", but there aren't any specific plans to do so. There are a few major bugs that need to be fixed before it can / should happen, so someone able to do so will need to find the time to fix them.

User avatar
.Id
Space Squid
Posts: 76
Joined: Fri Feb 06, 2009 6:54 pm

Re: Mac OS 10.4 compile issues

#13 Post by .Id »

jsena wrote:My computer is intel-based. I tried unchecking the "Allow ZeroLink" option in the build menu, and turned off the "User ZeroLink" option wherever I saw it in the build options. No luck -- but I might have missed 15 other places where I would need to do it.
My ZeroLink is set to "NO". Go ahead and return to that value if you've changed it since we know it wasn't the fix.
jsena wrote: I appreciate the help you guys are providing. Unfortunately I'm not well-versed in XCode, so I'm just fumbling about. If I need to remove libraries or change code or settings, I'll probably need pretty explicit instructions. Also I would need to figure out how to update the code other than downloading the latest tarball and replacing the files using the OS X Finder. But that's another story.
Understood, this is something I'll try to look into more. I'm not sure why this is showing up for you and not others, but I think I know root of the problem and can take some action.

(for my information, this is part of what I'm thinking: http://developer.apple.com/mac/library/ ... a1504.html)

User avatar
.Id
Space Squid
Posts: 76
Joined: Fri Feb 06, 2009 6:54 pm

Re: Mac OS 10.4 compile issues

#14 Post by .Id »

By the way, what are the full versions of Xcode and OS X that you're using?

User avatar
.Id
Space Squid
Posts: 76
Joined: Fri Feb 06, 2009 6:54 pm

Re: Mac OS 10.4 compile issues

#15 Post by .Id »

jsena, I sent you a PM with a link to a newly packaged SDK.

Modifications were done to the dependency libraries and Xcode project.

Since committing to this version will break current user's builds until they update their SDK, it would be helpful to know if the new version actually resolves your issue.

Post Reply