I forgot..that if you compile using one version of a library, but you try to run it with LD_LIBRARY_PATH set to find some other version of the library first, you can run into problems. LD_LIBRARY_PATH should be left unset whenever possible, and only set to the minimum path for the minimum amount of time needed to run things that won't run otherwise.
Thank you so much for the reply :). The error was because as you said it was unable to fetch libraries of libxslt which was located in /usr/local/lib where as it was searching in /usr/lib. When the path is set the error is solved :) :)