Problem with /usr/ucb/cc on Solaris

If I try to compile with /usr/ucb/cc (which I do want to use rather than gcc because of some course requirements) on Solaris 2.6 I get the error:
/usr/ucb/cc: language optional software package not installed

I recently have installed the latest Solaris 2.6 Patch cluster.

Looks like this is something I should know about anyhow.  Can anyone let me know what I need to install and/or configure here?

Who is Participating?
rickyrConnect With a Mentor Commented:
Ask him to re-post as an answer.
If its not me, just reject.
We asked the same question quite a while ago for Solaris 2.4.
We were told by an expert that we should buy Suns Implementation of cc.
It doesn't come with the standard OS release! (May have changed since)
Or use the gnu version (FREE).
good luck
bgoddenAuthor Commented:
Ouch!  I guess I'll just use gcc, probably wait to hear if someone else has figured a way around this...  If not, I'll award you the points a little later :-)
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Yeah, your screwed.  As a long time Sun user I will tell you, Sun does not have a free c compiler.  This was taken out for Solaris.  SunOS had one because you had to recompile the kernel (remember that! wasn't that fun).  Since you no longer have to recompile anything to change the Solaris OS, it was taken out and packaged as a product.
Yep, use gcc. What course requirements need you to use cc instead of gcc?
you have to check the value of env variable LANG.
try setting it to C, or just remove the LANG variable
(Don't have a sun to check the correct value)
elfie that isn't going to help - the compiler just isn't there!
bgoddenAuthor Commented:
bravehaert is right, the compiler is not working regardless of the value or existence of the $LANG variable.

I mainly wanted to go through the step of how cc does static linking, but oh well, not like I'd probably ever use it...
Both cc and gcc just use ld. What makes you think you'll never use static linking?  I would think that most developers use a mix of static and dynamic.
bgoddenAuthor Commented:
What I mean is, I can do this with gcc as well, just wanted to practcie with cc.  Actually will get a chance top do this on an OpenStep machine.  THanks for all the comments.  How do I accept an answer if this has not been proposed by the expert?
The compiler(cc, for example) for Solaris does not
come together with the operating system. It is located
in another disc called "workshop" ( I cannot remember the
exact name clearly), you may install the packages from that disc.

Good luck!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.