As mentioned above, the compiler is important. You can compile it with the GNU compiler or the Sun compiler, but you must decide which one and make sure the other isn't in your path. There are some tips on setting this up in the INSTALL doc for solaris included in the distribution. Read through that install doc and see if that helps.
Good luck.