Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

djberg96 (2603)

djberg96
  (email not shown publicly)

Journal of djberg96 (2603)

Thursday May 29, 2003
11:32 AM

Solaris vs Oracle vs gcc vs me

[ #12503 ]
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.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • 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

    • 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.

      • Umm.. no.. Perl package for Solaris 2.8 is from here [sunfreeware.com].. 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 with