Issues compiling Mac/Win

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

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

Re: Issues compiling Mac/Win

#16 Post by Vezzra »

Report#6: I finally managed to build the head revision (4502). That, however, was a bit harder than getting 4471 to build:

I had to build boost 1.47 for OS X, track down and fix what looks like an an error to me in Empire.h, add a lot of files to the Xcode project (and move some others) and add a lot of GG files to the GG build target (that weren't assigned to it, although already added to the project). Furthermore, I had to compile all those files who are now in the parse folder seperately, because when I tried to just build target common, the build process got stuck at one of the source files for almost two hours. I finally aborted the build, compiled the source files that hadn't been build seperately, that worked. After that the build went through successfully.

Regarding the fix for empire.h: I created a patch file for the fix I applied to empire.h. Without this fix I got a compiler error message at these lines, and I changed them to what I think should be correct. As the build succeeded with this fix, I think I got that right - the problem is, I can't be 100% sure, because my c++ skills are still somewhat limited. Maybe these lines were the way they were for a good reason, and should have been fixed in another way. Where should I post a patch like that? Or to whom shall I send it? I've attached it to this post, but I could post it elsewhere if someone points me to the right place.

On windows I'm still out of luck building FO 4502. I'll keep trying :D
Attachments

[The extension patch has been deactivated and can no longer be displayed.]


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

Re: Issues compiling Mac/Win

#17 Post by Geoff the Medio »

Vezzra wrote:I had to compile all those files who are now in the parse folder seperately, because when I tried to just build target common, the build process got stuck at one of the source files for almost two hours.
Similar problems happen on Windows with some of those files, with a similar method needed to get around it.
Regarding the fix for empire.h: I created a patch file for the fix I applied to empire.h. Without this fix I got a compiler error message at these lines, and I changed them to what I think should be correct. As the build succeeded with this fix, I think I got that right
It looks fine. MSVC doesn't object to the extra namespace specifiers, but they shouldn't be there. I made the change and committed it manually, since it was small.
Where should I post a patch like that? Or to whom shall I send it? I've attached it to this post...
Posting on the forums is usually best.
On windows I'm still out of luck building FO 4502
In addition to the compile tweak mentioned above, I've had issues with linking. I can't get it to work for the new parser files with debug symbols being generated, and I haven't had much luck getting a DLL of just the parser files to link, which would let the rest of the project build with debug symbols. With debug symbols off (a linker option), it links successfully.

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

Re: Issues compiling Mac/Win

#18 Post by Vezzra »

Geoff the Medio wrote:In addition to the compile tweak mentioned above, I've had issues with linking. I can't get it to work for the new parser files with debug symbols being generated, and I haven't had much luck getting a DLL of just the parser files to link, which would let the rest of the project build with debug symbols. With debug symbols off (a linker option), it links successfully.
Hm, I tried the compile each source file seperately approach on Win, but EffectParser.cpp failed to build even then. I can't compile this file. Tried it on a VM with 4GB of RAM, compiler crashes. I've to admit that I'm out of ideas now what else I could try :(

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

Re: Issues compiling Mac/Win

#19 Post by Vezzra »

More then a half year later I'm finally able to give my report#7 on my attempts to compile FO:

While compiling FO on OSX has been working fine ever since, I wasn't able to compile FO on Windows. It just turned out to be impossible to compile the MSVC solution without crashing the compiler on WinXP. So I finally decided to buy myself a Win7 (64bit) copy, install it into a VM, set up the FO dev environment and try again. What shall I say? Worked flawlessly on the first try, I just had to hit "Build solution". Even with "just" 4 GB of RAM assigned to the VM, although that seems to be the limit judging by the RAM consumption I observed during the build process.

So my guess is that this is a issue related to XP or, more likely, to 32bit Windows versions. It would be important to know if there is someone out there who is still able to build FO on a 32bit Windows - anyone? Because I think we should put that info on the compile for Windows wiki page (some kind of "hardware and software requirements" section) to spare some people who might try to compile FO on dated systems some frustration.

So if you read this and have experiences with compiling FO on Windows, could you report them? Give the specs of the systems on which you were able to build FO and where you failed.

Post Reply