Re: problems building DBD::Oracle 1.16 - help - please

Re: problems building DBD::Oracle 1.16 - help - please

am 03.02.2005 19:45:26 von ghoti

PREAMBLE:
Okay - I just tried building my own copy of Perl 5.8.2 [desired
for compatibility with existing binary version of perl we're using
elsewhere], and I'm still running into the same problem as before.

This time I *am* using the perl built on this machine and I *am*
using the *same* compiler I used to build perl to try to build
DBD::Oracle.

Please send responses to - or cc to: ghoti@ix.netcom.com

ENVIRONMENT - HIGH LEVEL:
Oracle 9i [9.2.0]
Solaris 9
perl 5.8.2

DBI-1.47
DBD-Oracle-1.16

gcc 3.4.2
ld 2.15 [gnu - symlinked into /usr/ccs/bin]

ENVIRONMENT - DETAILS:
[OS]
SunOS xxxxx 5.9 Generic_117171-12 sun4u sparc SUNW,Sun-Fire-880

[Perl]
Summary of my perl5 (revision 5.0 version 8 subversion 2)
configuration:
Platform:
osname=solaris, osvers=2.9, archname=sun4-solaris
uname='sunos wdchqdtmsp01 5.9 generic_117171-12 sun4u sparc
sunw,sun-fire-880 '
config_args='-de'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define
usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-fno-strict-aliasing
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O',
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='3.4.2', gccosandvers='solaris2.9'
intsize=4, longsize=4, ptrsize=4, doublesize=8,
byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8,
Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib '
libpth=/usr/local/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc
perllibs=-lsocket -lnsl -ldl -lm -lc
libc=/lib/libc.so, so=so, useshrplib=false,
libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='
-Wl,-E'
cccdlflags='-fPIC', lddlflags=' -Wl,-E -G -L/usr/local/lib'


Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Built under solaris
Compiled at Feb 3 2005 10:14:29
%ENV:
PERLDOC_PAGER="less -+C -E"
@INC:
/usr/local/lib/perl5/5.8.2/sun4-solaris
/usr/local/lib/perl5/5.8.2
/usr/local/lib/perl5/site_perl/5.8.2/sun4-solaris
/usr/local/lib/perl5/site_perl/5.8.2
/usr/local/lib/perl5/site_perl

[gcc]
Reading specs from
/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as
--with-ld=/usr/ccs/bin/ld --disable-nls
Thread model: posix
gcc version 3.4.2

[ld]
GNU ld version 2.15
(/usr/ccs/ld was moved out of the way and /usr/local/bin/ld
was symlink'ed into its place since we are using a
binary-distribution of gcc which doesn't seem to pickup on
changes to information in the specs file)

BUILD PROBLEM:
--------------------[BEGIN_WRAPPED_LINES]

LD_RUN_PATH="/opt/oracle/product/9.2.0/lib32:/opt/oracle/pro duct/9.2.0/
rdbms/lib32"
gcc -Wl,-E -G -L/usr/local/lib Oracle.o dbdimp.o oci8.o
-xarch=v9 -L/opt/oracle/product/9.2.0/lib/ -lclntsh `cat
/opt/oracle/product/9.2.0/lib/ldflags` `cat
/opt/oracle/product/9.2.0/lib/sysliblist`
-R/opt/oracle/product/9.2.0/lib -laio -lposix4 -lm
-lthread
-o blib/arch/auto/DBD/Oracle/Oracle.so
/usr/ccs/bin/ld: skipping incompatible
/opt/oracle/product/9.2.0/lib//libclntsh.so when searching
for -lclntsh
/usr/ccs/bin/ld: cannot find -lclntsh
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/DBD/Oracle/Oracle.so] Error 1
--------------------[END_WRAPPED_LINES]


HELP:
What makes the libclntsh.so "incompatible"?
How can I fix this?

Re: problems building DBD::Oracle 1.16 - help - please

am 04.02.2005 16:06:04 von ghoti

On Feb 3, 2005, at 1:45 PM, Adam Stoller wrote:
> [...]
> ENVIRONMENT - HIGH LEVEL:
> Oracle 9i [9.2.0]
> Solaris 9
> perl 5.8.2
>
> DBI-1.47
> DBD-Oracle-1.16
>
> gcc 3.4.2
> ld 2.15 [gnu - symlinked into /usr/ccs/bin]
> [...]

> BUILD PROBLEM:
> --------------------[BEGIN_WRAPPED_LINES]
[...]
> /usr/ccs/bin/ld: skipping incompatible
> /opt/oracle/product/9.2.0/lib//libclntsh.so when searching
> for -lclntsh
> /usr/ccs/bin/ld: cannot find -lclntsh
> collect2: ld returned 1 exit status
> make: *** [blib/arch/auto/DBD/Oracle/Oracle.so] Error 1
> --------------------[END_WRAPPED_LINES]
>
> HELP:
> What makes the libclntsh.so "incompatible"?
> How can I fix this?

For the record - "incompatible" in this case apparently means that we
had a 64-bit version of the library (client installation) on the
machine where everything else was 32-bit (gcc, perl, etc.) - and has
**nothing** to do with using a version of perl that was built on this
machine *or* using the same version of gcc that was used to build perl.

- You might want to add something like this to the README, README.help,
or README.clients file ...

Once we fixed that, we found that with ORACLE_HOME being protected (750
directory access) using 'sudo make' wasn't sufficient - and we had to
change the access rights on ORACLE_HOME to 755

We got past that, it builds, but now 'make test' seems to fail to
connect to the DB - and we're working on tracking that down.

--fish