There is no C compiler included in Solaris 2.x. The /usr/ucb/cc script you are executing is a wrapper for the SunSoft C compiler which calls the native C compiler with the /usr/ucb includes and libraries. You need to get yourself a C compiler. Alternatively, you may have forgotten to put the proper link from /usr/ccs/bin/ucbcc to /opt/SUNWspro/SCxxxx/cc in place.
Verify the following
packages are installed with pkginfo:
SPROcc (unbundled SPARCworks Professional C compiler)
The SPROcc package is likely not installed, and is not delivered with the operating system.
When compiling some code for BSD compatibility the error happened after invoking usr/ucb/cc. The unbundled compiler (SPARCworks Professional C product) was installed in /opt.
/usr/ucb/cc is a script which checks for the file /usr/ccs/bin/ucbcc and, if found, invokes it with appropriate library flags for BSD-compatibility compilation.
/usr/ucb/cc is part of the package SUNWscpu. /usr/ccs/bin/ucbcc is supposed to be a symbolic link to /opt/SUNWspro/bin/acc, which is created during installation of the unbundled C compiler, SPROcc.
Verify that you have the essential OS-bundled Developer packages, SUNWscpu, SUNWbtool, and the unbundled C compiler:- SPROcc. However, /usr/ccs/bin/ucbcc was missing on customer's system. Evidently somewhere along the line this link was removed.
Solve the problem
by creating a new symbolic link:
# ln -s /opt/SUNWspro/bin/acc /usr/ccs/bin/ucbcc
Invoke usr/ucb/cc to verify this worked.
Commands used to identify which packages contain particular components involved:
/usr/ucb/cc f none 0555 bin bin 3084 50323 814621113 *SUNWscpu
craterlake% ls -l /usr/ucb/cc
-r-xr-xr-x 1 bin bin 3084 Oct 25 1995 /usr/ucb/cc
craterlake% file !$
/usr/ucb/cc: executable /usr/bin/sh script
craterlake% grep ucbcc /var/sadm/install/contents
/usr/ccs/bin/ucbcc=/opt1/40/SUNWspro/SC4.0/bin/acc s none SPROcc SPROcc.2 SPROcc.5
craterlake% file /usr/ccs/bin/ucbcc
/usr/ccs/bin/ucbcc: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, stripped
craterlake% ls -l /usr/ccs/bin/ucbcc
lrwxrwxrwx 1 root other 31 Aug 23 1996 /usr/ccs/bin/ucbcc -> /opt1/40/SUNWspro/SC4.0/bin/acc
Back to brandonhutchinson.com.Last modified: 04/18/2002