Not sure if this applies here, but I've had problems in the past where modules try to compile with a different C compiler than the base perl build uses. You should be able to find out what C compiler and options your perl was built with via perl -V.
Good luck.