Just a guess: you're trying to compile Devel::DProf with gcc, but your Perl was built with a different compiler (likely Sun's). You need to compile XS modules with the same compiler you (or someone else) used to compile Perl.
If that's not it, post the output of "perl -V". It might give us a clue.