此过程将显示当必需的系统修补程序或更新未安装时可能会看到的错误。
在此示例中,Oracle Developer Studio 从 tar 文件安装到了 Oracle Solaris 10 系统上的 /export/home/example/developerstudio12.5 目录中。当不使用编译器选项时,编译器可以成功编译一个简单的程序,但当使用 -O 选项时却返回了错误。
#include <stdio.h> main() { printf("hello, world\n"); }
% cc -V hello.c cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/17 acomp: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/17 ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.2470 % a.out hello world %
该程序可以编译并运行,没有出现问题。
% cc -O -V hello.c cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/17 acomp: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/17 compiler(iropt) error: iropt: dlsym() could not find function _mmheap_createc /export/home/example/developerstudio12.5/lib/compilers/iropt'quit+0x3e [0x8285dfe] /export/home/example/developerstudio12.5/lib/compilers/iropt'0x24acfa [0x829acfa] /export/home/example/developerstudio12.5/lib/compilers/iropt'main+0x17 [0x8341417] /export/home/example/developerstudio12.5/lib/compilers/iropt'_start+0x72 [0x80947c2] cc: Fatal error in /export/home/example/developerstudio12.5/lib/compilers/iropt cc: Status 134
因为未更新或安装必需的系统库 /lib/libmmheap.so.1,所以发生了错误。
接下来的步骤
如果使用 -O 时可以编译程序,则无需再执行任何操作。
如果未能编译程序且生成了相似的错误,则系统管理员必须安装必需的更新或修补程序:
对于 Oracle Solaris 10,请参见安装必需的 Oracle Solaris 10 修补程序。
对于 Oracle Solaris 11,请参见更新 Oracle Developer Studio 12.5 必需的 Oracle Solaris 11 系统库。