Oracle® Solaris Studio 12.4:安装指南

退出打印视图

更新时间: 2014 年 12 月
 
 

如何测试系统修补程序或更新的安装

此过程将显示当必需的系统修补程序或更新未安装时可能会看到的错误。

在此示例中,Oracle Solaris Studio 从 tar 文件安装到了 Oracle Solaris 10 系统上的 /export/home/example/solarisstudio12.4 目录中。当不使用编译器选项时,编译器可以成功编译一个简单的程序,但当使用 -O 选项时却返回了错误。

  1. 创建一个简单的程序,例如下面的 hello.c 文件:
    #include <stdio.h>
    
    main()
    {
        printf("hello, world\n");
    }
  2. 仅使用 -V 编译器选项编译该程序以显示版本信息,然后运行 a.out 二进制文件:
    % cc -V hello.c
    cc: Sun C 5.13 SunOS_i386 2014/10/21
    acomp: Sun C 5.13 SunOS_i386 2014/10/21
    ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.1505
    % a.out
    hello world
    %

    该程序可以编译并运行,没有出现问题。

  3. 添加 -O 选项并再次编译:
    % cc -O -V hello.c
    cc: Sun C 5.13 SunOS_i386 2014/10/21
    acomp: Sun C 5.13 SunOS_i386 2014/10/21
    compiler(iropt) error:  iropt: dlsym() could not find function _mmheap_create
    
    /export/home/example/solarisstudio12.4/lib/compilers/iropt'quit+0x3e [0x8285dfe]
    /export/home/example/solarisstudio12.4/lib/compilers/iropt'0x24acfa [0x829acfa]
    /export/home/example/solarisstudio12.4/lib/compilers/iropt'main+0x17 [0x8341417]
    /export/home/example/solarisstudio12.4/lib/compilers/iropt'_start+0x72 [0x80947c2]
    cc: Fatal error in /export/home/example/solarisstudio12.4/lib/compilers/iropt
    cc: Status 134

    因为未更新或安装必需的系统库 /lib/libmmheap.so.1,所以发生了错误。

接下来的步骤

如果使用 -O 时可以编译程序,则无需再执行任何操作。

如果未能编译程序且生成了相似的错误,则系统管理员必须安装必需的更新或修补程序: