[本人baidu博客全部搬家到csdn,baidu博客地址:http://hi.baidu.com/new/miracleconf]


在RedHat Linux 5.4 下安装了Oracle 10g进行Pro*C编译文件时,出现如下错误:

Pro*C/C++: Release 10.2.0.1.0 - Production on Wed Aug 17 12:55:33 2011

Copyright (c) 1982, 2005, 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

将源文件拿到RHEL4上同样安装ORACLE 10g进行编译,未发生错误。

考虑到RHEL4和RHEL 5的gcc版本不同并发生找不到gcc头文件的情况,那发生这个情况的原因应该是gcc的头文件目录改变了,而oracle的pcscfg.cfg文件未作相应变化。

于是在/usr下查找该文件

[oracle@test usr]$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

选择使用 4.1.1的头文件目录/usr/lib/gcc/i386-redhat-linux/4.1.1/include/,添加到 $ORACLE_HOME/precomp/admin/pcscfg.cfg 再次编译就不会出错了。


Logo

更多推荐