Up-to-date FreeOrion Mac-SDK and build - Test please!

For topics that do not fit in another sub-forum.
Post Reply
Message
Author
User avatar
Vezzra
Release Manager, Design
Posts: 4648
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Up-to-date FreeOrion Mac-SDK and build - Test please!

#91 Post by Vezzra » Thu Dec 01, 2011 7:35 pm

eleazar wrote:Without AIs -- my normal mode of testing since it loads quicker.
Now things are getting tricky. Because on my system universe generation works and I can happily play along just fine - no crashes at all. Although like you I'm on OS X 10.6.8, so issues related to slight differences in that area can be ruled out as cause. I've tried different settings: default (that is, I deleted the FreeOrion folder from Library/Application Support to ensure it's recreated with everything reset to default), 500 system galaxy with 12 AI's and every setting "high", and finally with no AI's. Each try was successful, no problems at all.

Can you give me your exact setting? Type of galaxy, number of systems, monsters, natives, starlanes etc., so I can reproduce your exact setup on my system? If you could send me your freeorion.log and freeoriond.log as well, that could be helpful too - maybe (I'm still feeling like I'm way out of my league here :wink:)

Also, could you try different settings, especially default, and tell me what happens? I'm trying to figure out if these issues you experience are somehow related to specific game settings.

And finally: Which builds exactly did work for you and which didn't? So far I have uploaded 4471, 4502, 4506 (with my python framwork issue patch applied) and 4508 (with both the python patch and the ValueRef patch applied). I thought 4506 was working for you...

Oh, one thing I noticed: When I start a game with 0 AI's, I immerdiately get a sitrep message "ERROR was spawned at ERROR". There still seems to be something amiss with monster spawning. I'll look into this. Maybe that's what triggers the crash of freeoriond on your system - but why FO behaves differently on our systems eludes me... :?

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Up-to-date FreeOrion Mac-SDK and build - Test please!

#92 Post by eleazar » Thu Dec 01, 2011 7:57 pm

Hmm... i tried about 10 times with different settings. I also tried throwing away config.xml. All server connection fails.

Then i threw away the logs to get some clean error logs for you, and it worked.

I'll reboot and see if that and run some diagnostics to see if something is wrong at my end.
Attachments
logs.zip
(4.39 KiB) Downloaded 52 times

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

Re: Up-to-date FreeOrion Mac-SDK and build - Test please!

#93 Post by Geoff the Medio » Thu Dec 01, 2011 8:37 pm

Vezzra wrote:Oh, one thing I noticed: When I start a game with 0 AI's, I immerdiately get a sitrep message "ERROR was spawned at ERROR". There still seems to be something amiss with monster spawning.
That is probably because there is an effect spawning a monster and generating a sitrep message about it, in a location where the human player doesn't have visibility. The effect that create the sitrep does so for all empires in the game, without considering whether those empires have vision of this event, or whether they have any knowledge about the monster ship design in question. So, as a player, you end up getting ERROR because the client doesn't have information to substitute into the sitrep about what system and monster type was spawned.

The fix would likely involve a way to specify that sitrep messages should only be generated for empires that have vision of a particular system or object. In this case, it empires that have vision of the target object should probably receive the message. Presently the only options are empires that have a particular EmpireAffiliationType to a particular object, which is / can be specified as part of the GenerateSitrepMessage effect.

Any further discussion should probably be on another thread, as this isn't an OSX-specific issue.

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

Re: Up-to-date FreeOrion Mac-SDK and build - Test please!

#94 Post by Geoff the Medio » Sat Dec 17, 2011 12:53 am

eleazar wrote:Hmm... i tried about 10 times with different settings. I also tried throwing away config.xml. All server connection fails.

Then i threw away the logs to get some clean error logs for you, and it worked.

I'll reboot and see if that and run some diagnostics to see if something is wrong at my end.
So what is the status of the Python issues on OSX? Has the patched app bundle from Vezzra fixed things? Or did you just get it running again without AIs?

User avatar
Vezzra
Release Manager, Design
Posts: 4648
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Up-to-date FreeOrion Mac-SDK and build - Test please!

#95 Post by Vezzra » Sun Dec 18, 2011 12:22 pm

Geoff the Medio wrote:Edit: tzlaine suggested making a separate static library for the parsing stuff, similar to what's done in the CMake build. /Edit
Since night seems to be too busy still, I tried to move all the parser code (basically all cpp-modules in the "parse" folder) to a separate build target, a static library "libParse.a". Although it worked, and has the advantage of having all the problematic parser stuff bundled together, it didn't change much else. Building FO in one go is still not possible. I have to compile EffectParser.cpp separately, then the rest of the parser modules, and then the whole FO app bundle.

The static library libCommon.a, where the parser code was included before this modification, shrank to a fraction of it's former size, and the new static library libParse.a is now several times the size of libCommon (several hundred MB). Judging by the size of the other static libraries (FREEALUT, GG, etc.) and the size of the final executeables, the parser code might take up the lion's share of the size of the final executeables...

User avatar
Vezzra
Release Manager, Design
Posts: 4648
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Up-to-date FreeOrion Mac-SDK and build - Test please!

#96 Post by Vezzra » Sun Dec 18, 2011 12:52 pm

Geoff the Medio wrote:So what is the status of the Python issues on OSX? Has the patched app bundle from Vezzra fixed things?...
I made a new build based on SVN 4521 with my python patch applied, and tried that on two other Macs (a MacBook and an iMac). On these Macs only the python packages bundled with 10.6 are installed, so no separate installation of python 2.7. Both Macs running 10.6.8. Worked flawlessly. Still, it would be good if there were others who are able to run my patched builds on Macs without python 2.7 installed separately...

Note: the python patch I applied was not the original one, but the revised version.

The new build (SVN 4521) for Mac OS X 10.6 can be downloaded here. EDIT: Download no longer available.
Last edited by Vezzra on Mon Mar 26, 2012 1:08 pm, edited 1 time in total.

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Up-to-date FreeOrion Mac-SDK and build - Test please!

#97 Post by eleazar » Tue Dec 20, 2011 12:02 am

I'm very happy to see AI fleet moving around for the first time!

I have previously installed python 2.7 separately.

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

Re: Up-to-date FreeOrion Mac-SDK and build - Test please!

#98 Post by Geoff the Medio » Thu Dec 22, 2011 8:04 pm

I just added a source file (UniverseServer.cpp) and (hopefully) moved removed stuff that differs between projects (server, human client, AI client) out of Universe.cpp, so some tweaks to the OSX project files are likely needed.

User avatar
Vezzra
Release Manager, Design
Posts: 4648
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Up-to-date FreeOrion Mac-SDK and build - Test please!

#99 Post by Vezzra » Thu Dec 22, 2011 8:44 pm

Geoff the Medio wrote:I just added a source file (UniverseServer.cpp) and (hopefully) moved removed stuff that differs between projects (server, human client, AI client) out of Universe.cpp, so some tweaks to the OSX project files are likely needed.
Thanks for the notification :)

