DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: pro*c problem

  1. #1
    Join Date
    Jun 2009
    Posts
    3

    pro*c problem

    hi everyone!!i'm very happy to be one of the most great linux forums in the world and thanks for all great work that u do here!!

    i'm new to linux i have some basic but still newer!!i have a project that i work on!!it's a product that has been installed and compiled in AIX system with xlc compiler!!my job here is to migrate this one to red hat linux entreprise 5 and compile all the makefile with GCC
    also i have some .pc files that i'm trying to compile with pro*c !!and now i'm stuck with those errors :


    $ make all
    /usr/local/oracle/9.2.0/bin/proc sqlcheck=full userid=PSMS_USER/PSMS_USER dbms=v7 LINES=YES include=/home/oracle/Open2/COMMON/inc include=/home/oracle/Open2/ps/BOF/inc include=/home/oracle/Open2/ps/inc include=/home/oracle/Open2/ps/inc include=/home/oracle/Open2/syu/inc include=/home/oracle/Open2/lng/inc include=/home/oracle/Open2/lng/inc include=/home/oracle/Open2/com/inc iname=/home/oracle/Open2/ps/BOF/src_EDS/ps_bof_eds_lrmdb.pc

    Pro*C/C++: Release 9.2.0.4.0 - Production on Wed Jul 29 13:12:44 2009

    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

    System default option values taken from: /usr/local/oracle/9.2.0/precomp/admin/pcscfg.cfg

    Syntax error at line 365, column 6, file /home/oracle/Open2/ps/inc/ps_parslib_parsers.h:
    Error at line 365, column 6 in file /home/oracle/Open2/ps/inc/ps_parslib_parsers
    .h
    bool CheckAndAssign_String(unsigned char dst_string[],
    .....1
    PCC-S-02201, Encountered the symbol "CheckAndAssign_String" when expecting one o
    f the following:

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

    Syntax error at line 376, column 6, file /home/oracle/Open2/ps/inc/ps_parslib_parsers.h:
    Error at line 376, column 6 in file /home/oracle/Open2/ps/inc/ps_parslib_parsers
    .h
    bool get_send_log_flag(void);
    .....1
    PCC-S-02201, Encountered the symbol "get_send_log_flag" when expecting one of th
    e following:

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

    Syntax error at line 139, column 4, file /home/oracle/Open2/ps/BOF/inc/ps_bof_comlib_envdata.h:
    Error at line 139, column 4 in file /home/oracle/Open2/ps/BOF/inc/ps_bof_comlib_
    envdata.h
    Input_Queue_Data BOF_iq;
    ...1
    PCC-S-02201, Encountered the symbol "Input_Queue_Data" 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,

    Syntax error at line 0, column 0, file /home/oracle/Open2/ps/BOF/src_EDS/ps_bof_eds_lrmdb.pc:
    Error at line 0, column 0 in file /home/oracle/Open2/ps/BOF/src_EDS/ps_bof_eds_l
    rmdb.pc
    PCC-S-02201, Encountered the symbol "" when expecting one of the following:

    ; : an identifier, end-exec, random_terminal

    Error at line 0, column 0 in file /home/oracle/Open2/ps/BOF/src_EDS/ps_bof_eds_l
    rmdb.pc
    PCC-F-02102, Fatal error while doing C preprocessing
    make: *** [/home/oracle/Open2/ps/BOF/src_EDS/ps_bof_eds_lrmdb.c] Erreur 1

    this is my sys_include file:

    sys_include=(/usr/include,/usr/lib/gcc/i386-redhat-linux/4.1.1/include,/usr/local/oracle/9.2.0/precomp/public)

    include=(/usr/local/oracle/9.2.0/precomp/public)

    include=(/usr/local/oracle/9.2.0/rdbms/demo)

    include=/usr/local/oracle/9.2.0/network)

    include=(/usr/local/oracle/9.2.0/plsql/public)

    ltype=short

    also i post some of the code that contain those errors :

    in the file ps_parslib_parsers.c

    ...
    bool CheckAndAssign_String(unsigned char dst_string[],
    unsigned char *src_string,
    int max_len);



    void get_error_prod_mng(int *);
    void set_error_prod_mng(int );
    void reset_error_prod_mng(void);
    void set_send_log_flag(void);
    void reset_send_log_flag(void);
    bool get_send_log_flag(void);
    ...

    i saerched for the definition of the checkandassign_string function and i found it in another directory in the ps_parslib_parsers.c :

    ...
    /*-----------------------------------------------------------------------------
    FUNCTION CheckAndAssign_String
    -----------------------------------------------------------------------------
    The function executes a copy between strings and then frees the source
    string; the length of the source string is checked before assigning it
    to the destination string.
    The function must be used only with str_val as the source string (it is
    the value returned by the parser).
    ---------------------------------------------------------------------------*/

    bool CheckAndAssign_String(unsigned char dst_string[],
    unsigned char *src_string,
    int max_len)
    {
    if (strlen((char *)src_string) <= max_len)
    {
    strcpy((char *)dst_string, (char *)src_string);
    /*if (strlen((char *)src_string) != 0)
    {
    */
    free(src_string);
    /*} */
    return TRUE;
    }
    else
    {
    /*if (strlen((char *)src_string) != 0)
    {
    */
    free(src_string);
    /*} */
    return FALSE;
    }
    }
    ...

    also the input_Queue_Data that figures in the errors i found it in one .h lib like this :


    /*=============================================================================
    INPUT QUEUE DATA
    ===========================================================================*/


    /*-----------------------------------------------------------------------------
    MACROS
    ---------------------------------------------------------------------------*/

    #define IQ_NAME_LEN 48 /* CLSQD.QName's length */


    /*-----------------------------------------------------------------------------
    TYPES AND STRUCTURES
    ---------------------------------------------------------------------------*/

    typedef struct
    {
    /* name of the alias queue */
    unsigned char name[IQ_NAME_LEN+1];

    /* handle of the alias queue */
    CLHOBJ handle;

    } Input_Queue_Data;



    /*=============================================================================
    QUEUE MANAGER DATA
    ===========================================================================*/


    /*-----------------------------------------------------------------------------
    TYPES AND STRUCTURES
    ---------------------------------------------------------------------------*/

    typedef struct
    {
    /* time of the wait reading operation on the BOF input queue */
    unsigned long wait_time;

    /* id of the connection to the queue manager */
    CLHCONN connection_id;

    /* input queue of BOF process */
    Input_Queue_Data BOF_iq;

    /* input queue of PSM Scheduler process */
    Input_Queue_Data PSM_sched_iq;

    } Queue_Manager_Data;

    i will be grateful if u help me figure this out!!!if u need any explanation i'm here and thanks again!!

  2. #2
    Join Date
    Jun 2009
    Posts
    3
    72 views and no one for anwsering

  3. #3
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492

    Talking Pro*C?

    Is Google broken for you? This is what I found:

    It appears the default defines set by the C compiler need to be passed on to the precompiler. The solution is to set DEFINE=__64BIT__ or DEFINE=_LONG_LONG in the precompilation options.

    In order to pass the default defines to the Pro*C precompiler when using IBM AIX header files, you can:

    1> proc xxx DEFINE=xxxx
    2> Add it to pcscfg.cfg
    3> Add it to the make file "PROCFLAGS" ...
    4> You can even pass it to the make utility in the commandline itself
    make -f demo_proc.mk build EXE=mysample1 OBJS=mysample1.o PROCFLAGS="DEFINE=__64BIT__"
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    you put at the top f your post, great linux forum - this is an oracle forum

    then you dont look up the error yourself and have the gall to have a go for noone replying

    appalling

  5. #5
    Join Date
    Jun 2009
    Posts
    3
    sorry for the mistaake that i put greatest linux forum i'm just confused with those problem and i apologise for all the members here!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width