install Oracle 10g R2 on centos 5.5, for Pro * C development, compilation always reports an error
[handsome @ rzgh SRC] $ make-F s_secubusiflow.gcc
G ++-C-FPIC-D OS _unix s_secubusiflow.cpp-I ..
/u01/APP/Oracle/product/10.2.0/db_1/bin/proc ireclen = 132 oreclen = 132 select_error = Yes mode = ANSI userid = hs_his/handsome @ gfdb sqlcheck = syntax def_sqlcode = Yes threads = Yes code = CPP char_map = string cpp_suffix = CPP parse = partial tables = Yes maxopencursors = 60 define = use_pro_c hold_cursor = Yes prefetch = 200 include =/u01/APP/ oracle/product/10.2.0/db_1/precomp/public include =/u01/APP/Oracle/product/10.2.0/db_1/OCI/include = .. include =/usr/lib/GCC-lib/i386-redhat-linux/4.1.1/include INAME = s_secubusifunc.pc oname = s_secubusifunc.cpp
Pro * C/C ++: Release 10.2.0.1.0-production on Wed Aug 17 12:55:33 2011
Copyright (c) 1982,200 5, Oracle. All rights reserved.
System Default Option values taken from:/u01/APP/Oracle/product/10.2.0/db_1/precomp/admin/pcscfg. cfg
PCC-I-02106, userid only used when sqlcheck = full, userid ignored.
Error at line 33, column 10 in file/usr/include/string. h
# Include <stddef. h>
... 1
PCC-S-02015, unable to open include file
Error at line 34, column 11 in file/usr/include/stdio. h
# Include <stddef. h>
... 1
PCC-S-02015, unable to open include file
But it is always good on RHEL4. Check that there is a problem with the specified search path in the/u01/APP/Oracle/product/10.2.0/db_1/precomp/admin/pcscfg. cfg file,
[Oracle @ rzgh ~] $ Less/u01/APP/Oracle/product/10.2.0/db_1/precomp/admin/pcscfg. cfg
Sys_include = (/Ade/aime_rdbms_9819/Oracle/precomp/public,/usr/include,/usr/lib/GCC-lib/i486-suse-linux/2.95.3/include, /usr/lib/GCC-lib/i386-redhat-linux/3.2.3/include,/usr/lib/GCC-lib/i386-redhat-linux7/2.96/include)
Ltype = short
/U01/APP/Oracle/product/10.2.0/db_1/precomp/admin/pcscfg. cfg (end)
After centos 5.5 is upgraded, the GCC version has reached 4.1.2, and the related header file path has also changed. Therefore, the configured header file cannot be found here...
According to the above error, solve the problem one by one and add the header file:
[Handsome @ rzgh ~] $ Find/usr-name stddef. H-print
/Usr/src/kernels/2.6.18-238.19.1.el5-i686/include/Linux/stddef. h
/Usr/src/kernels/2.6.18-194. el5-i686/include/Linux/stddef. h
/Usr/include/Linux/stddef. h
/Usr/lib/syslinux/com32/include/stddef. h
/Usr/lib/syslinux/com32/include/bitsize/stddef. h
Find:/usr/lib/audit: Permission denied
/Usr/lib/GCC/i386-redhat-linux/4.1.1/include/stddef. h
/Usr/lib/GCC/i386-redhat-linux/3.4.6/include/stddef. h
/Usr/lib/BCC/include/stddef. h
SelectSelect the header file directory 4.1.1 and add itIn/u01/APP/Oracle/product/10.2.0/db_1/precomp/admin/pcscfg. cfg, recompile and no error is reported.