This discussion is archived
2 Replies Latest reply: Jun 19, 2012 7:25 PM by 758702 RSS

proc*c precompile issues

758702 Newbie
Currently Being Moderated
My apoligies in advance if I'm in the wrong forum.

I'm experiencing precompiler issues that seem related to the configuration of my pcscfg.cfg file but I may be all wet here...

I'm trying to precompile some downloaded example programs from OTN using proc from 11.2.0.1 install on x86_64 linux.

using gmake stage1

Pro*C/C++: Release 11.2.0.1.0 - Production on Sun Jun 10 11:55:05 2012

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

System default option values taken from: /opt/oracle/product/11.2.0/dbhome1/precomp/admin/pcscfg.cfg

Syntax error at line 201, column 37, file /usr/include/bits/sched.h:
Error at line 201, column 37 in file /usr/include/bits/sched.h
extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
....................................1
PCC-S-02201, Encountered the symbol "__setsize" when expecting one of the follow
ing:

, )

Syntax error at line 203, column 44, file /usr/include/bits/sched.h:
Error at line 203, column 44 in file /usr/include/bits/sched.h
extern cpu_set_t *__sched_cpualloc (size_t __count) __THROW __wur;
...........................................1
PCC-S-02201, Encountered the symbol "__count" when expecting one of the followin
g:

, )
The symbol "," was substituted for "__count" to continue.

Syntax error at line 199, column 15, file /usr/include/time.h:
Error at line 199, column 15 in file /usr/include/time.h
extern size_t strftime (char *__restrict __s, size_t __maxsize,
..............1
PCC-S-02201, Encountered the symbol "strftime" when expecting one of the followi
ng:

; , = ( [
The symbol ";" was substituted for "strftime" to continue.

Syntax error at line 199, column 47, file /usr/include/time.h:
Error at line 199, column 47 in file /usr/include/time.h
extern size_t strftime (char *__restrict __s, size_t __maxsize,
..............................................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 43, column 9, file /usr/include/xlocale.h:
Error at line 43, column 9 in file /usr/include/xlocale.h
typedef __locale_t locale_t;
........1
PCC-S-02201, Encountered the symbol "__locale_t" when expecting one of the follo
wing:

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,
The symbol "enum," was substituted for "__locale_t" to continue.

Syntax error at line 217, column 15, file /usr/include/time.h:
Error at line 217, column 15 in file /usr/include/time.h
extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
..............1
PCC-S-02201, Encountered the symbol "strftime_l" when expecting one of the follo
wing:

; , = ( [
The symbol ";" was substituted for "strftime_l" to continue.

Syntax error at line 217, column 49, file /usr/include/time.h:
Error at line 217, column 49 in file /usr/include/time.h
extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
................................................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 220, column 6, file /usr/include/time.h:
Error at line 220, column 6 in file /usr/include/time.h
__locale_t __loc) __THROW;
.....1
PCC-S-02201, Encountered the symbol "__locale_t" when expecting one of the follo
wing:

... 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 "__locale_t" to continue.

Syntax error at line 91, column 5, file /usr/include/bits/pthreadtypes.h:
Error at line 91, column 5 in file /usr/include/bits/pthreadtypes.h
__pthread_list_t __list;
....1
PCC-S-02201, Encountered the symbol "__pthread_list_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,
OCIRaw, OCIString, short, signed, sql_context, sql_cursor,
struct, union, unsigned, utext, uvarchar, varchar, void,
volatile, a typedef name,
The symbol "enum," was substituted for "__pthread_list_t" to continue.

Syntax error at line 225, column 38, file /usr/include/pthread.h:
Error at line 225, column 38 in file /usr/include/pthread.h
extern int pthread_create (pthread_t *__restrict __newthread,
.....................................1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:

, )

Syntax error at line 226, column 30, file /usr/include/pthread.h:
Error at line 226, column 30 in file /usr/include/pthread.h
__const pthread_attr_t *__restrict __attr,
.............................1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:

, ( ) [

Error at line 0, column 0 in file stage1.pc
PCC-F-02102, Fatal error while doing C preprocessing
gmake: *** [stage1.c] Error 1

pcscfg.cfg file
[oracle@oralnx6 admin]$ cat pcscfg.cfg
sys_include=(/usr/include,/usr/include/linux,/usr/lib/x86_64-redhat-linux5E/include)
ltype=short
define=__x86_64__

uname -a
Linux oralnx6.localdomain 2.6.32-300.21.1.el6uek.x86_64 #1 SMP Wed Apr 18 19:15:19 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
  • 1. Re: proc*c precompile issues
    943610 Newbie
    Currently Being Moderated
    I think it cannot find size_t . Maybe includes are messed. You should set your sys_include to the result of
    LANG=C gcc -v -E - < /dev/null 2>&1 | sed -n -e '/> search starts here/!b;:m1;n;/End of search list/b;p;b m1;'
  • 2. Re: proc*c precompile issues
    758702 Newbie
    Currently Being Moderated
    my pcscfg.cfg file is fine when I use proc directly, but make or gmake is failing me.

    proc iname=sample1

    Pro*C/C++: Release 11.2.0.1.0 - Production on Fri Jun 15 14:46:29 2012

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

    System default option values taken from: /opt/oracle/product/11.2.0/dbhome1/precomp/admin/pcscfg.cfg

    OR

    proc iname=stage1

    Pro*C/C++: Release 11.2.0.1.0 - Production on Fri Jun 15 14:48:21 2012

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

    System default option values taken from: /opt/oracle/product/11.2.0/dbhome1/precomp/admin/pcscfg.cfg

    However, the compiler can't find the header files. So that seems to be yet another issue.

    invoking the compiler directly worked fine...
    gcc -o sample2 sample2.c -m64 -I $ORACLE_HOME/precomp/public -L $ORACLE_HOME/lib -lclntsh -lsql11

    so it was a simple matter of correcting the makefile

    Edited by: OrakleDBA on Jun 19, 2012 7:23 PM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points