One problem many people have are using the gcc lib instead of the lib sun provides. Solaris has a few differences then most other Unixs. If you read the install instructions from solaris they tell you how to use the libs sun provides instead of the gcc libs.