您的位置:首页 > 数据库 > Oracle

ubuntu上安装oracle出错,修改mk文件方法

2015-02-11 10:35 627 查看
参考 http://www.th7.cn/db/Oracle/201501/87086.shtml

仅仅执行sed方法,仍然有部分mk文件编译不过,报告“undefined reference to `xxxxx' ”,这种情况下 需要手动修改mk文件。

首先根据错误日志的INFO:gcc -o 找到正在编译的目标,根据这个目标名称去mk文件里查找对应的LINKELINE,在对应的LINKLINE上添加 -Wl,--no-as-needed

INFO: ellScanInit':kfkl.c:(text.unlikely+0x3081): undefined reference to `oss_initialize'kfkl.c:(text.unlikely+0x30e9): undefined reference to `oss_cell_discovery_open'kfkl.cINFO: :(text.unlikely+0x3172): undefined reference to `oss_cell_discovery_fetch'/oracle/base/dbhome_1/lib//libasmclnt12.a(kfkl.o): In function `kfklCellScanNext':kfkl.c:(text.unlikely+0x3231): undefined reference to `oss_cell_discovery_fetch'/oracle/base/dbhome_1/lib//libasmclnt12.a(kfkl.o): In function `kfklCellScanTerm':kfkl.c:(text.unlikely+0x3296): undefined reference to `oss_cell_discovery_close'collect2: ld returned 1 exit statusINFO: make: *** [/oracle/base/dbhome_1/rdbms/lib/amdu] Error 1INFO: End output from spawned process.INFO: ----------------------------------INFO: Exception thrown from action: makeException Name: MakefileExceptionException String: Error in invoking target 'all_no_orcl' of makefile '/oracle/base/dbhome_1/rdbms/lib/ins_rdbms.mk'. See '/oracle/oraInventory/logs/installActions2013-09-19_08-51-51AM.log' for details.Exception Severity: 1


Ah, the AMDU is the issue..again: we adjust the gcc parameter..
oracle$ vi /oracle/base/dbhome_1/rdbms/lib/env_rdbms.mk


Search for the lines:
AMDU_LINKLINE=$(LINK) $(S0MAIN) -Wl,--no-as-needed $(SSKFMUED) $(SKFMUPT) /$(LLIBDBTOOLS) $(LLIBCORE) $(LLIBGENERIC) $(LLIBUNLSRTL) /$(LLIBNLSRTL) $(LLIBCORE) $(LLIBSAGE) $(LLIBSKGXP) /$(LLIBNLSRTL) $(CSSCLNTLIBS_SERVER) $(LLIBASMCLNT) $(LINKTTLIBS)


Change these to:
AMDU_LINKLINE=$(LINK) $(S0MAIN) -Wl,--no-as-needed $(SSKFMUED) $(SKFMUPT) /$(LLIBDBTOOLS) $(LLIBCORE) $(LLIBGENERIC) $(LLIBUNLSRTL) /$(LLIBNLSRTL) $(LLIBCORE) $(LLIBSAGE) $(LLIBSKGXP) /$(LLIBNLSRTL) $(CSSCLNTLIBS_SERVER) $(LLIBASMCLNT) $(LINKTTLIBS)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: