Solaris vs Oracle vs gcc vs me

djberg96 on 2003-05-29T16:32:43

Yesterday we upgraded to Oracle 9.2.0 on our Solaris 8 box. While the database installation went fine, I ran into a wholly different snag - I can't build against libclntsh.so. For those that need to build an Oracle driver for Perl or Ruby, that's bad.

It took me a bit to figure out what was going on, but turned out to be some sort of linker problem (as usual). I tried building this simple C program: /* test.c */ /* gcc -Wall -o test -L/oracle9023/lib -lclntsh test.c */ int main(){ return 0; }

int t(){ olog(); return 0; }
Using Sun's ld I end up with ELFCLASS errors. Using GNU's ld I end up with incompatability errors with libclntsh.so. Yeah, I tried -m64, -m32, and some other flags, too.

I've successfully built Oracle 8 on the same box and Oracle 9.0.1 on my own Solaris box, so I'd really like to know WTF happened between Oracle 9.0.1 and 9.2.0. At this point I've requested a license for Sun's Forte compiler, with the hope that it will solve our compiler/linker problems forever.

Yeah, right.


is there something I'm missing.. ?

tinman on 2003-05-30T06:07:13

gcc 2.95, 3.x (cant remember which version) have both worked fine for me..

Solaris 2.8, Oracle 9.0.1 first and then we upgraded to 9.2 recently.. I upgraded to 5.8 after we put in 9.2, no problems ?

Of course, I cheated a bit for a test machine, went to sunfreeware and snagged the Perl package and then just compiled the dbd::oracle module.. I've never trusted the ld that is supplied by Sun incidentally.. gotten some weird errors off it

Re:is there something I'm missing.. ?

djberg96 on 2003-05-30T14:41:03

If you used the Solaris package for Perl then you're using a Perl built with Sun's compiler, and not gcc. Frankly, I'm surprised DBD::Oracle compiled without incident unless you used Solaris::PerlGcc.

Ultimately, though, it's a compiler issue. Maybe 'as' is involved, too. I'm simply out of my league at this point.

Re:is there something I'm missing.. ?

tinman on 2003-06-02T05:13:53

Umm.. no.. Perl package for Solaris 2.8 is from here.. I just grepped through the Makefile that was generated when I installed DBD::Oracle on that machine and...
# These definitions are from config.sh (via /usr/local/lib/perl5/5.8.0/sun4-sola ris/Config.pm)
# They may have been overridden via Makefile.PL or on the command line
AR = ar
CC = gcc -B/usr/ccs/bin/
CCCDLFLAGS = -fPIC
CCDLFLAGS =
DLEXT = so
DLSRC = dl_dlopen.xs
LD = gcc -B/usr/ccs/bin/
LDDLFLAGS = -G -L/usr/local/lib

If I install without gcc already available on that machine, the installation barfs :)

Re:is there something I'm missing.. ?

djberg96 on 2003-06-02T18:08:14

Oh, really? That's interesting. My bad. I dunno if that was always the case, though.