How to's: Installing Sun Studio 11 on Ubuntu 7.04 FF

How to’s: Installing Sun Studio 11 on Ubuntu 7.04 FF

I have always wanted to dive into C++ world (as a rather lazy kind never did). This is my another attempt. Since FF version of Ubuntu was released few days ago, almost every day I find something new and interesting. As I’m forced to write sometimes a very small C++ application (university commitments) and a couple of months ago I have realized that Sun Studio 11 is freely available, I wanted to give it a try. Unfortunately never did, that’s because somehow I couldn’t run it under Ubuntu (sometimes you have to choose, comparing the amount of work you have to do to actually make it work or the amount of work to write the program in VIM and forget about all the gui fancy staff). Anyway FF is available and suprise, suprise, Studio 11 works almost out of the box. Here you go simple step by step guide to install this “little” precious.

1. Install Java SDK and JRE 5, for some reason SS11 doesn’t work with version 6, you can however still keep the version 6 as the default one on the system.
2. Install GNU C/C++ compiler under Ubuntu:

sudo apt-get install build-essential

3. Download Sun Studio 11 software for Linux
4. Run the installer:
change to root (su -)
move the downloaded .bz2 file to the directory where you want to install the software (in my case /opt directory)
run:
tar -xjvvf studio11-lin-x86.tar.bz2v
./installer –nodisplay
5. Answer a few simple questions about installation
6. Don’t worry if sdk 1.4 was not installed.
7. Change one of the awk scripts:
go to /installdirectory/sun/sunstudio11/prod/scripts/ver.awk
and change the line:

FS=“”| |(|)|,|t”;
to:
FS=“”| |(|)|,|t”;

8. Add the studio’s bin directory to your PATH:
Edit .bashrc and add the following line:

PATH=/opt/sun/sunstudio11/bin:$PATH; export PATH

9. Run the newly installed Studio 11 with:
sunstudio
Note:
If you have more than one JDK available and e.g version 6 is your default one, run sunstudio command with the following flag:
sunstudio=’sunstudio –jdkhome ‘path-to-your-jdk5or4′ in my case alias sunstudio=’sunstudio –jdkhome /usr/lib/jvm/java-1.5.0-sun-1.5.0.11’
If that is the case add the alias to your .bashrc file:
alias sunstudio=’sunstudio –jdkhome /usr/lib/jvm/java-1.5.0-sun-1.5.0.11′
and run the command sunstudio as normal.

Sun Studio 11 Splash Screen on Kubuntu 7.04 FF:


…and working IDE:

Good Luck 🙂


6 responses on “How to’s: Installing Sun Studio 11 on Ubuntu 7.04 FF

  1. Mike April 29, 2007 at 8:03 am

    Great work. Submitted in queue @ tweako

  2. pragmaticObjects April 30, 2007 at 10:30 pm

    Does the Forte compiler gets installed by default with SS11?

  3. ooblogger May 1, 2007 at 7:36 pm

    As far as I know,on Linux, Sun Studio 11 uses the compiler installed on your system, if you want to use the sun c/c++/fortran compilers with Studio 11 maybe you would have to consider moving to Solaris/OpenSolaris platform.

  4. rodomaz May 13, 2007 at 3:57 pm

    Hello,

    Thanks a lot, I am new to linus and was trying desperately to use SunStudio. Your guide works perfectly, just remember to install “rpm”.
    http://www.genunix.org/wiki/index.php/Sun_Studio_FAQs#Installer_-_How_to_install_on_Ubuntu

  5. Anonymous June 6, 2007 at 7:01 pm

    Just wanted to note that yesterday Sun
    has already released Sun Studio 12
    with MUCH MUCH improved IDE.

  6. ooblogger June 6, 2007 at 10:06 pm

    yeah! I saw it today morning, it’s based on Netbeans 5.5.1. Currently I have some problems with downloading the package installer but as soon as I get some luck I will post some feedback, Thanks!

Leave a Reply

Related Posts

    No Releated Posts