In OpenSolaris, if you're installing perl modules via CPAN, you might run into this error:
cc: unrecognized option `-KPIC'
cc: language ildoff not recognized
cc: ReadKey.c: linker input file unused because linking not done
In order to fix that, edit the file /usr/perl5/5.8.4/lib/i86pc-solaris-64int/Config.pm, and make the following changes to the existing lines for 'optimize' and 'cccldflags':
UPDATE! Thanks to reader Vesta for his tip. The original tip I posted will not fix all the issues, for example Apache2::Util won't install.