Problem with linker

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
kdr
Space Krill
Posts: 2
Joined: Sun Nov 27, 2011 3:20 pm

Problem with linker

#1 Post by kdr »

Hi guys!

Here's my story: I've attempted to compile FO under Windows (Win7 64-bit, MVS 2010 Ultimate SP1), but unfortunately the build fails for some reason. It dies at the linking phase with the following message:

Code: Select all

LINK : fatal error LNK1201: error writing to program database 'E:\orion\FreeOrion\FreeOrion.pdb'; check for insufficient disk space, invalid path, or insufficient privilege
Obviously the problem is not with disk space (tens of gigabytes of free space on this partition as well as on the system one where temp is located) nor with privileges. At first I thought it was a lack of RAM that was causing the linker fail (a side topic: I was surprised with how much memory is actually needed to compile the project - the wiki says 2GB is recommended but on my system with 4GB devenv + cl jointly swallow up to 3GB; the build failed once just because of out-of-memory). But no - at that moment the total physical memory usage is just 60%.

I wanted to compile r.4503 with SDK pack. The linker actually works for a while before exiting. The .pdb file grows up to 1GB. Have tried linking several times - it always breaks roughly at the same moment.


Has anyone had a similar problem? Any help will be appreciated.

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

Re: Problem with linker

#2 Post by Geoff the Medio »

kdr wrote:Has anyone had a similar problem? Any help will be appreciated.
I've been fighting with the compiler and linker with this sort of problem for a few weeks. There's something about the new parser code that massively bloats the debug database and causes it to hit the 1 GB limit where it crashes during linking. I've just committed some modified MSVC project files that help - the temporary solution involves disabling generating of debug symbols during linking of the FreeOrion, FreeOrionCA, and FreeOrionD projects. This might let you start playing, but is not acceptable for development.

I also had issues during compiling, when the program database bloats up to 2 GB of RAM use, and takes about 20 minutes of slowly ramping up its RAM use before any compiling actually starts. This only seems to happen when the new parser headers are included in the relevant projects, or if the parser source files are being compiled. Due to this RAM use, trying to build more than one project at a time that includes these files produces out of stack space compiler crashes. If you didn't see these errors, I'm slightly surprised, though the use of multiple simultaneous project builds might be a local setting that you're not using.

kdr
Space Krill
Posts: 2
Joined: Sun Nov 27, 2011 3:20 pm

Re: Problem with linker

#3 Post by kdr »

Yup, turning off debug info generation in linker option helps (now I get the exception "Failed to find an Ogre GL render system." in runtime but I think I will solve that). Thanks!

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

Re: Problem with linker

#4 Post by Geoff the Medio »

kdr wrote:I get the exception "Failed to find an Ogre GL render system." in runtime
See viewtopic.php?p=40498#p40498

Post Reply