Can't apply OS X patches

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

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

Re: Can't apply OS X patches

#16 Post by .Id »

I don't get a successful build when I switch to GCC 4.2 so it's unlikely you will either (for now).

On the "Edit Project Settings" window there should be a few different tabs to look at. For me there is "General", "Build", "Configurations", and "Comments". Have you looked in the "Build" tab for the compiler options to set the version back to 4.0 ?

Warnings from boost about deprecated headers should be fine (for now).

(BTW, the Mac SDK still has GG's Config.h using DevIL, but I'll have to put off the work to update that.)
(Also the included Boost libs with the Mac SDK are 1.38)

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

Re: Can't apply OS X patches

#17 Post by Bigjoe5 »

I checked the build tab, but I didn't realize I could scroll down 'cause I'm an idiot...

The sdk build works for me now, but not the latest revision. I did make sure to specify the compiler version.

I'm getting errors like "Template argument 1 is invalid" and "'boost::posix_time' has not been declared".

There were 3647 errors in all. These results are from following the instructions on the wiki and skipping the step with the patches.

I also tried building the code from the XCode project in the XCode folder instead of the osx folder created by the last step. I got 293992 errors.
Warning: Antarans in dimensional portal are closer than they appear.

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

Re: Can't apply OS X patches

#18 Post by Geoff the Medio »

Bigjoe5 wrote:I'm getting errors like "Template argument 1 is invalid" and "'boost::posix_time' has not been declared".
Could you try revision 3187 ?
There were 3647 errors in all. These results are from following the instructions on the wiki and skipping the step with the patches.
Could you post the build log again?

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

Re: Can't apply OS X patches

#19 Post by Bigjoe5 »

Tried 3187. I started getting a ridiculous number of errors, so I stopped it and noticed that there was no GG folder in the FreeOrion folder...

I grabbed it from one of my other downloads and stuck it in. This time I got a more reasonable 3649 errors, two more than when trying the latest revision.

I don't know if giving you both the build logs will be very useful, but they are different, if only slightly, so here they both are. The first one is the one from the latest revision, the second is from revision 3187.
Attachments
build_log_2.txt.zip
(31.99 KiB) Downloaded 85 times
build_log.txt.zip
(29.49 KiB) Downloaded 98 times
Warning: Antarans in dimensional portal are closer than they appear.

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

Re: Can't apply OS X patches

#20 Post by Geoff the Medio »

When updating to to SVN revisions other than the one in the SDK, how are you doing it? Do you update the files in place, or download a new set of files from SVN in a different location?

It looks like most of your errors are coming from various boost headers not being found. It's possible there are changes in some of the files since the SDK version, but it seems unlikely that all of them were added since then. So, I suspect you're downloading the SVN code and project files to a different location than the SDK versions, from which it can't find the various boost headers...

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

Re: Can't apply OS X patches

#21 Post by .Id »

First, let me apologize for not having updated the wiki after I made my contribution to the Mac OS X SDK as I think all your problems are from following the directions there.

Summarizing the recent history of FreeOrion for Mac OS X : the last maintainer was providing a set of patches and an SDK (which unpacked into that "osx" folder). Both of these are unnecessary now as the SDK hosted on SourceForge is complete. I've updated the Mac OS X compile wiki accordingly:

http://www.freeorion.org/index.php/Comp ... Directions

I've also committed a couple changes to SVN that get revision 3206 building/running for me. So I suggest the following procedure to make sure we're on the same page:

1) Download the SDK from SourceForge (or just make sure you unpack it freshly from a previous download)
2) Test that the compile of the included revision (I gather it works for you)
3) `svn update` for both the GG and FreeOrion sources
4) Compile again (it should work now that I've updated the Xcode project for the latest revision)
5) Post back with any build logs if you get errors

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

Re: Can't apply OS X patches

#22 Post by Bigjoe5 »

I was testing that very set of steps in fact, but when I used "svn update", I got two conflicts. When I entered "tc" for both of them, I got 100 errors. When I entered "mc" for both of them, I got only 12 errors. What should I have done? You're set of steps would seem to imply that I have to update twice: once for GG sources and once for FreeOrion sources. Is that the case? It looks to me like it did them both at once. When I went to the GG directory specifically and tried to update, it said I was already at version 801. Here is the most successful build log:

Edit: This is the first conflict:

Code: Select all

Conflict discovered in 'FreeOrion/Xcode/FreeOrion.xcodeproj/project.pbxproj'.
This is the second conflict:

Code: Select all

Conflict discovered in 'FreeOrion/client/human/chmain.cpp'.
Edit2: I got it to work!!! When the conflicts came up, I commanded tc both times, and it worked this time!

However, I am now having an even stranger problem. When I modify the 'default' folder, it doesn't affect the game at all. I put in my current 'default' folder and replaced the svn one with it, and nothing changed. For some strange reason, it acts as if the other folder was still there. Using XCode, I checked under "Resources" and clicked on the default folder in the XCode window, and it gave me my folder which I had put in there, yet it is apparently still using the svn one.
Attachments
build_log.txt.zip
(2.49 KiB) Downloaded 83 times
Warning: Antarans in dimensional portal are closer than they appear.

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

Re: Can't apply OS X patches

#23 Post by Geoff the Medio »

If the XCode projects knows about the resource files directory, that's completely unrelated to how the game itself finds the resource files directory. The location of the resource directory is stored in config.xml, so your game will look to wherever that is specified to be, regardless of where the binary is. Since you previously had an older version installed and running, you probably have an old config.xml remaining that is pointing to the old resource directory, meaning any changes to another resource directory, such as /default in the SVN directories, won't make any change to the resource files the game actually reads in.

So, delete config.xml and/or go into the options menu, directory tab (rightmost) and specify the correct resource files directory (which is usally whatever/FreeOrion/default/ )

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

Re: Can't apply OS X patches

#24 Post by Bigjoe5 »

Success. I now have access to the latest revision of FO, as well as the ability to modify it's contents. It was a long and difficult battle, but the hardest battles are always the ones where you gain the most experience.

Thanks everyone, for all your help and patience.
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: Can't apply OS X patches

#25 Post by .Id »

No problem.

In case you were curious about the conflicts... I believe they're there because I packaged up the SDK with local modifications that had not been committed to SVN (I wasn't a committer yet). Doing 'tc' to choose "their conflict" version instead of "mine" was correct so that you'll get the latest revisions of everything. I'll make a note about this on the wiki, thanks.

Post Reply