In case if anyone else has this ELFCLASS problem in the future when building DBI & DBD::Oracle on Solaris 10 using a 32-bit Perl installation, here is what worked for me.

I used gcc version 3.2.2, and Active State's Perl version 5.8.8 as a 32-bit app.

I suggest that you first redo the header files, as sunfreeware suggests,

#cd /usr/local/lib/gcc-lib/sparc-sun-solaris2.10/3.3.2/install-tools/
#./mkheaders

Next you can install DBI as it is normally setup...
#perl Makefile.PL
#make
#make test
#make install

This configuration worked without a hitch for me. However, when using different versions of gcc, it proved impossible.

I needed to install DBD::Oracle as well, and found a problem when I tried to make it about the wrong ELFCLASS. Make sure that your LD_LIBRARY_PATH environment variable points to the 32-bit oracle library as oppose to the standard one which seems to be 64-bit. My LD_LIBRARY_PATH looks like,
/opt/oracle/app/product/dev/10.2.0:/opt/oracle/app/product/dev/10.2.0/lib32

And then build it as usual,
#perl Makefile.PL
#make
#make install

Hope this helps someone,

- Jon






From: "Jeffrey Seger" <[EMAIL PROTECTED]>
To: "Jon Daily" <[EMAIL PROTECTED]>
CC: dbi-users@perl.org
Subject: Re: DBI Installation Problems
Date: Mon, 21 Aug 2006 19:38:47 -0400

This line:

wrong ELF class: ELFCLASS64 at

suggests a 32 bit versus 64 bit problem to me.  I've only done one 64
bit perl and DBI install and that was on Linux, not Solaris.  Perhaps
someone more familiar can jump in.  However, if it were my machine,
I'd recompile perl from source, and make it 64 bit.  That is what I
did on my 64 bit Linux box.

On 8/21/06, Jon Daily <[EMAIL PROTECTED]> wrote:
Hi Jeff,

Unfortunately I am using gcc 3.4.4 now, and that is the same version that
Active Perl was installed with.

I tried running #make install despite all of the errors that #make test gave
me, and when I try to use the DBI module I get this error,

Can't load
'/opt/ActivePerl-5.8/lib/site_perl/5.8.8/sun4-solaris-thread-multi/auto/DBI/DBI.so'
for module DBI: ld.so.1: perl-static: fatal:
/opt/ActivePerl-5.8/lib/site_perl/5.8.8/sun4-solaris-thread-multi/auto/DBI/DBI.so:
wrong ELF class: ELFCLASS64 at
/opt/ActivePerl-5.8/lib/5.8.8/sun4-solaris-thread-multi/DynaLoader.pm line
230.
at /opt/ActivePerl-5.8/lib/site_perl/5.8.8/sun4-solaris-thread-multi/DBI.pm
line 259

Do you have any other suggestions?  I really appreciate the help,

Thanks,

- Jon



>From: "Jeffrey Seger" <[EMAIL PROTECTED]>
>To: "Jon Daily" <[EMAIL PROTECTED]>
>CC: dbi-users@perl.org
>Subject: Re: DBI Installation Problems
>Date: Fri, 18 Aug 2006 23:10:31 -0400
>
>It's important to compile DBI with the same compiler that perl was
>compiled with.  Active State's perl IIRC is a precompiled binary that
>may well have been compiled with another compiler. You can fin d out
>by examining the output of perl -V.
>
>If it turns out that you don't have the same compiler available, then
>I suggest re-compiling perl from source.  It'll take a bit of time
>now, but will save you tons as you compile other CPAN modules as well.
>
>On 8/18/06, Jon Daily <[EMAIL PROTECTED]> wrote:
>>I am trying to install the DBI module on a Solaris 10 machine. I am using
>>active perl 5.8.8.  I think I am having issues with the bit size
>>compatibility.  The Solaris installation is 64-bit, but perl is 32-bit.
>>Perl is working fine however, so i'm not sure why i am having trouble with
>>the DBI install.
>>
>>I first get errors at, #make test
>>I get lots of errors, but this is the typical one, and seems like the
>>biggest problem,
>>Error: Can't load '/opt/software/DBI-1.51/blib/arch/auto/DBI/DBI.so' for
>>module DBI: ld.so.1: perl-static: fatal:
>>/opt/software/DBI-1.51/blib/arch/auto/DBI/DBI.so: wrong ELF class:
>>ELFCLASS64 at
>>/opt/ActivePerl-5.8/lib/5.8.8/sun4-solaris-thread-multi/DynaLoader.pm line
>>230.
>>
>>No idea what I can do to fix this...do i need a 64-bit version of Perl?
>>
>>Thanks,
>>
>>- Jon
>>
>>
>>
>
>
>--
>--------------------------------------------------------------------------------------------------------------
>The darkest places in hell are reserved for those who maintain their
>neutrality in times of moral crisis.
>    Dante Alighieri (1265 - 1321)
>
>They who would give up an essential liberty for temporary security,
>deserve neither liberty or security.
>Benjamin Franklin
>
>Our lives begin to end the day we become silent about things that matter.
>Martin Luther King
>
>The right of the people to be secure in their persons, houses, papers,
>and effects, against unreasonable searches and seizures, shall not be
>violated, and no warrants shall issue, but upon probable cause,
>supported by oath or affirmation, and particularly describing the
>place to be searched, and the persons or things to be seized.
>
>Amendment IV to the Constitution of the United States
>--------------------------------------------------------------------------------------------------------------





--
--------------------------------------------------------------------------------------------------------------
The darkest places in hell are reserved for those who maintain their
neutrality in times of moral crisis.
   Dante Alighieri (1265 - 1321)

They who would give up an essential liberty for temporary security,
deserve neither liberty or security.
Benjamin Franklin

Our lives begin to end the day we become silent about things that matter.
Martin Luther King

The right of the people to be secure in their persons, houses, papers,
and effects, against unreasonable searches and seizures, shall not be
violated, and no warrants shall issue, but upon probable cause,
supported by oath or affirmation, and particularly describing the
place to be searched, and the persons or things to be seized.

Amendment IV to the Constitution of the United States
--------------------------------------------------------------------------------------------------------------


Reply via email to