Pro*C Problem: PCC-S-02201, Encountered the symbol "size_t" when expecting
We have Oracle 9.2.0.6 Suse Linux - Amd64
When we run make file, precompiler generate the follow error:
----------------------------------------------------------------------------------------------------------------------
proc parse=full iname=l1_ack include=. include=/opt/oracle/product/9ir2/precomp/public include=/opt/oracle/product/9ir2/rdbms/public include=/opt/oracle/product/9ir2/rdbms/demo include=/opt/oracle/product/9ir2/plsql/public include=/opt/oracle/product/9ir2/network/public include=/data1/wise/wlog116/ProC/include
Pro*C/C++: Release 9.2.0.6.0 - Production on Mon Nov 7 18:18:28 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
System default option values taken from: /opt/oracle/product/9ir2/precomp/admin/pcscfg.cfg
Syntax error at line 72, column 26, file /usr/include/gconv.h:
Error at line 72, column 26 in file /usr/include/gconv.h
unsigned char **, size_t *, int, int);
.........................1
PCC-S-02201, Encountered the symbol "size_t" when expecting one of the following
:
... auto, char, const, double, enum, float, int, long,
ulong_varchar, OCIBFileLocator OCIBlobLocator,
OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,
OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,
short, signed, sql_context, sql_cursor, static, struct,
union, unsigned, utext, uvarchar, varchar, void, volatile,
a typedef name, exec oracle, exec oracle begin, exec,
exec sql, exec sql begin, exec sql type, exec sql var,
The symbol "enum," was substituted for "size_t" to continue.
Syntax error at line 88, column 7, file /usr/include/gconv.h:
Error at line 88, column 7 in file /usr/include/gconv.h
size_t *);
......1
PCC-S-02201, Encountered the symbol "size_t" when expecting one of the following
:
... auto, char, const, double, enum, float, int, long,
ulong_varchar, OCIBFileLocator OCIBlobLocator,
OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,
OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,
short, signed, sql_context, sql_cursor, static, struct,
union, unsigned, utext, uvarchar, varchar, void, volatile,
a typedef name, exec oracle, exec oracle begin, exec,
exec sql, exec sql begin, exec sql type, exec sql var,
The symbol "enum," was substituted for "size_t" to continue.
Syntax error at line 97, column 6, file /usr/include/gconv.h:
Error at line 97, column 6 in file /usr/include/gconv.h
size_t *);
.....1
PCC-S-02201, Encountered the symbol "size_t" when expecting one of the following
:
... auto, char, const, double, enum, float, int, long,
ulong_varchar, OCIBFileLocator OCIBlobLocator,
OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,
OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,
short, signed, sql_context, sql_cursor, static, struct,
union, unsigned, utext, uvarchar, varchar, void, volatile,
a typedef name, exec oracle, exec oracle begin, exec,
exec sql, exec sql begin, exec sql type, exec sql var,
The symbol "enum," was substituted for "size_t" to continue.
Syntax error at line 106, column 3, file /usr/include/gconv.h:
Error at line 106, column 3 in file /usr/include/gconv.h
__gconv_trans_fct __trans_fct;
..1
PCC-S-02201, Encountered the symbol "__gconv_trans_fct" when expecting one of th
e following:
char, const, double, enum, float, int, long, ulong_varchar,
OCIBFileLocator OCIBlobLocator, OCIClobLocator, OCIDateTime,
OCIExtProcContext, OCIInterval, OCIRowid, OCIDate, OCINumber,
OCIRaw, OCIString, short, signed, sql_context, sql_cursor,
struct, union, unsigned, utext, uvarchar, varchar, void,
volatile, a typedef name,
Error at line 53, column 11 in file /usr/include/libio.h
# include <stdarg.h>
..........1
PCC-S-02015, unable to open include file
Syntax error at line 0, column 0, file l1_ack.pc:
Error at line 0, column 0 in file l1_ack.pc
PCC-S-02201, Encountered the symbol "<eof>" when expecting one of the following:
; : an identifier, end-exec, random_terminal
Error at line 0, column 0 in file l1_ack.pc
PCC-F-02102, Fatal error while doing C preprocessing
make[2]: *** [pc1] Error 1
make[2]: Leaving directory `/data1/wise/wlog116/ProC/lib/l1lib'
make[1]: *** [l1_ack.o] Error 2
make[1]: Leaving directory `/data1/wise/wlog116/ProC/lib/l1lib'
make: *** [l1_ack] Error 2
----------------------------------------------------------------------------------------------------------------------
Makefile:
# This makefile builds the sample programs in $(ORACLE_HOME)/precomp/demo/proc
# and can serve as a template for linking customer applications.
#
# demo_proc64.mk is similar to demo_proc.mk, but is used to build 64-bit client
# executables.
include $(ORACLE_HOME)/precomp/lib/env_precomp.mk
# USEROBJS 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.
USEROBJS = l1_ack
# l2_ack l1_send l1_tcp_close l1_tcp_read \
# l2_scan l1_tcp_clear l1_tcp_init l1_tcp_write
# These targets build all of a class of samples in one call to make.
l1lib: $(USEROBJS)
# 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_64)
build_static: $(OBJS)
$(DEMO_PROC_BUILD_STATIC_64)
$(USEROBJS):
$(MAKE) -f $(MAKEFILE) OBJS=$@.o EXE=$@ build
# sample5.pc illustrates the precompiler part of building a precompiler-forms
# application. Building the actual executable would require the FORMS bundle.
# 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_64) 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
.SUFFIXES: .pc .c .o
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_64)
.c.o:
$(C2O_64)
.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.
# These macro definitions fill in some details or override some defaults
LIBDIR=$(LIBDIR64)
MAKEFILE=/data1/wise/wlog116/ProC/lib/l1lib/l1lib.mk
USER_INCLUDE=/data1/wise/wlog116/ProC/include
OTTFLAGS=$(PCCFLAGS)
PROCPLSFLAGS=sqlcheck=semantics userid=$(USERID) mode=oracle
PROCPPFLAGS=code=cpp $(CPLUS_SYS_INCLUDE)
USERID=wise01/wise01
PROCFLAGS=parse=full
INCLUDE=$(I_SYM). $(I_SYM)$(PRECOMPHOME)public $(I_SYM)$(RDBMSHOME)public $(I_SYM)$(RDBMSHOME)demo $(I_SYM)$(P
LSQLHOME)public $(I_SYM)$(NETWORKHOME)public $(I_SYM)$(USER_INCLUDE)
----------------------------------------------------------------------------------------------------------------------
The solution parse=none solve this problem but force us
to change all the software of hour application.
Is not dangerous work with parse=none ????
------------------------------------------------------------------------------------------------------------------