This procedure shows errors you might see when the required system patches or updates have not been installed.
In this example, Oracle Solaris Studio was installed from a tar file into the directory /export/home/example/solarisstudio12.4 on an Oracle Solaris 10 system. The compiler successfully compiles a simple program when no compiler options are used, but returns errors when the -O option is used.
#include <stdio.h> main() { printf("hello, world\n"); }
% 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 %
The program compiles and runs without issues.
% 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
The error occurs because the required system library /lib/libmmheap.so.1 has not been updated or installed.
Next Steps
If the program compiled with -O, there is nothing further you need to do.
If the program did not compile and produced similar errors, a system administrator must install the required updates or patches:
For Oracle Solaris 10, see Installing the Required Oracle Solaris 10 Patches.
For Oracle Solaris 11, see Updating Oracle Solaris 11 System Libraries Required by Oracle Solaris Studio 12.4.