Installing Sun Studio or GNU Tools on OpenSolaris
Installing Sun compilers and developer tools or the GNU developer tools on OpenSolaris 2008.05 can be a bit daunting since the compiler packages were not categorized appropriately. This error will be fixed, but in the meantime, Sun’s Josh Simons has taken it upon himself to post instructions on how to set up Sun Studio - Sun’s compiler and tools suite - and GNU tools to ease users’ minds.
First, users need to go to Package Manager, which is located by accessing System -> Administration -> Package Manager.
For Sun Studio
Select the “All” category and type “ss-dev”. Simons notes that the return key does not need to be pressed and, although the interface is slow, it will update the screen with the package. Once the “ss-dev” package appears, just select it and find Install/Update on the toolbar.
“Once the download (over 600MB) and the installation complete, you can open a terminal window and try the ‘cc’ command. Don’t panic when it fails. …the compilers have been installed in /opt. You will need to either modify your startup files to include this directory on your execution path, or create the appropriate links from /usr/bin into this directory,” Simons explains. “I’ve been told we will fix this inconvenience soon. A wonderful benefit of network-based package management is that we can fix this relatively quickly and then subsequent downloaders of the package will see the new behavior automatically.”
For GNU Tools
Select the “All” category and enter a search for “gcc”. Select the gcc-dev package and click on Install/Update from the toolbar. Upon completion, users can verify the install by opening a new terminal window and typing in “gcc”. “The installation script has created links from /usr/bin/gcc to /usr/sfw/bin/gcc as a convenience,” Simons notes.
Result windows are available for each step of this process, so interested readers may want to take a look at his June 5th blog for assurance.
Tags: GNU, Sun Studio