Date: Fri, 1 Apr 2005 11:08:45 -0500 From: Richard Morse <remorse@partners.org> To: questions@freebsd.org Subject: Compiling DBD::Oracle against Oracle 10g (Linux)? Message-ID: <5305CA2D-A2C8-11D9-806B-000A956EB07E@partners.org>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hi! I'm trying to set up DBD::Oracle to use the Oracle 10g Client (for
Linux). I have Oracle installed, and sqlplus works just fine.
However, DBD::Oracle seems to have problems. I've included a "script"
session which contains a typical build (I did run through the all the
various suggestions in the README, but they had no real differences).
I haven't yet emailed the dbi-users list; I thought I would ask here
first to see if anyone has solved this problem before, especially since
I am using the linux compatibility layer to get Oracle to run...
The primary error that I'm trying to understand is, when running make
test:
install_driver(Oracle) failed: Can't load
'/root/.cpan/build/DBD-Oracle-1.16/blib/arch/auto/DBD/Oracle/Oracle.so'
for module DBD::Oracle: Shared object "libnnz10.so" not found, required
by "libclntsh.so.10.1" at /usr/local/lib/perl5/5.8.6/mach/DynaLoader.pm
line 230.
Thanks,
Ricky Morse
[-- Attachment #2 --]
Script started on Fri Apr 1 10:29:00 2005
hedwig# perl Makefile.PL
Using DBI 1.47 (for perl 5.008006 on i386-freebsd-64int) installed in /usr/local/lib/perl5/site_perl/5.8.6/mach/auto/DBI/
Configuring DBD::Oracle ...
>>> Remember to actually *READ* the README file!
Especially if you have any problems.
Using Oracle in /usr/local/oracle
DEFINE _SQLPLUS_RELEASE = "1001000300" (CHAR)
Oracle version 10.1.0.3 (10.1)
Found /usr/local/oracle/rdbms/demo/demo_rdbms.mk
Using /usr/local/oracle/rdbms/demo/demo_rdbms.mk
Reading /usr/local/oracle/rdbms/demo/demo_rdbms.mk
Reading /usr/local/oracle/rdbms/lib/env_rdbms.mk
Attempting to discover Oracle OCI build rules
cc -O -pipe -c DBD_ORA_OBJ.c
by executing: [make -f /usr/local/oracle/rdbms/demo/demo_rdbms.mk build ECHODO=echo ECHO=echo GENCLNTSH='echo genclntsh' CC=true OPTIMIZE= CCFLAGS= EXE=DBD_ORA_EXE OBJS=DBD_ORA_OBJ.o]
Warning: Oracle build rule discovery failed (256)
Oracle oci build prolog:
["/usr/local/oracle/rdbms/lib/env_rdbms.mk", line 222: Need an operator]
["/usr/local/oracle/rdbms/lib/env_rdbms.mk", line 224: Need an operator]
["/usr/local/oracle/rdbms/lib/env_rdbms.mk", line 226: Need an operator]
["/usr/local/oracle/rdbms/lib/env_rdbms.mk", line 244: Need an operator]
["/usr/local/oracle/rdbms/lib/env_rdbms.mk", line 248: Need an operator]
["/usr/local/oracle/rdbms/lib/env_rdbms.mk", line 252: Need an operator]
["/usr/local/oracle/rdbms/lib/env_rdbms.mk", line 2525: Missing dependency operator]
["/usr/local/oracle/rdbms/lib/env_rdbms.mk", line 2527: Need an operator]
["/usr/local/oracle/rdbms/lib/env_rdbms.mk", line 2529: Need an operator]
["/usr/local/oracle/rdbms/lib/env_rdbms.mk", line 2532: Missing dependency operator]
["/usr/local/oracle/rdbms/lib/env_rdbms.mk", line 2536: Need an operator]
["/usr/local/oracle/rdbms/lib/env_rdbms.mk", line 2538: Missing dependency operator]
["/usr/local/oracle/rdbms/lib/env_rdbms.mk", line 2540: Need an operator]
[make: fatal errors encountered -- cannot continue]
Oracle oci build command:
[]
Unable to interpret Oracle build commands from /usr/local/oracle/rdbms/demo/demo_rdbms.mk.
(Will continue by using fallback approach.)
Please report this to dbi-users@perl.org. See README for what to include.
Found header files in rdbms/public.
Checking for functioning wait.ph
System: perl5.008006 freebsd hedwig.mgh.harvard.edu 5.3-stable freebsd 5.3-stable #1: mon dec 13 11:31:45 est 2004 root@hedwig.mgh.harvard.edu:usrobjusrsrcsyshedwig_v2 i386
Compiler: cc -O -pipe -DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.6/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include
Linker: /usr/bin/ld
Sysliblist: -ldl -lm -lpthread -lnsl -lirc
Oracle makefiles would have used these definitions but we override them:
CC: cc
CFLAGS: $(GFLAG) $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(PFLAGS)\
$(SHARED_CFLAG) $(USRFLAGS)
[$(GFLAG) -O3 $(CDEBUG) $(CCFLAGS) -I/usr/local/oracle/rdbms/demo -I/usr/local/oracle/rdbms/public -I/usr/local/oracle/plsql/public -I/usr/local/oracle/network/public -DLINUX -D_GNU_SOURCE -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -DSLTS_ENABLE -DSLMXMX_ENABLE -D_REENTRANT -DNS_THREADS $(LPFLAGS) $(USRFLAGS)]
build: $(CC) $(ORALIBPATH) -o $(EXE) $(OBJS) $(OCISHAREDLIBS)
[ cc -L$(LIBHOME) -L/usr/local/oracle/rdbms/lib/ -o $(EXE) $(OBJS) -lclntsh $(EXPDLIBS) $(EXOSLIBS) -ldl -lm -lpthread -lnsl -lirc -ldl -lm $(USRLIBS) ]
LDFLAGS: -o $@ $(LDPATHFLAG)$(PRODLIBHOME) $(LDPATHFLAG)$(LIBHOME) $(LDPATHFLAG)$(LIBHOME)stubs/
[-o $@ -L/usr/local/oracle/rdbms/lib/ -L$(LIBHOME) -L$(LIBHOME)stubs/]
Linking with /usr/local/oracle/rdbms/lib/defopt.o -lclntsh -ldl -lm -lpthread -lnsl -lirc -ldl -lm [from $(DEF_OPT) $(OCISHAREDLIBS)]
Warning: If you have problems you may need to rebuild perl with threading enabled.
Warning: If you have problems you may need to rebuild perl with -Uusemymalloc.
Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -ldl
Note (probably harmless): No library found for -lnsl
Note (probably harmless): No library found for -ldl
LD_RUN_PATH=/usr/local/oracle/lib
Using DBD::Oracle 1.16.
Using DBD::Oracle 1.16.
Using DBI 1.47 (for perl 5.008006 on i386-freebsd-64int) installed in /usr/local/lib/perl5/site_perl/5.8.6/mach/auto/DBI/
Writing Makefile for DBD::Oracle
*** If you have problems...
read all the log printed above, and the README and README.help files.
(Of course, you have read README by now anyway, haven't you?)
hedwig# make
cp Oracle.pm blib/lib/DBD/Oracle.pm
cp oraperl.ph blib/lib/oraperl.ph
cp dbdimp.h blib/arch/auto/DBD/Oracle/dbdimp.h
cp ocitrace.h blib/arch/auto/DBD/Oracle/ocitrace.h
cp Oraperl.pm blib/lib/Oraperl.pm
cp Oracle.h blib/arch/auto/DBD/Oracle/Oracle.h
cp lib/DBD/Oracle/GetInfo.pm blib/lib/DBD/Oracle/GetInfo.pm
cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm
/usr/bin/perl -p -e "s/~DRIVER~/Oracle/g" /usr/local/lib/perl5/site_perl/5.8.6/mach/auto/DBI//Driver.xst > Oracle.xsi
/usr/bin/perl /usr/local/lib/perl5/5.8.6/ExtUtils/xsubpp -typemap /usr/local/lib/perl5/5.8.6/ExtUtils/typemap -typemap typemap Oracle.xs > Oracle.xsc && mv Oracle.xsc Oracle.c
cc -c -I/usr/local/oracle/rdbms/demo -I/usr/local/oracle/rdbms/public -I/usr/local/oracle/plsql/public -I/usr/local/oracle/network/public -I/usr/local/oracle/rdbms/demo -I/usr/local/oracle/rdbms/public -I/usr/local/lib/perl5/site_perl/5.8.6/mach/auto/DBI/ -DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.6/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include -O -pipe -DVERSION=\"1.16\" -DXS_VERSION=\"1.16\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.8.6/mach/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"10.1.0.3\" Oracle.c
Oracle.c: In function `XS_DBD__Oracle__db_ora_lob_append':
Oracle.xs:191: warning: unused variable `startp'
cc -c -I/usr/local/oracle/rdbms/demo -I/usr/local/oracle/rdbms/public -I/usr/local/oracle/plsql/public -I/usr/local/oracle/network/public -I/usr/local/oracle/rdbms/demo -I/usr/local/oracle/rdbms/public -I/usr/local/lib/perl5/site_perl/5.8.6/mach/auto/DBI/ -DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.6/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include -O -pipe -DVERSION=\"1.16\" -DXS_VERSION=\"1.16\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.8.6/mach/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"10.1.0.3\" dbdimp.c
dbdimp.c: In function `ora_db_login6':
dbdimp.c:314: warning: cast to pointer from integer of different size
dbdimp.c:328: warning: cast to pointer from integer of different size
dbdimp.c:338: warning: cast to pointer from integer of different size
dbdimp.c:342: warning: cast to pointer from integer of different size
dbdimp.c: In function `dbd_rebind_ph_char':
dbdimp.c:1120: warning: cast from pointer to integer of different size
cc -c -I/usr/local/oracle/rdbms/demo -I/usr/local/oracle/rdbms/public -I/usr/local/oracle/plsql/public -I/usr/local/oracle/network/public -I/usr/local/oracle/rdbms/demo -I/usr/local/oracle/rdbms/public -I/usr/local/lib/perl5/site_perl/5.8.6/mach/auto/DBI/ -DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.6/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include -O -pipe -DVERSION=\"1.16\" -DXS_VERSION=\"1.16\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.8.6/mach/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"10.1.0.3\" oci8.c
oci8.c:566: warning: 'fetch_func_nty' defined but not used
oci8.c:1012: warning: 'fbh_setup_getrefpv' defined but not used
Running Mkbootstrap for DBD::Oracle ()
chmod 644 Oracle.bs
rm -f blib/arch/auto/DBD/Oracle/Oracle.so
LD_RUN_PATH="/usr/local/oracle/lib" cc -shared -L/usr/local/lib Oracle.o dbdimp.o oci8.o /usr/local/oracle/rdbms/lib/defopt.o -o blib/arch/auto/DBD/Oracle/Oracle.so -L/usr/local/oracle/lib/ -lclntsh -lm -lpthread -lirc -lm
chmod 755 blib/arch/auto/DBD/Oracle/Oracle.so
cp Oracle.bs blib/arch/auto/DBD/Oracle/Oracle.bs
chmod 644 blib/arch/auto/DBD/Oracle/Oracle.bs
/usr/bin/perl "-Iblib/arch" "-Iblib/lib" ora_explain.PL ora_explain
Extracted ora_explain from ora_explain.PL with variable substitutions.
cp ora_explain blib/script/ora_explain
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/ora_explain
Manifying blib/man1/ora_explain.1
Manifying blib/man3/DBD::Oracle.3
Manifying blib/man3/DBD::Oraperl.3
hedwig# setenv TWO_TASK ***
hedwig# setenv ORACLE_USERID ***/***
hedwig# make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01base................Failed to load Oracle extension and/or shared libraries:
install_driver(Oracle) failed: Can't load '/root/.cpan/build/DBD-Oracle-1.16/blib/arch/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: Shared object "libnnz10.so" not found, required by "libclntsh.so.10.1" at /usr/local/lib/perl5/5.8.6/mach/DynaLoader.pm line 230.
at (eval 3) line 3
Compilation failed in require at (eval 3) line 3.
Perhaps a required shared library or dll isn't installed where expected
at t/01base.t line 19
The remaining tests will probably also fail with the same error.
*** Please read the README and README.help files for help. ***
^C
Script done on Fri Apr 1 10:30:25 2005
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5305CA2D-A2C8-11D9-806B-000A956EB07E>
