If you come across the above error on PHP-5.2.17 custom compilation with the arch as 64, do follow the below steps,
--==--=
yum install libmhash-devel
yum install libmhash
-==-
Now, proceed with the compilation. This should fix the issue.
Done
--==--=
yum install libmhash-devel
yum install libmhash
-==-
Now, proceed with the compilation. This should fix the issue.
Done