Stephen and OpenSolaris' Awesome Compiler Adventure
Well, once again it's come time for me to write another blog. I recently got a new desktop computer and decided to use OpenSolaris 2008.05 as my base OS. It was going fine, I had StarOffice installed, I got my hands on a JDK and probably most importantly, I had MP3 support set up. But then I needed a C compiler for some reason (I can't remember why now :/), at which point I realised: there was no C compiler installed by default (it's UNIX, is it too much to expect one to be included?). So, I pulled out a Solaris Express developer DVD (as I don't have access to a great deal of bandwidth at home). From here, I was able to track down the packages from the install, so I navigated to the directory
Leviathan%cd /media/SOL_11x86/whatever
Leviathan%pfexec pkgadd -d .
---List of a thousand freaking software packages---
Installing SUNWgcc
Installing SUNWmake
---Whatever else, I think I tried to install Firefox 3, but now it segfaults, so I'm assuming I missed a dependency or something---
Leviathan%
Ok, I tried to run 'gcc -o hello helloworld.c', but it wasn't on my path. After some annoyed poking around I added it into my .zshrc file. Once again I tried to compile my hello world program, but was told I didn't have the libraries (>_<). So, I went and found the dependencies I needed (SUNWhea, SUNWtoo and SUNWms if you were wondering) on my Solaris Express DVD. Now I have a compiler and the make tools, though it would be nice to not have to go through that again >_<
Posted at 04:34AM Nov 16, 2008 by Stephen Gream in Personal | Comments[2]
You could have just run:
pfexec pkg search -r gcc
or:
pfexec pkg search -r cc
You then could have installed either gcc or sunstudio via:
pfexec pkg install ss-dev
pfexec pkg install gcc-dev
IPS (Image Packaging System), it's a brave new world. :-)
Posted by Glenn Lagasse on November 16, 2008 at 11:55 AM EST #
Hmm, I'll have to look into that ;) I'm from a Linux background and am too impatient to look much further than the first few Google links, which OpenSolaris like a minefield at times :). Oh, and you win 1 internets for posting the first comment to my blog
Posted by Stephen Gream on November 20, 2008 at 03:58 PM EST #