bluethundr has asked for the wisdom of the Perl Monks concerning the following question:
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 pe +rl is built it saves the name of the compiler and any compiler flags +in its configuration files, and then uses these saved settings when a +ny 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 Stu +dio compiler is optional and is likely not installed. Luckily Solaris comes with a tool called perlgcc that fixes this probl +em. It will make sure that modules are build with gcc rather than the + Sun Studio compiler. Instead of invoking perl Makefile.PL to generat +e the makefile needed to compile a module, perlgcc Makefile.PL should + be used instead. All command-line arguments to perlgcc are passed un +modified to perl. Needless to say you can forget all in this article if you have Sun Stu +dio compiler installed and wish to use that for building modules. How +ever 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.
I needed to useperl Makefile.PL
Instead. Once I did that everything went smoothly and installed no problem.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 OCINlsEnvironm +entVariableGet: referenced symbol not found Killed
Here's my machine info and perl version#!/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::er +rstr"; $dbh->disconnect;
[db07-dc2:~] root% uname -a SunOS db07-dc2 5.10 Generic_147440-09 sun4u sparc SUNW,Sun-Fire-15000
I was hoping that someone out there might have enough experience with this type of error to suggest a solution. Thanks in advance![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)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl: fatal: relocation error:
by Anonymous Monk on Jun 04, 2012 at 01:43 UTC | |
|
Re: perl: fatal: relocation error:
by NetWallah (Canon) on Jun 04, 2012 at 00:56 UTC | |
by Anonymous Monk on Jun 04, 2012 at 01:50 UTC |