开发者

Building large application on Solaris is hanging without any information

I am trying to compile a rather big application on Solaris. Compiling it on AIX caused a problem that the command line buffer was too small (ARG_MAX).

On Solaris it compiles most of application successfullym but then it just hangs and without any error hangs an do nothing for at least an hour.

I am running it on SunOS 5.10 Sparc 32 bit.

Any ideas on how to find out what's going on or what might be causin开发者_如何转开发g such behavior?


I can't tell if the compilation is hanging, or your app itself.

If the app is hanging just follow the usual debugging steps: Either run it in your debugger and watch when it dies, or add print statements.

If the compiler dies, does it always die on the same file? If you compile that file by itself does it still hang? If so, try trussing the compiler when you try to build the file that hangs. You may find that it's blocking on I/O waiting for some nonexistant file or something similar.


What you may have to do is:

  1. Comment out or delete 99% of the code and compile that
  2. Add around 5% of the code back in and compile that

    if the last thing you added caused the hour hang then split it up

  3. Back to step 2


Just for those who encounter this in future. The problem was optimization flag causes it to take a REALLY long time to compile. I am talking 1+ hour for one cpp file.

This is big project. In addition there was an issue with Sys Admin on SUN box not giving me enough CPU share. Increasing that solved this problem, well made it quicker and within reasonable time bounds.

I hope this helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