Reputation: 105
I have a pro*C file in a C project, which I am trying to compile but I don't get the C code after compile.
Here are the environment variables:
ORACLE_HOME = /opt/vgi/oracle/12.1.0.2/client
procTest.pc file:
#include <stdio.h>
#include <string.h>
#include <sqlda.h>
#include <sqlcpr.h>
EXEC SQL BEGIN DECLARE SECTION;
VARCHAR uid[30];
VARCHAR pwd[30];
EXEC SQL END DECLARE SECTION;
EXEC SQL INCLUDE SQLCA.H;
void main()
{
strcpy(uid.arr,"SCOTT");
uid.len =strlen(uid.arr);
strcpy(pwd.arr,"TIGER");
pwd.len = strlen(pwd.arr);
EXEC SQL WHENEVER SQLERROR GOTO errexit;
EXEC SQL CONNECT :uid IDENTIFIED BY :pwd;
printf("Connected to Oracle8i using Scott/Tiger\n");
EXEC SQL COMMIT WORK RELEASE;
return;
errexit:
printf("Connection failed");
return;
}
/* end of main */
The output I get while compiling:
bash-4.1$ proc procTest.pc
Pro*C/C++: Release 12.1.0.2.0 - Production on Tue Mar 27 13:22:43 2018
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
System default option values taken from: /opt/vgi/oracle/12.1.0.2/client/precomp/admin/pcscfg.cfg
dbgc_init_all failed with ORA-48141
ORA-00600: internal error code, arguments: [17998], [2], [], [], [], [], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [17998], [2], [], [], [], [], [], [], [], [], [], []
----- Call Stack Trace -----
calling call entry argument values in hex
location type point (? means dubious value)
-------------------- -------- -------------------- ----------------------------
skgudmp()+188 call kgdsdst() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
kgeriv_int()+191 call skgudmp() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
kgeriv()+19 call kgeriv_int() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
kgeasi()+237 call kgeriv() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
pcgini()+1438 call kgeasi() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
pc2main()+1207 call pcgini() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
pcmain()+35 call pc2main() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
lpmcall()+680 call pcmain() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
lpmpmai()+420 call lpmcall() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
main()+458 call lpmpmai() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
__libc_start_main() call main() 000000000 ? 000000000 ?
+253 000000000 ? 000000000 ?
000000000 ? 000000000 ?
Call stack signature: 0x4f7f9afc37164890
call stack performance statistics:
total : 0.000000 sec
setup : 0.000000 sec
stack unwind : 0.000000 sec
symbol translation : 0.000000 sec
printing the call stack: 0.000000 sec
printing frame data : 0.000000 sec
printing argument data : 0.000000 sec
----- End of Call Stack Trace -----
kgepop: no error frame to pop to for error 600
ORA-00600: internal error code, arguments: [kgepop: no error frame to pop to], [], [], [], [], [], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [17998], [2], [], [], [], [], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [kgepop: no error frame to pop to], [], [], [], [], [], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [17998], [2], [], [], [], [], [], [], [], [], [], []
----- Call Stack Trace -----
calling call entry argument values in hex
location type point (? means dubious value)
-------------------- -------- -------------------- ----------------------------
skgudmp()+188 call kgdsdst() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
kgerinv_internal()+ call skgudmp() 000000000 ? 000000000 ?
111 000000000 ? 000000000 ?
000000000 ? 000000000 ?
kgerinv()+40 call kgerinv_internal() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
kgerin()+130 call kgerinv() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
kgepop()+633 call kgerin() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
kgeasi()+382 call kgepop() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
pcgini()+1438 call kgeasi() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
pc2main()+1207 call pcgini() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
pcmain()+35 call pc2main() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
lpmcall()+680 call pcmain() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
lpmpmai()+420 call lpmcall() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
main()+458 call lpmpmai() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
__libc_start_main() call main() 000000000 ? 000000000 ?
+253 000000000 ? 000000000 ?
000000000 ? 000000000 ?
Call stack signature: 0x6c275a0c4ae84a31
call stack performance statistics:
total : 0.000000 sec
setup : 0.000000 sec
stack unwind : 0.000000 sec
symbol translation : 0.000000 sec
printing the call stack: 0.000000 sec
printing frame data : 0.000000 sec
printing argument data : 0.000000 sec
----- End of Call Stack Trace -----
ORA-00600: internal error code, arguments: [kgepop: no error frame to pop to], [], [], [], [], [], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [17998], [2], [], [], [], [], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [kgepop: no error frame to pop to], [], [], [], [], [], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [17998], [2], [], [], [], [], [], [], [], [], [], []
----- Call Stack Trace -----
calling call entry argument values in hex
location type point (? means dubious value)
-------------------- -------- -------------------- ----------------------------
skgudmp()+188 call kgdsdst() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
kgepop()+711 call skgudmp() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
kgeasi()+382 call kgepop() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
pcgini()+1438 call kgeasi() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
pc2main()+1207 call pcgini() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
pcmain()+35 call pc2main() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
lpmcall()+680 call pcmain() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
lpmpmai()+420 call lpmcall() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
main()+458 call lpmpmai() 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
__libc_start_main() call main() 000000000 ? 000000000 ?
+253 000000000 ? 000000000 ?
000000000 ? 000000000 ?
Call stack signature: 0xa8f3ded765e05f1e
call stack performance statistics:
total : 0.010000 sec
setup : 0.000000 sec
stack unwind : 0.000000 sec
symbol translation : 0.010000 sec
printing the call stack: 0.000000 sec
printing frame data : 0.000000 sec
printing argument data : 0.000000 sec
----- End of Call Stack Trace -----
I'm trying pro*C for the first time and I have no clue what is wrong here.
Upvotes: 2
Views: 7032
Reputation: 790
kfinity answer worked with small differences: chmod 777 to the diag folder, and after the first compile run it's necessary to reset it to chmod 775. Source
Upvotes: 1
Reputation: 9091
This sounds an awful lot like Bug 20406840 : PROC 12.1.0.2 THROWS ORA-600 [17998] WHEN PRECOMPILING BY 'OTHER' USER
PROBLEM: After upgrading from 12.1.0.1 to 12.1.0.2, Pro*C throws ORA-600 [17998] when precompiling by 'Other' user, not install user of Oracle.
WORKAROUND: 'chmod 777 $ADR_BASE/diag/plsql' by installed user of Oralce. Once directory $ADR_BASE/diag/plsql/user_ is created, Pro*C works fine even if permission of $ADR_BASE/diag/plsql reset 775.
Basically, due to a bug in 12.1.0.2, unless you're running as the user who installed Oracle, you don't have permission to create a directory and it crashes. There's a patch and a workaround.
Upvotes: 7