ORACLE 10.2 Pro * C precompiler does not read header file

I precompile a C program containing Pro * C code with Oracle 10.2 and AIX 5.2

The Oracle precompiler reads $ORACLE_HOME/precomp/admin/pcscfg.cfg filewhich contains the definition of the sys_include variable (set to /usr/include).

The Pro * C compiler complains that it does not know what type is size_t, and Oracle header files using the type size_treport errors.

Here is an example of a file error sqlcpr.h:

extern void sqlglm( char*, size_t*, size_t* );
...........................1
PCC-S-02201, Encountered the symbol "size_t" when expecting one of the following

size_tdefined in the header file stdio.hin the directory /usr/include. I include the header stdio.hin my file example.pcbefore including the header sqlcpr.h.

I issue the proc command as follows:

proc iname=example parse=full

Any ideas what I'm doing wrong?

+7
8

Metalink

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 *);

'sys_include' 'include' . 'sys_include' 'include' precompiler. pcscfg.cfg, $ORACLE_HOME/precomp/admin 'proc'.

, :

, :

gcc -v

/usr/lib/gcc -lib/i386-redhat-linux7/2.96/specs gcc 2.96 20000731 (Red Hat Linux 7.3 2.96-128)

, ( include)

sys_include=($ORACLE_HOME/precomp/public,
             /usr/lib/gcc-lib/i386-redhat-linux7/2.96/include, 
             /usr/include)

include=(/u02/app/oracle/product/8.1.5/precomp/public)
include=(/u02/app/oracle/product/8.1.5/rdbms/demo)
include=(/u02/app/oracle/product/8.1.5/network/public)
include=(/u02/app/oracle/product/8.1.5/plsql/public)

, sysinclude, include .

+8

, include , Pro * C.

, CentOS 6.5 ( pcscfg.cf):

sys_include=$ORACLE_HOME/sdk/include
sys_include=/usr/include
sys_include=/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include
sys_include=/usr/include/linux
ltype=short
define=__x86_64__

proc $ORACLE_HOME/precomp/admin/pcscfg.cfg.

-, , Oracle, , , , GCC / .

size_t ( 4 (1,2,4,3)).

4 (1,3,2,4) <limits.h>, proc , , OOM.

sys_include proc, :

lines=yes \
code=ANSI_C \
sqlcheck=full \
parse=full \
sys_include=$(ORACLE_HOME)/precomp/public \
sys_include=/usr/include \
sys_include=/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include \
sys_include=/usr/include/linux
+4

, , pcscfg.cfg.

1 , "", , , "" . : SYS_INCLUDE=D:\Progra~1\Micros~1.0\VC\include dir/x ,

2 , , , INCLUDE . ..

define=(WIN32_LEAN_AND_MEAN)
parse=full
SYS_INCLUDE=D:\Progra~1\Micros~1.0\VC\include

,

define=(WIN32_LEAN_AND_MEAN)
SYS_INCLUDE=D:\Progra~1\Micros~1.0\VC\include
parse=full

.

+1

( "PCC-S-02201, Encounted the symbol..." ). .

  • sys_include , , . , Pro * C, . Hello World gcc -v -c <prog.c> COMPILER_PATH
  • sys_include ( , , .)

PCC-S-02201 .

0

/usr/include/linux . stddef.h , size_t. /usr/include, .

pcscfg.cfg:

sys_include = (/USR//Linux, $ORACLE_HOME//,/USR//USR/Library/GCC/i386-RedHat-/4.1.1/,/USR/Library/GCC/i386-RedHat-Linux/3.4.5/,/USR/Library/GCC /i386-RedHat-Linux/3.2.3/,/USR/Library/GCC/i586- SUSE-Linux/4.1.2/,/USR/Library/GCC/i586-SUSE-Linux/4.3/) LTYPE =

(CentOS 6.3, oracle 11g)

0

sys_include , Visual Studio. - , "include", "sys_include"

Visual Studio 2013, .pc .

0

Add one line of the compilation flag in pcscfg.cfgto make the Oracle precompiler without syntax errors in the file header:

define=_POSIX_C_SOURCE

What is it. Now it should precompile without errors.

0
source

I had the same problem:

[me@somesys:~/proC]$ proc sys_include='(/usr/include,/usr/include/linux,/usr/include/c++/4.8.2/x86_64-redhat-linux,/usr/include/c++/4.8.2/tr1,/usr/include/c++/4.8.2)' copy.pc

Pro*C/C++: Release 12.1.0.2.0 - Production on Thu Jun 6 17:47:11 2019

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

System default option values taken from: /oracle/app/oracle/product/12.1.0.2/precomp/admin/pcscfg.cfg

Syntax error at line 307, column 3, file /usr/include/libio.h:
Error at line 307, column 3 in file /usr/include/libio.h
  size_t __pad5;
..1
PCC-S-02201, Encountered the symbol "size_t" when expecting one of the following
:

   } char, const, double, enum, float, int, long, ulong_varchar,
   OCIBFileLocator OCIBlobLocator, OCIClobLocator, OCIDateTime,
   OCIExtProcContext, OCIInterval, OCIRowid, OCIDate, OCINumber,
...

And I did as the yogmk suggested:

[me@somesys:~/proC]$ gcc -v -c borrame.c
Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)
COLLECT_GCC_OPTIONS='-v' '-c' '-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-redhat-linux/4.8.5/cc1 -quiet -v borrame.c -quiet -dumpbase borrame.c -mtune=generic -march=x86-64 -auxbase borrame -version -o /tmp/cc2WTuu6.s
GNU C (GCC) version 4.8.5 20150623 (Red Hat 4.8.5-36) (x86_64-redhat-linux)
        compiled by GNU C version 4.8.5 20150623 (Red Hat 4.8.5-36), GMP version 6.0.0, MPFR version 3.1.1, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include-fixed"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../x86_64-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include
 /usr/local/include
 /usr/include
End of search list.
GNU C (GCC) version 4.8.5 20150623 (Red Hat 4.8.5-36) (x86_64-redhat-linux)
...

But instead, COMPILER_PATHI copied in order non-empty directories after #include <...> search starts here:it worked!

[me@somesys:~/proC]$ proc sys_include='(/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include,/usr/include)' copy.pc

Pro*C/C++: Release 12.1.0.2.0 - Production on Thu Jun 6 17:54:50 2019

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

System default option values taken from: /oracle/app/oracle/product/12.1.0.2/precomp/admin/pcscfg.cfg

[me@somesys:~/proC]$

Hope this helps someone.

0
source

All Articles