I have to be honest - I was just about to give up on OpenIndiana Hipster yesterday due to what seemed like a wild goose chase when it comes to getting a working compiler installed on that system. Throughout all of my previous OI installations (151a8 or Hipster), I had never (not once!) been able to get GCC or even Sun Studio up and running. It would often appear to be installed, but then nothing would happen when I'd try to use it.
Over time, I had come to assume that working GCC on OI was but a grand joke played on unwitting newbies who thought they'd like a SunOS 5.11 platform on which to learn C programming. The gullible naifs! Ha! Ha!
This was further exacerbated by the muddle of information online, none of which seems definitive. And then, while doing a search for GCC at the sfe.opencsw.org package repo, I saw a package for GCC 4.8, at which point I opened a terminal window, became root, and took a shot in the dark:
# pkg install gcc-48
At this point the system asked me to choose gcc-48 from either sfe.opencsw.org or the main OpenIndiana Hipster repo, and so I decided to stay close to home:
# pkg install pkg://openindiana.org/developer/gcc-48
And so it is with a deep and abiding sense of closure that I can proceed with learning C via Teach Yourself C in 21 Days. This will turn up the heat in a different way, as I'll only have my sense of procrastination to blame for further delays on that front. (I bought that book in the mid-1990s, prior to my UNIX enlightenment, whereupon I spent the rest of that decade locked in a cage match with the Borland C compiler installation CD that came with the book, as it didn't seem to work on any Windows machine. Then again, as I vaguely remember hearing Eric S. Raymond put it in a speech I saw online a few years ago, learning to program in Windows is like learning to dance while wearing a full body cast: it can be done, but it's not nearly as much fun.)
You can breathe now.