Can't apply OS X patches

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

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

Can't apply OS X patches

#1 Post by Bigjoe5 »

I am attempting to compile FO on Mac OS X 10.6

Following the instructions on this page, I am able to download the source with SVN. However, when I try to apply the first patch, I get this:

Code: Select all

patching file server/ServerApp.cpp
Hunk #1 FAILED at 38.
Hunk #2 FAILED at 123.
2 out of 2 hunks FAILED -- saving rejects to file server/ServerApp.cpp.rej
patching file util/Directories.cpp
Hunk #1 FAILED at 14.
1 out of 1 hunk FAILED -- saving rejects to file util/Directories.cpp.rej
patching file util/Process.cpp
Reversed (or previously applied) patch detected!  Assume -R? [n] 
I don't really know what this means, but I don't think it's a good thing that the patch is failing.

If I type in "yes", I get this:

Code: Select all

patching file util/Serialize.cpp
Hunk #1 FAILED at 54.
1 out of 1 hunk FAILED -- saving rejects to file util/Serialize.cpp.rej
patching file util/Process.h
Reversed (or previously applied) patch detected!  Assume -R? [n]
And if I type "yes" again, I get:

Code: Select all

patching file client/human/chmain.cpp
Hunk #1 FAILED at 44.
1 out of 1 hunk FAILED -- saving rejects to file client/human/chmain.cpp.rej
can't find file to patch at input line 239
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: client/human/HumanClientAppSoundOpenAL.cpp
|===================================================================
|--- client/human/HumanClientAppSoundOpenAL.cpp	(revision 2251)
|+++ client/human/HumanClientAppSoundOpenAL.cpp	(working copy)
--------------------------
File to patch:
I imagine the first two could be attributed to something perfectly simple that I know nothing about, but in the case of this last one, the file that is apparently supposed to be patched (which I assume is "HumanClientAppSoundOpenAL.cpp" in the client/human directory) is definitely missing, which leads me to believe that the patches themselves may be out of date? At any rate, some help would be appreciated.
Warning: Antarans in dimensional portal are closer than they appear.

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: Can't apply OS X patches

#2 Post by OndrejR »

Information on this page are outdated. Only download from sourceforge development environment for Mac and update project from svn. I can't test it because I don't have Mac, but recently it was fully functional.

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

#3 Post by Bigjoe5 »

Now, when I try to build and run FO using the Xcode project, I get the error:

Code: Select all

Check dependencies

GCC 4.2 is not compatible with the Mac OS X 10.4 SDK (file alutBufferData.c)
Anyone know how to fix this?
Warning: Antarans in dimensional portal are closer than they appear.

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: Can't apply OS X patches

#4 Post by OndrejR »

Bigjoe5 wrote:Now, when I try to build and run FO using the Xcode project, I get the error:

Code: Select all

Check dependencies

GCC 4.2 is not compatible with the Mac OS X 10.4 SDK (file alutBufferData.c)
Anyone know how to fix this?
Install gcc and g++ 4.3, but I don't know how in Mac OS X

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

#5 Post by Bigjoe5 »

Supposing I was able to install them, would there be any further steps required, any particular directory they would have to go in, in order for me to build FO?
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

#6 Post by .Id »

The Mac OS X compile wiki is out of date. The step to apply patches isn't required. (I don't have much time to be active, can someone edit it with any info I give below that ends up being useful?)

If you download the SDK from SourceForge it contains a snapshot of FreeOrion source from a release a while back as well as the corresponding Xcode project and dependencies.

This should build, but I don't have 10.6 to play around with yet, I'm on 10.5. The error you get, though, seems to indicate that the compiler version defaulted to 4.2 which isn't compatible with the Project setting of Base SDK = 10.4.

With the Xcode project open, check Project->Edit Project Settings and see if "Base SDK" is set to "Mac OS X 10.4" and "C/C++ Compiler Version" is set to "GCC 4.0". That's what I use.

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

#7 Post by Bigjoe5 »

I couldn't find where it says "C/C++ Compiler Version", so instead, I set the "Base SDK" to "Mac OS X 10.5".

Now, the build is successful (took less than a second, is that normal?) but I still have no idea how to actually launch the application. I used the "Build and Run" button and it said: "No launchable executable present at path", which was freeorion/FreeOrion/osx/build/Debug/FreeOrion.

