Ali Bahrami wrote: > Francois wrote: >> Trying to build a debug version of our code using Solaris 10 and SunStudio >> 12, and we get this error: >> >> ld: fatal: file /dev/zero: mmap anon failed: Not enough space >> >> Any idea? >> >> The ld process grows to ~4GB then dies. >> >> The compile server has plenty of memory and swap available. >> >> Any idea? Our program is getting quite large, but I am sure there are larger >> ones out there. >> >> If I build the same code on Solaris 9, I do not have the issue. (It gets up >> to 3.9GB and succeeds)
Are the objects the same size as the objects produced with Solaris 10 and SunStudio 12? Debugging information within the objects seems to account for a lot, and I think this information keeps getting bigger and bigger. >> Note that it is not my program that is larger than 4GB, but the LD process >> while linking. > > > I suspect that the 32-bit version of the linker is hitting the 4GB > wall and dying. > > Try using the 64-bit linker directly: > > /usr/ccs/bin/amd64/ld > or > /usr/ccs/bin/sparcv9/ld And, if the link-edit is being called from the compiler, then you have to convince the compiler to use an alternative link-editor. This can often come to the rescue: % LD_ALTEXEC=/usr/ccs/bin/amd64/ld CC ...... -- Rod.