Error Compiling pro c program in Linux Red Hat machine. Error Code - PCC-S-02014

401 Views Asked by At

I am trying to compile proc c program in Red Hat version 8 machine. GCC version is 8.5.0 and my Oracle Client version is 19.0. When I compile the program it gives the below error. Please help. I tried to add parse and did not work.

While compiling the program, I get below error.

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

Syntax error at line 166, column 45, file /usr/include/sys/cdefs.h:
Error at line 166, column 45 in file /usr/include/sys/cdefs.h
#define __glibc_fortify(f, __l, __s, __osz, ...) \
............................................1
PCC-S-02014, Encountered the symbol "..." when expecting one of the following:

   an identifier, define, elif, else, endif, error, if, ifdef,
   ifndef, include, include_next, line, pragma, undef, exec,
   sql, begin, end, var, type, oracle,
   an immediate preprocessor command, a C token, create,
   function, package, procedure, trigger, or, replace,

Syntax error at line 168, column 9, file /usr/include/sys/cdefs.h:
Error at line 168, column 9 in file /usr/include/sys/cdefs.h
   ? __ ## f ## _alias (__VA_ARGS__)                                          \
........1

PCC-S-02201, Encountered the symbol "__uint8_t" when expecting one of the follow
ing:

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

Syntax error at line 53, column 9, file /usr/include/bits/types.h:
Error at line 53, column 9 in file /usr/include/bits/types.h
typedef __int16_t __int_least16_t;
........1

   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 0, column 0 in file /home/Functions.pc
PCC-F-02102, Fatal error while doing C preprocessing
There are compilation errors step1!!
1

There are 1 best solutions below

0
Florian Weimer On

It looks like the backports for __builtin_dynamic_object_size in glibc missed this commit:

commit 2337e04e21ba6040926ec871e403533f77043c40
Author: Siddhesh Poyarekar <[email protected]>
Date:   Thu Feb 2 07:49:02 2023 -0500

    cdefs: Limit definition of fortification macros
    
    Define the __glibc_fortify and other macros only when __FORTIFY_LEVEL >
    0.  This has the effect of not defining these macros on older C90
    compilers that do not have support for variable length argument lists.
    
    Also trim off the trailing backslashes from the definition of
    __glibc_fortify and __glibc_fortify_n macros.
    
    Signed-off-by: Siddhesh Poyarekar <[email protected]>
    Reviewed-by: Florian Weimer <[email protected]>

I reported this as:

You can report this to Red Hat Customer Support as well, especially if you need a test build with a fix.