Subject: | compile error due to stray \r in dbdimp.c |
*** Details of the system:
bash-2.03$ uname -a
SunOS mk-dsltest-1 5.8 Generic_108528-23 sun4u sparc SUNW,Ultra-80 Solaris
bash-2.03$ gcc --version
2.95.3
bash-2.03$ perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 2) configuration:
Platform:
osname=solaris, osvers=2.8, archname=sun4-solaris-64int
uname='sunos mk-dsltest-1 5.8 generic_108528-23 sun4u sparc
sunw,ultra-80 '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=unde
f
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=undef uselongdouble=undef
Compiler:
cc='gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include
-D_LARGEFILE_S
OURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='2.95.3 20010315 (release)',
gccosandvers='solaris2
.8'
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=87654321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long long', ivsize=8, nvtype='double', nvsize=8,
Off_t='off_t', lsee
ksize=8
alignbytes=8, usemymalloc=n, 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
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: USE_64_BIT_INT USE_LARGE_FILES
Built under solaris
Compiled at Aug 7 2006 12:50:38
@INC:
/usr/local/perl5.6/lib/5.6.2/sun4-solaris-64int
/usr/local/perl5.6/lib/5.6.2
/usr/local/perl5.6/lib/site_perl/5.6.2/sun4-solaris-64int
/usr/local/perl5.6/lib/site_perl/5.6.2
/usr/local/perl5.6/lib/site_perl
.
*** Details of the error ( $PATH to show the current version of perl
used ) whilst installing DBD-Oracle-1.18
bash-2.03$ echo $PATH
/oracle/app/9.0.1/bin:/usr/local/perl5.6/bin:/usr/local/bin:/usr/bin:/usr/sbin:/usr/sadm/bin:/usr/proc/bin:/usr/ucb:/etc/lvm:/usr/lib/lvm:/usr/local/bin:/usr/local/sbin:.
bash-2.03$ sudo perl -MCPAN -e 'install qw(DBD::Oracle)'
.....
CPAN.pm: Going to build P/PY/PYTHIAN/DBD-Oracle-1.18a.tar.gz
Using DBI 1.51 (for perl 5.006002 on sun4-solaris-64int) installed in
/usr/local
/perl5.6/lib/site_perl/5.6.2/sun4-solaris-64int/auto/DBI/
Configuring DBD::Oracle for perl 5.006002 on solaris (sun4-solaris-64int)
Remember to actually *READ* the README file! Especially if you have any
problems
.
Using Oracle in /oracle/app/9.0.1
DEFINE _SQLPLUS_RELEASE = "900010000" (CHAR)
Oracle version 9.0.1.0 (9.0)
Found /oracle/app/9.0.1/rdbms/demo/demo_rdbms.mk
Found /oracle/app/9.0.1/precomp/demo/proc/demo_proc.mk
Using /oracle/app/9.0.1/rdbms/demo/demo_rdbms.mk
Your LD_LIBRARY_PATH env var is set to ''
WARNING: Your LD_LIBRARY_PATH env var doesn't include
'/oracle/app/9.0.1/lib32'
but probably needs to.
Reading /oracle/app/9.0.1/rdbms/demo/demo_rdbms.mk
Reading /oracle/app/9.0.1/rdbms/lib/env_rdbms.mk
Attempting to discover Oracle OCI build32 rules
gcc -c -o DBD_ORA_OBJ.o DBD_ORA_OBJ.c
by executing: [make -f /oracle/app/9.0.1/rdbms/demo/demo_rdbms.mk
build32 ECHODO
=echo ECHO=echo GENCLNTSH='echo genclntsh' CC=true OPTIMIZE= CCFLAGS=
EXE=DBD_OR
A_EXE OBJS=DBD_ORA_OBJ.o]
Oracle oci build command:
[true -L/opt/SUNWcluster/lib -R/opt/SUNWcluster/lib -o build
-L/oracle
/app/9.0.1/rdbms/lib32/ -L/oracle/app/9.0.1/lib32/ -o DBD_ORA_EXE
DBD_ORA_OBJ.o
-lclntsh `cat /oracle/app/9.0.1/lib32/ldflags` `cat
/oracle/app/9.0.1/lib32/s
ysliblist` -R/oracle/app/9.0.1/lib32 -laio -lposix4 -lkstat -lm -lthread]
Found header files in /oracle/app/9.0.1/rdbms/demo
/oracle/app/9.0.1/rdbms/publi
c.
Checking for functioning wait.ph
System: perl5.006002 sunos mk-dsltest-1 5.8 generic_108528-23 sun4u
sparc sunw,u
ltra-80
Compiler: gcc -O2 -fno-strict-aliasing -I/usr/local/include
-D_LARGEFILE_SOURC
E -D_FILE_OFFSET_BITS=64
Linker: /usr/ucb/ld
Sysliblist: -lnsl -lsocket -lgen -ldl
Oracle makefiles would have used these definitions but we override them:
CC: cc
CFLAGS: $(GFLAG) $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(PFLAGS)\
$(SHARED_CFLAG) $(USRFLAGS)
[$(GFLAG) -xO2 $(CDEBUG) -Xa $(PROFILE) -xstrconst -dalign
-xF $(XS)
$(MR) -xildoff -errtags=yes -v -xarch=v9 -xchip=ultra3 -W2,-AKNR_S
-Wd,-xsafe=un
boundsym -Wc,-Qiselect-funcalign=32 -xcode=abs44
-Wc,-Qgsched-trace_late=1 -Wc,-
Qgsched-T5 -xalias_level=weak -D_REENTRANT -DSS_64BIT_SERVER -DBIT64
-DMACHINE64
-K PIC -I/oracle/app/9.0.1/rdbms/demo -I/oracle/app/9.0.1/rdbms/public
-I/oracl
e/app/9.0.1/plsql/public -I/oracle/app/9.0.1/network/public
-DSLMXMX_ENABLE -DSL
TS_ENABLE -D_SVID_GETTOD -D_REENTRANT $(LPFLAGS) $(USRFLAGS)]
LDFLAGS: -o $@ $(LDPATHFLAG)$(PRODLIBHOME) $(LDPATHFLAG)$(LIBHOME)
[-o $@ -L/oracle/app/9.0.1/rdbms/lib/ -L$(LIBHOME)]
Linking with OTHERLDFLAGS = -L/opt/SUNWcluster/lib
-R/opt/SUNWcluster/lib -L/or
acle/app/9.0.1/rdbms/lib32/ -L/oracle/app/9.0.1/lib32/ -lclntsh `cat
/oracle/
app/9.0.1/lib32/ldflags` `cat /oracle/app/9.0.1/lib32/sysliblist`
-R/oracle/ap
p/9.0.1/lib32 -laio -lposix4 -lkstat -lm -lthread [from 'build32' rule]
WARNING: If you have problems you may need to rebuild perl with
threading enable
d.
Checking if your kit is complete...
Warning: the following files are missing in your kit:
META.yml
Please inform the author.
LD_RUN_PATH=/oracle/app/9.0.1/lib32:/oracle/app/9.0.1/rdbms/lib32
Using DBD::Oracle 1.18.
Using DBD::Oracle 1.18.
Using DBI 1.51 (for perl 5.006002 on sun4-solaris-64int) installed in
/usr/local
/perl5.6/lib/site_perl/5.6.2/sun4-solaris-64int/auto/DBI/
Writing Makefile for DBD::Oracle
*** If you have problems...
read all the log printed above, and the README and README.help.txt
files.
(Of course, you have read README by now anyway, haven't you?)
cp mkta.pl blib/lib/DBD/mkta.pl
cp Oracle.pm blib/lib/DBD/Oracle.pm
cp lib/DBD/Oracle/GetInfo.pm blib/lib/DBD/Oracle/GetInfo.pm
cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm
cp dbdimp.h blib/arch/auto/DBD/Oracle/dbdimp.h
cp ocitrace.h blib/arch/auto/DBD/Oracle/ocitrace.h
cp Oracle.h blib/arch/auto/DBD/Oracle/Oracle.h
cp oraperl.ph blib/lib/oraperl.ph
/usr/local/perl5.6/bin/perl -p -e "s/~DRIVER~/Oracle/g"
/usr/local/perl5.6/lib/s
ite_perl/5.6.2/sun4-solaris-64int/auto/DBI/Driver.xst > Oracle.xsi
/usr/local/perl5.6/bin/perl /usr/local/perl5.6/lib/5.6.2/ExtUtils/xsubpp
-typem
ap /usr/local/perl5.6/lib/5.6.2/ExtUtils/typemap -typemap typemap
Oracle.xs > O
racle.xsc && mv Oracle.xsc Oracle.c
gcc -c -I/oracle/app/9.0.1/rdbms/demo -I/oracle/app/9.0.1/rdbms/public
-I/oracl
e/app/9.0.1/rdbms/demo -I/oracle/app/9.0.1/rdbms/public
-I/oracle/app/9.0.1/plsq
l/public -I/oracle/app/9.0.1/network/public
-I/usr/local/perl5.6/lib/site_perl/5
.6.2/sun4-solaris-64int/auto/DBI -fno-strict-aliasing
-I/usr/local/include -D_LA
RGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.18\"
-DXS_VERSION=\"1.
18\" -fPIC "-I/usr/local/perl5.6/lib/5.6.2/sun4-solaris-64int/CORE"
-Wall -Wno-
comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"9.0.1.0\" Oracle.c
In file included from Oracle.c:105:
/usr/local/perl5.6/lib/site_perl/5.6.2/sun4-solaris-64int/auto/DBI/Driver_xst.h:
In function `dbixst_bounce_method':
/usr/local/perl5.6/lib/site_perl/5.6.2/sun4-solaris-64int/auto/DBI/Driver_xst.h:
12: warning: unused variable `Perl___notused'
/usr/local/perl5.6/lib/site_perl/5.6.2/sun4-solaris-64int/auto/DBI/Driver_xst.h:
In function `dbdxst_bind_params':
/usr/local/perl5.6/lib/site_perl/5.6.2/sun4-solaris-64int/auto/DBI/Driver_xst.h:
50: warning: unused variable `Perl___notused'
/usr/local/perl5.6/lib/site_perl/5.6.2/sun4-solaris-64int/auto/DBI/Driver_xst.h:
In function `dbdxst_fetchall_arrayref':
/usr/local/perl5.6/lib/site_perl/5.6.2/sun4-solaris-64int/auto/DBI/Driver_xst.h:
80: warning: unused variable `Perl___notused'
gcc -c -I/oracle/app/9.0.1/rdbms/demo -I/oracle/app/9.0.1/rdbms/public
-I/oracl
e/app/9.0.1/rdbms/demo -I/oracle/app/9.0.1/rdbms/public
-I/oracle/app/9.0.1/plsq
l/public -I/oracle/app/9.0.1/network/public
-I/usr/local/perl5.6/lib/site_perl/5
.6.2/sun4-solaris-64int/auto/DBI -fno-strict-aliasing
-I/usr/local/include -D_LA
RGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.18\"
-DXS_VERSION=\"1.
18\" -fPIC "-I/usr/local/perl5.6/lib/5.6.2/sun4-solaris-64int/CORE"
-Wall -Wno-
comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"9.0.1.0\" dbdimp.c
dbdimp.c:32: parse error before `->'
dbdimp.c:32: stray '\' in program
dbdimp.c: In function `oci_error_get':
dbdimp.c:83: `dbis' undeclared (first use in this function)
dbdimp.c:83: (Each undeclared identifier is reported only once
dbdimp.c:83: for each function it appears in.)
dbdimp.c: In function `ora_init':
dbdimp.c:182: `dbis' undeclared (first use in this function)
... more errors
*** FIX *** FIX *** FIX *** FIX ***
cd .cpan/build/DBD-Oracle-1.18
mv dbdimp.c dbdimpc.orig && tr -d '\r' < dbdimp.c.orig > dbdimp.c