Languages and Scripting

Problems compiling C process on Oracle 10g(HP_UX)

 
Shayla Waters
New Member

Problems compiling C process on Oracle 10g(HP_UX)

Trying to upgrade to oracle 10g from 9i and get the following errors. Could some one point me in the right direction?

proc iname=zhrtrtc.pc ireclen=132 oreclen=132 lines=y select_error=no hold_cursor=no release_cursor=no maxopencursors=255 maxliteral=160 ltype=none unsafe_null=yes char_map=string include=/u01/app/sct/D10711/general/c/ include=/u01/app/sct/D10711/general/c/ dbms=v8 sqlcheck=FULL userid=saturn/u_pick_it

Pro*C/C++: Release 10.2.0.3.0 - Production on Thu Mar 6 09:22:43 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.

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

Syntax error at line 569, column 39, file /usr/include/stdio.h:
Error at line 569, column 39 in file /usr/include/stdio.h
extern int vprintf(const char *, va_list);
......................................1
PCC-S-02201, Encountered the symbol "__va_list__" when expecting one of the foll
owing:

... 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 "auto," was substituted for "__va_list__" to continue.

Syntax error at line 570, column 48, file /usr/include/stdio.h:
Error at line 570, column 48 in file /usr/include/stdio.h
extern int vfprintf(FILE *, const char *, va_list);
...............................................1
PCC-S-02201, Encountered the symbol "__va_list__" when expecting one of the foll
owing:

... 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 "auto," was substituted for "__va_list__" to continue.

Syntax error at line 571, column 48, file /usr/include/stdio.h:
Error at line 571, column 48 in file /usr/include/stdio.h
extern int vsprintf(char *, const char *, va_list);
...............................................1
PCC-S-02201, Encountered the symbol "__va_list__" when expecting one of the foll
owing:

... 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 "auto," was substituted for "__va_list__" to continue.

Syntax error at line 594, column 59, file /usr/include/stdio.h:
Error at line 594, column 59 in file /usr/include/stdio.h
extern int vsnprintf(char *, __size_t, const char *, __va__list);
..........................................................1
PCC-S-02201, Encountered the symbol "__va_list__" when expecting one of the foll
owing:

... 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 "auto," was substituted for "__va_list__" to continue.

Syntax error at line 429, column 24, file /u01/app/sct/D10711/general/c/guastdf.h:
Error at line 429, column 24 in file /u01/app/sct/D10711/general/c/guastdf.h
void regexit(regexit_t fcn);
.......................1
PCC-S-02201, Encountered the symbol "fcn" when expecting one of the following:

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

Syntax error at line 488, column 21, file /u01/app/sct/D10711/general/c/guastdf.h:
Error at line 488, column 21 in file /u01/app/sct/D10711/general/c/guastdf.h
void parsfn(FNSTRUC *f);
....................1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:

, )

Syntax error at line 489, column 21, file /u01/app/sct/D10711/general/c/guastdf.h:
Error at line 489, column 21 in file /u01/app/sct/D10711/general/c/guastdf.h
void makefn(FNSTRUC *f);
....................1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:

, )

Syntax error at line 490, column 21, file /u01/app/sct/D10711/general/c/guastdf.h:
Error at line 490, column 21 in file /u01/app/sct/D10711/general/c/guastdf.h
void initfn(FNSTRUC *f);
....................1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:

, )

Syntax error at line 500, column 9, file /u01/app/sct/D10711/general/c/guastdf.h:
Error at line 500, column 9 in file /u01/app/sct/D10711/general/c/guastdf.h
FNSTRUC exefile;
........1
PCC-S-02201, Encountered the symbol "exefile" when expecting one of the followin
g:

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

Syntax error at line 122, column 21, file /u01/app/sct/D10711/general/c/guarpfe.h:
Error at line 122, column 21 in file /u01/app/sct/D10711/general/c/guarpfe.h
int report(selfcn_t selfcn,voidfcn_t body,voidfcn_t head,voidfcn_t foot);
....................1
PCC-S-02201, Encountered the symbol "selfcn" when expecting one of the following
:

, )

Error at line 0, column 0 in file zhrtrtc.pc
PCC-F-02102, Fatal error while doing C preprocessing
*** Error exit code 1

15 REPLIES 15
Dennis Handly
Acclaimed Contributor

Re: Problems compiling ProC on Oracle 10g (HP-UX)

>Could some one point me in the right direction?

The right direction would be to talk to Oracle about their broken preprocessor.
__va_list__ is a new builtin type for IPF and this needs to be added to Oracle's reserved list of types. I've seen this before so Oracle should have a solution by now?
Possibly a config file change?

TwoProc
Honored Contributor

Re: Problems compiling C process on Oracle 10g(HP_UX)

First look in all directories - searching for the va_list string, especially in the .h files. If you find it, and it's the definition that you need, just add it to the include list at the top of .c you're compiling. Remember that .h file could be in a vast array of places in the Oracle_HOME.

Also, your distribution might have the "symfind" oracle tool that will look around in the Oracle_HOME assets and identify all files that have that symbol defined, both .o files and .a files. You may have to add them to the link list if you've been lucky enough to find the .h file for the first part.
We are the people our parents warned us about --Jimmy Buffett
Dennis Handly
Acclaimed Contributor

Re: Problems compiling ProC on Oracle 10g (HP-UX)

>TwoProc: First look in all directories - searching for the va_list string,

I'm not sure if you saw my answer first but you can't find something that's built into the compiler. Oracle's preprocessor must be fixed or a configuration file must be edited.

Shayla Waters
New Member

Re: Problems compiling C process on Oracle 10g(HP_UX)

Hi Dennis,
Thanks for your reply! I have a follow up question though, what exactly do i need to add to my config file?
Dennis Handly
Acclaimed Contributor

Re: Problems compiling C process on Oracle 10g(HP_UX)

>what exactly do i need to add to my config file?

Sorry I have no clue. You need to talk to Oracle because there must be some solution that allows this to work on Integrity.
Shayla Waters
New Member

Re: Problems compiling C process on Oracle 10g(HP_UX)

Found the following on metalink
There has been minor changes to stdio.h on HP-UX 11i, causing ProC to not
find the necessary typedef for va_list. This results in an error message and
Pro*C complains that va_list is not a a known type.
I had to edit the pcscfg.cfg i added the following line:
define=_PA_RISC2_0
and after recompiling the files under the general folder I was able to get the file to compile with no errors

Thanks for all your replys
Dennis Handly
Acclaimed Contributor

Re: Problems compiling ProC on Oracle 10g (HP-UX)

>I had to edit the pcscfg.cfg I added the following line: define=_PA_RISC2_0

This isn't going to make the code work if you actually use va_list.

Shayla Waters
New Member

Re: Problems compiling C process on Oracle 10g(HP_UX)

Will also adding this line fix the problem
define=__STDC__
Dennis Handly
Acclaimed Contributor

Re: Problems compiling ProC on Oracle 10g (HP-UX)

>Will also adding this line fix the problem?
define=__STDC__

I don't see how. That won't change the __va_list__ types.