Home » Developer & Programmer » Precompilers, OCI & OCCI » Proc compiling error on Oracle 10g....Please help
Proc compiling error on Oracle 10g....Please help [message #216339] |
Fri, 26 January 2007 11:15 |
kmak4
Messages: 1 Registered: January 2007 Location: Columbus, Ohio
|
Junior Member |
|
|
Hi,
I am having problem compiling Proc code on Oracle 10g running on UNIX. The program originally written and compile on VMS server running Oracle 8i. Now we are moving DB on UNIX and it has to be recompile to run on UNIX. I used following command line option to compile:
proc idcproc_new userid=xxx/xxx@link sqlcheck=full
Above generated idcproc_new.c
It all start falling apart when I try to link it by using folowing command:
make -f demo_proc.mk idcproc_new.
I am getting tons of errors. I do not know much about proc compiler and linking process but think that demo_proc.mk not correct or missing something.
When I try to compile and link sample program comes along with 10g in it demo directory I got the following:
______________
$make -f demo_proc.mk sample1
/bin/make -f /esidev3/oracle/product/10.2.0.1/precomp/demo/proc/demo_pro
c.mk OBJS=sample1.o EXE=sample1 build
make: 1254-002 Cannot find a rule to create target sample1.o from dependencies.
Following errors I am getting when linking my idcproc_new program:
$make -f demo_proc.mk idcproc_new
/esidev3/oracle/product/10.2.0.1/bin/oraxlc -O3 -q64 -DSS_64BIT_SERVE
R -qwarn64 -qinfo=uni -DAIXRIOS -I. -I/esidev3/oracle/product/10.2.0.1/precomp/p
ublic -I/esidev3/oracle/product/10.2.0.1/rdbms/public -I/esidev3/oracle/product/
10.2.0.1/rdbms/demo -I/esidev3/oracle/product/10.2.0.1/plsql/public -I/esidev3/o
racle/product/10.2.0.1/network/public -c idcproc_new.c
"idcproc_new.c", line 533.17: 1506-280 (S) Function argument assignment between
types "char*" and "struct {...}" is not allowed.
"idcproc_new.c", line 536.20: 1506-068 (S) Operation between types "long" and "s
truct {...}*" is not allowed.
"idcproc_new.c", line 538.19: 1506-191 (E) The character $ is not a valid C sour
ce character.
"idcproc_new.c", line 538.16: 1506-045 (S) Undeclared identifier str.
"idcproc_new.c", line 538.20: 1506-277 (S) Syntax error: possible missing ';' or
','?
"idcproc_new.c", line 618.1: 1506-412 (I) Referenced variable "sqlstm", which wa
s not initialized in its declaration.
"idcproc_new.c", line 688.1: 1506-412 (I) Referenced variable "sqlstm", which wa
s not initialized in its declaration.
"idcproc_new.c", line 736.1: 1506-412 (I) Referenced variable "sqlstm", which wa
s not initialized in its declaration.
"idcproc_new.c", line 766.1: 1506-412 (I) Referenced variable "sqlstm", which wa
s not initialized in its declaration.
"idcproc_new.c", line 786.1: 1506-412 (I) Referenced variable "sqlstm", which wa
s not initialized in its declaration.
"idcproc_new.c", line 806.23: 1506-742 (I) 64-bit portability: possible loss of
digits through conversion of unsigned long int type into int type.
"idcproc_new.c", line 822.20: 1506-743 (I) 64-bit portability: possible change o
f result through conversion of int type into unsigned long int type.
"idcproc_new.c", line 837.40: 1506-742 (I) 64-bit portability: possible loss of
digits through conversion of unsigned long int type into int type.
"idcproc_new.c", line 843.55: 1506-743 (I) 64-bit portability: possible change o
f result through conversion of int type into unsigned long int type.
"idcproc_new.c", line 846.47: 1506-743 (I) 64-bit portability: possible change o
f result through conversion of int type into unsigned long int type.
"idcproc_new.c", line 893.26: 1506-743 (I) 64-bit portability: possible change o
f result through conversion of int type into unsigned long int type.
"idcproc_new.c", line 1012.8: 1506-191 (E) The character $ is not a valid C sour
ce character.
"idcproc_new.c", line 1012.9: 1506-277 (S) Syntax error: possible missing ';' or
','?
"idcproc_new.c", line 1012.5: 1506-045 (S) Undeclared identifier sys.
"idcproc_new.c", line 1013.15: 1506-191 (E) The character $ is not a valid C sou
rce character.
"idcproc_new.c", line 1013.28: 1506-045 (S) Undeclared identifier asctimdescr.
"idcproc_new.c", line 1013.42: 1506-045 (S) Undeclared identifier bin_curtime.
"idcproc_new.c", line 1013.57: 1506-275 (S) Unexpected text ')' encountered.
"idcproc_new.c", line 1014.39: 1506-045 (S) Undeclared identifier asc_curtime.
"idcproc_new.c", line 1048.1: 1506-412 (I) Referenced variable "tok", which was
not initialized in its declaration.
"idcproc_new.c", line 1048.1: 1506-412 (I) Referenced variable "oracle_connect2"
, which was not initialized in its declaration.
"idcproc_new.c", line 1048.1: 1506-412 (I) Referenced variable "oracle_connect1"
, which was not initialized in its declaration.
"idcproc_new.c", line 1048.1: 1506-412 (I) Referenced variable "oracle_passwd",
which was not initialized in its declaration.
"idcproc_new.c", line 1048.1: 1506-412 (I) Referenced variable "oracle_username"
, which was not initialized in its declaration.
"idcproc_new.c", line 1048.1: 1506-412 (I) Referenced variable "command_line", w
hich was not initialized in its declaration.
"idcproc_new.c", line 1048.1: 1506-412 (I) Referenced variable "descr", which wa
s not initialized in its declaration.
"idcproc_new.c", line 1048.1: 1506-412 (I) Referenced variable "tag_len", which
was not initialized in its declaration.
"idcproc_new.c", line 1048.1: 1506-412 (I) Referenced variable "end_pos", which
was not initialized in its declaration.
"idcproc_new.c", line 1048.1: 1506-412 (I) Referenced variable "start_pos", whic
h was not initialized in its declaration.
"idcproc_new.c", line 1048.1: 1506-412 (I) Referenced variable "i", which was no
t initialized in its declaration.
"idcproc_new.c", line 1048.1: 1506-412 (I) Referenced variable "pos", which was
not initialized in its declaration.
"idcproc_new.c", line 1048.1: 1506-412 (I) Referenced variable "in_line_len", wh
ich was not initialized in its declaration.
"idcproc_new.c", line 1048.1: 1506-412 (I) Referenced variable "in_line", which
was not initialized in its declaration.
"idcproc_new.c", line 1048.1: 1506-412 (I) Referenced variable "dummy", which wa
s not initialized in its declaration.
"idcproc_new.c", line 1048.1: 1506-412 (I) Referenced variable "tag_idd", which
was not initialized in its declaration.
"idcproc_new.c", line 1048.1: 1506-412 (I) Referenced variable "in", which was n
ot initialized in its declaration.
"idcproc_new.c", line 1159.1: 1506-412 (I) Referenced variable "sqlstm", which w
as not initialized in its declaration.
"idcproc_new.c", line 1291.1: 1506-412 (I) Referenced variable "sqlstm", which w
as not initialized in its declaration.
"idcproc_new.c", line 1376.1: 1506-412 (I) Referenced variable "sqlstm", which w
as not initialized in its declaration.
"idcproc_new.c", line 1400.1: 1506-412 (I) Referenced variable "sqlstm", which w
as not initialized in its declaration.
"idcproc_new.c", line 1467.33: 1506-743 (I) 64-bit portability: possible change
of result through conversion of int type into unsigned long int type.
"idcproc_new.c", line 1475.1: 1506-412 (I) Referenced variable "l", which was no
t initialized in its declaration.
"idcproc_new.c", line 1475.1: 1506-412 (I) Referenced variable "i", which was no
t initialized in its declaration.
"idcproc_new.c", line 1477.13: 1506-343 (S) Redeclaration of sqlerror differs fr
om previous declaration on line 735 of "idcproc_new.c".
"idcproc_new.c", line 1477.13: 1506-050 (I) Return type "void" in redeclaration
is not compatible with the previous return type "int".
make: 1254-004 The error code from the last command is 1.
Stop.
______________
I realy appreciate if someone can help me to resolve this issue that is going for sometime. I have no clue how to fix it. Following is demo_proc.mk I am using:
___________________________________________________
# This makefile builds the sample programs in $(ORACLE_HOME)/precomp/demo/proc
# and can serve as a template for linking customer applications.
include $(ORACLE_HOME)/precomp/lib/env_precomp.mk
# SAMPLES is a list of the c proc sample programs.
# CPPSAMPLES is a list of the c++ proc sample programs.
# OBJECT_SAMPLES is a list of the proc sample programs using the new
# type features. You must install ott in addition to proc to run some
# of those samples.
SAMPLES=sample1 sample2 sample3 sample4 sample6 sample7 sample8 \
sample10 sample11 sample12 oraca sqlvcp cv_demo \
ansidyn1 ansidyn2 cpdemo1 cpdemo2 scdemo1 scdemo2
CPPSAMPLES=cppdemo1 cppdemo3
OBJECT_SAMPLES=objdemo1 lobdemo1 coldemo1 navdemo1
# These targets build all of a class of samples in one call to make.
samples: clean $(SAMPLES)
cppsamples: clean $(CPPSAMPLES)
object_samples: clean $(OBJECT_SAMPLES)
# The target 'build' puts together an executable $(EXE) from the .o files
# in $(OBJS) and the libraries in $(PROLDLIBS). It is used to build the
# c sample programs.
# The rules to make .o files from .c and .pc files are later in this file.
# $(PROLDLIBS) uses the client shared library; $(STATICPROLDLIBS) does not.
#
build: $(OBJS)
$(DEMO_PROC_BUILD_SHARED)
build_static: $(OBJS)
$(DEMO_PROC_BUILD_STATIC)
$(SAMPLES) $(OBJECT_SAMPLES):
$(MAKE) -f $(MAKEFILE) OBJS=$@.o EXE=$@ build
#-------------------------------------------------------------------
# Clean up all executables, *.o and generated *.c files
clean:
$(SILENT)$(RMF) $(SAMPLES) $(CPPSAMPLES) $(OBJECT_SAMPLES)
$(SILENT)$(RMF) *.c *.lis *.$(OBJ_EXT)
# sample5.pc illustrates the precompiler part of building a precompiler-forms
# application. Building the actual executable would require the FORMS bundle.
sample5:
$(SILENT)$(ECHO) 'sample5 is a user-exit demo; use a forms makefile to build it.'
# The c++ samples are built using the 'cppbuild' target. It precompiles to
# get a .c file, compiles to get a .o file and then builds the executable.
#
cppbuild: $(OBJS)
$(PROC) $(PROCPPFLAGS) iname=$(EXE)
$(CPP2O_EXE)
$(DEMO_PROC_CPPBUILD_SHARED)
cppbuild_static: $(OBJS)
$(PROC) $(PROCPPFLAGS) iname=$(EXE)
$(CPP2O_EXE)
$(DEMO_PROC_CPPBUILD_STATIC)
$(CPPSAMPLES): cppdemo2
$(MAKE) -f $(MAKEFILE) OBJS=$@.o EXE=$@ cppbuild
cppdemo2: empclass.o
$(MAKE) -f $(MAKEFILE) OBJS="cppdemo2.o empclass.o" EXE=$@ cppbuild
cppdemo2_static: empclass.o
$(MAKE) -f $(MAKEFILE) OBJS="cppdemo2.o empclass.o" EXE=cppdemo2 cppbuild_static
# Some of the samples require that .sql scripts be run before precompilation.
# If you set RUNSQL=run in your call to make, then make will use sqlplus or
# svrmgrl, as appropriate, to run the .sql scripts.
# If you leave RUNSQL unset, then make will print out a reminder to run the
# scripts.
# If you have already run the scripts, then RUNSQL=done will omit the reminder.
sqlplus_run:
($(CD) ../sql; $(BINHOME)sqlplus $(USER) @$(SCRIPT) < /dev/null)
svrmgrl_run:
($(CD) ../sql; $(BINHOME)svrmgrl < $(SCRIPT).sql)
sqlplus_ svrmgrl_:
$(SILENT)$(ECHO) "# You must run the .sql script, " $(SCRIPT),
$(SILENT)$(ECHO) "# before precomping this sample."
sqlplus_done svrmgrl_done:
#
calldemo-sql:
$(MAKE) -f $(MAKEFILE) USER=$(USERID) SCRIPT=calldemo sqlplus_$(RUNSQL)
sample11-sql:
$(MAKE) -f $(MAKEFILE) USER=$(USERID) SCRIPT=sample11 sqlplus_$(RUNSQL)
cv_demo-sql:
$(MAKE) -f $(MAKEFILE) USER=$(USERID) SCRIPT=cv_demo sqlplus_$(RUNSQL)
cppdemo2-sql:
$(MAKE) -f $(MAKEFILE) USER=$(USERID) SCRIPT=cppdemo2 sqlplus_$(RUNSQL)
lobdemo1-sql:
$(MAKE) -f $(MAKEFILE) USER=$(USERID) SCRIPT=lobdemo1c sqlplus_$(RUNSQL)
objdemo1-sql:
$(MAKE) -f $(MAKEFILE) USER=$(USERID) SCRIPT=objdemo1 sqlplus_$(RUNSQL)
coldemo1-sql:
$(MAKE) -f $(MAKEFILE) USER=$(USERID) SCRIPT=coldemo1 sqlplus_$(RUNSQL)
navdemo1-sql:
$(MAKE) -f $(MAKEFILE) USER=$(USERID) SCRIPT=navdemo1 sqlplus_$(RUNSQL)
# Here are some rules for converting .pc -> .c -> .o and for .typ -> .h.
#
# If proc needs to find .h files, it should find the same .h files that the
# c compiler finds. We use a macro named INCLUDE to hadle that. The general
# format of the INCLUDE macro is
# INCLUDE= $(I_SYM)dir1 $(I_SYM)dir2 ...
#
# Normally, I_SYM=-I, for the c compiler. However, we have a special target,
# pc1, which calls $(PROC) with various arguments, including $(INCLUDE). It
# is used like this:
# $(MAKE) -f $(MAKEFILE) <more args to make> I_SYM=include= pc1
# This is used for some of $(SAMPLES) and for $(OBJECT_SAMPLES).
.SUFFIXES: .pc .c .o .typ .h
pc1:
$(PCC2C)
.pc.c:
$(MAKE) -f $(MAKEFILE) PROCFLAGS="$(PROCFLAGS)" PCCSRC=$* I_SYM=include= pc1
.pc.o:
$(MAKE) -f $(MAKEFILE) PROCFLAGS="$(PROCFLAGS)" PCCSRC=$* I_SYM=include= pc1
$(C2O)
.c.o:
$(C2O)
.typ.h:
$(OTT) intype=$*.typ hfile=$*.h outtype=$*o.typ $(OTTFLAGS) code=c userid=$(USERID)
# These are specific targets to make the .o files for samples that require
# more careful handling.
sample9.o: sample9.pc calldemo-sql
$(PROC) $(PROCPLSFLAGS) iname=$*
$(C2O)
cv_demo.o: cv_demo.pc cv_demo-sql
$(PROC) $(PROCPLSFLAGS) iname=$*
$(C2O)
sample11.o: sample11.pc sample11-sql
$(PROC) $(PROCPLSFLAGS) iname=$*
$(C2O)
sample4.o: sample4.pc
$(MAKE) -f $(MAKEFILE) PCCSRC=$* I_SYM=include= pc1
$(C2O)
ansidyn1.o: ansidyn1.pc
$(PROC) mode=ansi iname=$*
$(C2O)
ansidyn2.o: ansidyn2.pc
$(PROC) dynamic=ansi iname=$*
$(C2O)
cpdemo2.o: cpdemo2.pc
$(PROC) cpool=yes threads=yes cmin=5 cmax=20 cincr=2 iname=$* $(CPDEMO_FLAG)
$(C2O)
cpdemo1.o: cpdemo1.pc
$(PROC) cpool=yes threads=yes iname=$* $(CPDEMO_FLAG)
$(C2O)
empclass.o: empclass.pc cppdemo2-sql
$(MAKE) -f $(MAKEFILE) PROCFLAGS="$(PROCPLSFLAGS) $(PROCPPFLAGS)" PCCSRC=$* I_SYM=include= pc1
$(CPP2O)
cppdemo1.o: cppdemo1.pc
$(MAKE) -f $(MAKEFILE) PROCFLAGS="$(PROCPPFLAGS)" PCCSRC=$* I_SYM=include= pc1
$(CPP2O)
cppdemo2.o: cppdemo2.pc cppdemo2-sql
$(MAKE) -f $(MAKEFILE) PROCFLAGS="$(PROCPPFLAGS)" PCCSRC=$* I_SYM=include= pc1
$(CPP2O)
cppdemo3.o: cppdemo3.pc
$(MAKE) -f $(MAKEFILE) PROCFLAGS="$(PROCPPFLAGS)" PCCSRC=$* I_SYM=include= pc1
$(CPP2O)
lobdemo1.o: lobdemo1.pc lobdemo1-sql
$(MAKE) -f $(MAKEFILE) PROCFLAGS="$(PROCPLSFLAGS)" PCCSRC=$* I_SYM=include= pc1
$(C2O)
objdemo1.o: objdemo1.pc objdemo1.typ objdemo1-sql
$(OTT) intype=$*.typ hfile=$*.h outtype=$*o.typ $(OTTFLAGS) code=c userid=$(USERID)
$(MAKE) -f $(MAKEFILE) PROCFLAGS=intype=$*o.typ PCCSRC=$* I_SYM=include= pc1
$(C2O)
coldemo1.o: coldemo1.pc coldemo1.typ coldemo1-sql
$(OTT) intype=$*.typ hfile=$*.h outtype=$*o.typ $(OTTFLAGS) code=c userid=$(USERID)
$(MAKE) -f $(MAKEFILE) PROCFLAGS=intype=$*o.typ PCCSRC=$* I_SYM=include= pc1
$(C2O)
navdemo1.o: navdemo1.pc navdemo1.typ navdemo1-sql
$(OTT) intype=$*.typ hfile=$*.h outtype=$*o.typ $(OTTFLAGS) code=c userid=$(USERID)
$(MAKE) -f $(MAKEFILE) PROCFLAGS=intype=$*o.typ PCCSRC=$* I_SYM=include= pc1
$(C2O)
# These macro definitions fill in some details or override some defaults
MAKEFILE=$(ORACLE_HOME)/precomp/demo/proc/demo_proc.mk
OTTFLAGS=$(PCCFLAGS)
##PROCPLSFLAGS=sqlcheck=full userid=$(USERID)
PROCPLSFLAGS=sqlcheck=none userid=$(USERID)
PROCPPFLAGS=code=cpp $(CPLUS_SYS_INCLUDE)
USERID=/
INCLUDE=$(I_SYM). $(I_SYM)$(PRECOMPHOME)public $(I_SYM)$(RDBMSHOME)public $(I_SYM)$(RDBMSHOME)demo $(I_SYM)$(PLSQLHOME)public $(I_SYM)$(NETWORKHOME)public
|
|
|
|
Goto Forum:
Current Time: Sat Nov 23 06:50:24 CST 2024
|