it seems like there are some Problems in your environment.
Can you access all your environment variables?
Which version of postgresql do you use? Please consider Postgresql 9.1 is our currently stable and tested Version, so maybe you are using another Version...
Did you follow the Installtion instructions from our howto? e.g.
Which java version do you use? OpenJDK? It should be OpenJDK.
If you still cant compile please provide further Information of your System. Or the complete Compilation Log.