This is probably something really easy to figure out, but I have no experience with this sort of thing...
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

#8 Post by .Id »

Bigjoe5 wrote:I couldn't find where it says "C/C++ Compiler Version", so instead, I set the "Base SDK" to "Mac OS X 10.5".

Now, the build is successful (took less than a second, is that normal?) but I still have no idea how to actually launch the application. I used the "Build and Run" button and it said: "No launchable executable present at path", which was freeorion/FreeOrion/osx/build/Debug/FreeOrion.

This is probably something really easy to figure out, but I have no experience with this sort of thing...
It should take longer to build all the sources. I think you've probably got the "Active Target" and "Active Executable" set to the wrong thing. There's several choices of targets that depend on logically grouped sets of source code (e.g. client, server, AI, GG).

Before building, set the "Active Target" to be the "FreeOrion" target which depends upon all the sources.

Before running, set the "Active Executable" to be "FreeOrion" so that it knows what to launch.

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

#9 Post by Bigjoe5 »

I tried to build the latest sdk release with the settings you specified. The build failed with 156 errors. Most of them were

Code: Select all

'<anonymous>' has incomplete type
or

Code: Select all

Invalid use of 'ILvoid'
There was also

Code: Select all

Too few arguments to function 'ILenum iIGetError(<type error>)'
and other similar errors. There were also apparently several boost errors and numerous warnings, most of which contained the word "deprecated". Any ideas?
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

#10 Post by Geoff the Medio »

Could you attach your build log? It might be helpful...

I googled some of the error messages, and it appears there are issues with some versions of DevIL and GCC 4.2.

As far as I know, FreeOrion doesn't use DevIL anymore, though, so perhaps the Mac SDK is out of date?

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

#11 Post by Bigjoe5 »

By "build log" I assume you mean the thing that shows me all those errors and warnings? Since it's just a pop-up that I access by clicking on the bottom right corner of my XCode window, I would, unfortunately, need instruction regarding how/where to access it as an uploadable (compressable?) file.

Also, if the Mac SDK is out of date, does it matter what the current version of FO is doing if I am not using it? I have downloaded the latest release of the SDK and am using this rather than the latest revision (which also has similar problems for me) so that I can compare my results with something that definitely works on .Id's system. The best thing right now would probably be for someone who has OS X 10.6 and knows what he's doing to download the SDK and build FO so that the problem can be identified as either my own incompetence or some sort of incompatibility.
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

#12 Post by Geoff the Medio »

Bigjoe5 wrote:By "build log" I assume you mean the thing that shows me all those errors and warnings? Since it's just a pop-up that I access by clicking on the bottom right corner of my XCode window, I would, unfortunately, need instruction regarding how/where to access it as an uploadable (compressable?) file.
Can you highlight and copy-paste the text in the popup?

There's probably also a build log file saved somewhere. google might tell you were that is, but I don't know...
The best thing right now would probably be for someone who has OS X 10.6 and knows what he's doing to download the SDK and build FO so that the problem can be identified as either my own incompetence or some sort of incompatibility.
Given how long it took for .Id to appear and start making OSX releases and fixing up the XCode project, it's probably unlikely that someone else will appear on short notice...

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

#13 Post by Bigjoe5 »

Geoff the Medio wrote:Can you highlight and copy-paste the text in the popup?
That was my first thought, but due to the formatting, it becomes an unformatted mess when I paste it. If you think it will help though, here it is. I'll probably try to look for a more convenient build log in the morning.
Attachments
build_log.txt.zip
(19.98 KiB) Downloaded 180 times
Warning: Antarans in dimensional portal are closer than they appear.

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: Can't apply OS X patches

#14 Post by OndrejR »

FreeOrion on Linux has problem with gcc and g++ in version 4.2. Install gcc 4.3 or change default compiler to suggested 4.0. Also check your installed boost. It should be at least in version 1.36. I don't know how.

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

#15 Post by Bigjoe5 »

I am unable to change the default compiler to 4.0, because while .Id's post implied that there would be an option called "C/C++ Compiler Version" under Project -> Edit Project Settings, I couldn't find it anywhere. If this would solve the problem, it would be very useful to know where that option is.
Warning: Antarans in dimensional portal are closer than they appear.

Post Reply