Building CPAN modules on Solaris might be a bit different than on your average Linux platform. Here is the reason why: Solaris 10 comes pre-installed with Perl 5.8.4. This is the good news. However, it has been built with Sun's Studio compiler suite. When perl is built it saves the name of the compiler and any compiler flags in its configuration files, and then uses these saved settings when any additional modules are built. So when you try to build additional modules it will expect to find the Sun Studio compiler. Solaris 10 comes pre-installed with GNU C/C++ compiler but the Sun Studio compiler is optional and is likely not installed. Luckily Solaris comes with a tool called perlgcc that fixes this problem. It will make sure that modules are build with gcc rather than the Sun Studio compiler. Instead of invoking perl Makefile.PL to generate the makefile needed to compile a module, perlgcc Makefile.PL should be used instead. All command-line arguments to perlgcc are passed unmodified to perl. Needless to say you can forget all in this article if you have Sun Studio compiler installed and wish to use that for building modules. However most Perl modules have only been tested to compile with the GNU C/C++ compiler so if you do not want trouble stick with the recipe in this article. #### perl Makefile.PL #### perlgcc Makefile.PL #### [db07-dc2:~] root% ./dbitest.pl ld.so.1: perl: fatal: relocation error: file /usr/perl5/site_perl/5.8.4/sun4-solaris-64int/auto/DBD/Oracle/Oracle.so: symbol OCINlsEnvironmentVariableGet: referenced symbol not found Killed #### #!/usr/bin/perl use warnings; use strict; use DBI; my $ORACLE_HOME = "/u01/app/oracle/product/10.2.0.4"; my $ORACLE_SID="qaecom2"; my $USER="user"; my $PASS="password"; $ENV{ORACLE_HOME}=$ORACLE_HOME; $ENV{ORACLE_SID}=$ORACLE_SID; $ENV{PATH}="$ORACLE_HOME/bin"; $ENV{LD_LIBRARY_PATH}="$ORACLE_HOME/lib"; use strict; use DBI; my $dbh = DBI->connect( "dbi:Oracle:$ORACLE_SID", "$USER", "$PASS", ) || die "Database connection not made: $DBI::errstr"; $dbh->disconnect; #### [db07-dc2:~] root% uname -a SunOS db07-dc2 5.10 Generic_147440-09 sun4u sparc SUNW,Sun-Fire-15000 #### [db07-dc2:~] root% perl -v This is perl, v5.8.4 built for sun4-solaris-64int (with 36 registered patches, see perl -V for more detail)