Do I assume correctly that UniverseServer.cpp is only needed for freeoriond (and not for freeorion and freeorionca)? Just to make sure I add it to the correct build targets.

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

Re: Up-to-date FreeOrion Mac-SDK and build - Test please!

#100 Post by Geoff the Medio » Thu Dec 22, 2011 9:19 pm

Vezzra wrote:Do I assume correctly that UniverseServer.cpp is only needed for freeoriond (and not for freeorion and freeorionca)? Just to make sure I add it to the correct build targets.
That should be correct.

night
Space Kraken
Posts: 102
Joined: Sun Jun 12, 2011 1:21 pm

Re: Up-to-date FreeOrion Mac-SDK and build - Test please!

#101 Post by night » Mon Dec 26, 2011 12:07 pm

Finally! I got a working build again! You can get it here.

I also got additional 8GB of RAM for my machine. Here are my system's new specs:

OS: Mac OS X Lion 10.7.2 (11C74)

Developer Information:

Version: 4.2.1 (4D502)
Location: /Developer
Applications:
Xcode: 4.2.1 (834)
Instruments: 4.2 (4233)
Dashcode: 3.0.2 (336)


CPU: 2,93 GHz Intel Core i7 (4 Cores, 8 Threads)
RAM: 12 GB 1333 MHz DDR3
Graphics: ATI Radeon HD 5750 1024 MB
HDD: 2TB Hitachi HDS722020ALA33

Now it only takes about 20 minutes to build the entire FO Project from scratch (it took more than 6 hours with 4GB before with the new parser). So if you are thinking about getting more RAM for your machine I definitely recommend to do so.

