While compiling some code for BSD compatibility, the error occurred after invoking usr/ucb/cc. The unbundled compiler SPARCworks Professional C product was installed in /opt.
/usr/ucb/cc is a script that 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 the 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, in this case, /usr/ccs/bin/ucbcc was missing on the user's system. Evidently, somehow this link was removed.
Solve the problem by creating a new symbolic link:
# ln -s /opt/SUNWspro/bin/acc /usr/ccs/bin/ucbcc
The following commands are used to identify which packages contain the particular components involved:
craterlake% grep ucb/cc /var/sadm/install/contents /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 !$ file /usr/ucb/cc /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