Recursion occur when compile ruby source code

I got problem in compiling the ruby source code,./configure works
appropriately,when I run make,it seems falling into dead loop or
infinite recursion,checking system header files over and over again.What
could I do to fix it,thanks for any reply.