Is Vezzra's Python patch already checked into SVN?

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

Re: Up-to-date FreeOrion Mac-SDK and build - Test please!

#102 Post by Geoff the Medio » Mon Dec 26, 2011 6:03 pm

night wrote:Is Vezzra's Python patch already checked into SVN?
Yes.

Edit: Also, what revision is that build? /Edit

User avatar
Vezzra
Release Manager, Design
Posts: 4648
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Up-to-date FreeOrion Mac-SDK and build - Test please!

#103 Post by Vezzra » Mon Dec 26, 2011 6:39 pm

Hey night, you're back :) I was starting to miss you ;)
night wrote:Finally! I got a working build again!
What did you do? I've been tinkering with the build configuration too, because I always had to manually compile EffectParser.cpp, then the rest of the parser modules, and only then I was able to run a successful build process. I finally came up with this solution: I made three extra build targets:

1.) libEffectParser.a: static library only containing EffectParser.cpp

2.) libConditionParser.a: static library containing ConditionParser.cpp, ConditionParser1.cpp, ConditionParser2.cpp and ConditionParser3.cpp

3.) libParse.a: static library containing the rest of the cpp's in the "parse" subfolder

And of course removed all the parser cpp's from libCommon.a. I also configured the build dependencies in a way so that EffectParser.cpp would be compiled first, then the ConditionParser cpp's, then the rest of the parser cpp's, and finally the rest of the project.

With this setup I've finally been able to just hit cmd-B and build FO in one go, which took ~20 min (so the same as on your system). I'm on a 2GHz Core i7 (Sandy Bridge) MBP with 8GB 1333MHz DDR3 RAM. Software specs: Xcode 3.2.6 on OSX 10.6.8. Had 4GB before and upgraded my RAM to 8GB, so I don't know how this build setup will work with less RAM, but I think having plenty of RAM surely can't hurt.

So I think we can safely say that we got the build issues on OSX under control?

I've also been trying to clean up the build settings a bit, I'm still experimenting (that is, going by trial and error ;)) here. Looks like there are a lot of settings on the individual targets build settings level which seem to be the same for all the targets, so these should be moved into the project build settings. This way the settings would be much easier to manage.

There are also several entries in the user-defined section which may or may not be obsolete. Then there is the "Release Universal" build configuration which doesn't seem to work at all anymore, I've only been building with the "Debug" build configuration. This also needs to be adjusted I think.

After all these issues are fixed, I think we should release an updated SDK for OSX - what do you think?

night
Space Kraken
Posts: 102
Joined: Sun Jun 12, 2011 1:21 pm

Re: Up-to-date FreeOrion Mac-SDK and build - Test please!

#104 Post by night » Mon Dec 26, 2011 8:43 pm

The build was based on rev. 4541 with Boost 1.47.0 (1.48.0 still does not work with GG).

I was able to build FO without any major modifications of the structure. I just had to add the newly added source files to the project / libCommon and press Cmd+B xD
Now I have the following targets:

FREEALUT
GG
Common
ClientCommon
FreeOrionClient
FreeOrionServer
FreeOrionAI
FreeOrion

Cleaning up the build configurations should be a good idea.

User avatar
Vezzra
Release Manager, Design
Posts: 4648
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Up-to-date FreeOrion Mac-SDK and build - Test please!

#105 Post by Vezzra » Mon Dec 26, 2011 9:04 pm

night wrote:I was able to build FO without any major modifications of the structure. I just had to add the newly added source files to the project / libCommon and press Cmd+B xD
Nope, that doesn't work on my system. If I do that, my whole system slows down to a crawl once the build process gets to the parser cpp's. Especially EffectParser.cpp and the ConditionParser cpp's. There it remains stuck, I always aborted the build once I got there, which was difficult enough. The system was responding so badly, I even had to power-cycle it forcefully once :(

Even with 8GB of RAM :(

So I would still suggest to break things up into smaller chunks for us poor guys who can't employ a powerful hardware configuration like the one you have at your hands ;) Although I don't know if the fact that you apparently can build FO now so easily is due to your 12GB of RAM or to you running Lion and Xcode 4. But either way, I think also poor souls running SL, Xcode 3 and having only 8GB of RAM should be able to build FO... so what do you think?
Cleaning up the Build configurations should be a good idea.
I will experiment with the build settings the next days and report the results.

Post Reply