1 Reply Latest reply on Oct 20, 2008 3:16 AM by prajithparan

    Pro*C Compilation Error

    665563
      Hi Friends,

      Database Oracle 9i - Pro*C/C++: Release 9.2.0.4.0
      OS - powerpc-ibm-aix5.3.0.0
      C Compiler - GNU gcc version 4.2.0

      I am using the below command to compile "daemon.pc"
      /usr/bin/make -f proc.mk build OBJS=daemon.o EXE=daemon

      The errors I am facing while compiling "daemon.pc" are --

      GGC heuristics: param ggc-min-expand=100 param ggc-min-heapsize=131072
      Compiler executable checksum: 390e64d91265cc859d3a136f414a35d0
      daemon.c:117: warning: type defaults to 'int' in declaration of 'sqlcxt'
      daemon.c:119: warning: type defaults to 'int' in declaration of 'sqlcx2t'
      daemon.c:121: warning: type defaults to 'int' in declaration of 'sqlbuft'
      daemon.c:122: warning: type defaults to 'int' in declaration of 'sqlgs2t'
      daemon.c:123: warning: type defaults to 'int' in declaration of 'sqlorat'
      daemon.c: In function 'connect_error':
      daemon.c:281: warning: implicit declaration of function 'sqlglm'
      daemon.c:285: warning: implicit declaration of function 'exit'
      daemon.c:285: warning: incompatible implicit declaration of built-in function 'exit'
      daemon.c: In function 'sql_error':
      daemon.c:300: warning: too few arguments for format
      daemon.c: At top level:
      daemon.c:305: warning: return type defaults to 'int'
      daemon.c: In function 'main':
      daemon.c:482: warning: implicit declaration of function 'system'
      daemon.c:745: warning: incompatible implicit declaration of built-in function 'exit'
      daemon.c: At top level:
      daemon.c:114: warning: 'sqlstm' defined but not used
      daemon.c:126: warning: 'IAPSUCC' defined but not used
      daemon.c:127: warning: 'IAPFAIL' defined but not used
      daemon.c:128: warning: 'IAPFTL' defined but not used
      =============================================================
      After compiling when I try to execute "daemon", the following error appears -
      Memory fault(coredump)
      =============================================================
      When I debug "daemon" with "dbx" debugger, I get the following errors -

      dbx daemon core
      Type 'help' for help.
      [using memory image in core]
      reading symbolic information ...internal error: expected char ',', found ';12,64,384;;'
      internal error: expected char ';', found ',384;;'
      internal error: index("384;;", ':') failed

      Segmentation fault in sqlglmt at 0x9000000057f795c ($t1)
      0x9000000057f795c (sqlglmt+0x94) 9c030001 stbu r0,0x1(r3)
      (dbx) where
      sqlglmt(??, ??, ??, ??) at 0x9000000057f795c
      sqlglm(??, ??, ??) at 0x9000000057f7070
      unnamed block in main(), line 281 in "daemon.c"
      unnamed block in main(), line 281 in "daemon.c"
      unnamed block in main(), line 281 in "daemon.c"
      main(), line 281 in "daemon.c"
      =============================================================
      Please help me identifying the issue. Even a small hint would help me solve the problem. Thank you very much in advance.

      Regards,
      Abhishek Jain
        • 1. Re: Pro*C Compilation Error
          prajithparan
          What are includes you have used in the .PC file ..? are you missing some standard headers ..??

          Try without using make files

          PROC file_name.pc Check any errors on this.

          Then link with -lclntsh -lexc -lmld -lrt -laio -lm -lxti -lpthread

          regards
          Prajith