Compiling Qstat with any level of optimisation results in a broken binary with gcc 3.1... it has to be compiled with -O0 for it to work
I can't reproduce (or know how to reproduce) this. I run qstat fine. What arguments are you issuing to qstat?