Until Oracle Solaris Studio 12.2 becomes available via a Solaris 11 Express publisher, one can download the tarfile and use the compilers and tools. Here’s how:
1. Download Oracle Solaris Studio 12.2
In the table, pick the download in the “Tarfile” column and the “Solaris 10 OS on SPARC” or “Solaris 10 OS on x86″ row, depending on your architecture.
2. Unpack the tarfile
bzcat download_directory/SolarisStudio12.2-[OS]-[PLATFORM]-[FORMAT]-ML.tar.bz2 | /bin/tar -xf -
3. Update PATH
I updated my .profile directly
4. Add necessary Solaris packages to use Oracle Solaris Studio. Here’s the complete list of Solaris packages that Solaris Studio needs:
- system/library/math
- developer/macro/cpp
- system/library/c++/sunpro
- developer/linker
- system/header (Not installed by default by LiveCD installation)
- developer/build/make
- developer/java/jdk (Not installed by default by LiveCD installation)
- system/library/math/header-math (Not installed by default by LiveCD installation)
- developer/library/lint (Not installed by default by LiveCD installation)
To find out if the package is already installed, use the pkg info command:
koberoi@raiders:~$ pkg info system/library/math
Name: system/library/math
Summary: Math & Microtasking Libraries
Description: Math & Microtasking Libraries
Category: System/Libraries
State: Installed
Publisher: solaris
Version: 0.5.11
Build Release: 5.11
Branch: 0.151.0.1
Packaging Date: November 5, 2010 06:11:38 AM
Size: 2.62 MB
FMRI: pkg://solaris/system/library/math@0.5.11,5.11-0.151.0.1:20101105T061138Z
If it is not installed, then you’ll receive a message similar to this:
koberoi@raiders:~$ pkg info system/header
pkg: info: no packages matching the following patterns you specified are
installed on the system. Try specifying -r to query remotely:
system/header
You can then check to see if one of your publishers has it:
koberoi@raiders:~$ pkg info -r system/header
Name: system/header
Summary: SunOS Header Files
Description: SunOS C/C++ header files for general development of software
Category: System/Core
State: Not installed
Publisher: solaris
Version: 0.5.11
Build Release: 5.11
Branch: 0.151.0.1
Packaging Date: November 5, 2010 12:21:36 AM
Size: 11.47 MB
FMRI: pkg://solaris/system/header@0.5.11,5.11-0.151.0.1:20101105T002136Z
You can then install it:
koberoi@raiders:~$ sudo pkg install system/header
Password:
Packages to install: 1
Create boot environment: No
DOWNLOAD PKGS FILES XFER (MB)
Completed 1/1 1499/1499 3.6/3.6
PHASE ACTIONS
Install Phase 1617/1617
PHASE ITEMS
Package State Update Phase 1/1
Image State Update Phase 2/2
koberoi@raiders:~$
And then verify that it is installed:
koberoi@raiders:~$ pkg info system/header
Name: system/header
Summary: SunOS Header Files
Description: SunOS C/C++ header files for general development of software
Category: System/Core
State: Installed
Publisher: solaris
Version: 0.5.11
Build Release: 5.11
Branch: 0.151.0.1
Packaging Date: November 5, 2010 12:21:36 AM
Size: 11.47 MB
FMRI: pkg://solaris/system/header@0.5.11,5.11-0.151.0.1:20101105T002136Z
koberoi@raiders:~$
FYI, to be able to compile/run hello world for C, C++, & Fortran as well as run the IDE on my newly minted Solaris 11 Express installation (from LiveCD), I had to install the following 2 OS packages:
- system/header (Not installed by default by LiveCD installation)
- system/library/math/header-math (Not installed by default by LiveCD installation)
It’s far better to use packages to install Sun Studio on Solaris.
OpenSolaris (and Solaris 11 Express as its descendant) has full set of SVr4 pkg utilities. Just download package installer, untar it, unpack packages using ‘–extract-installation-data’ command line argument to that-huge-shell-archive and install them using, for example, the following command:
for i in SPRO*; do pfexec pkgadd -d $i; done
After re-login you will be able to see nice icons under Applications -> Development
Pingback: Installing Oracle Solaris Studio 12.2 (tarfile) on Solaris 11 … · Database, MySql, Oracle, SQL and more
Pingback: Install and Configure Django + mod_wsgi in Oracle Solaris 11 Express « Chen Liang's Blog
To further break the command out to use the package install method instead of the tarball:
1. bzcat SolarisStudio12.2-[OS]-[PLATFORM]-[FORMAT]-ML.tar.bz2 | /bin/tar -xf -
2. cd SolarisStudio12.2-[OS]-[PLATFORM]-[FORMAT]-ML
3. mkdir tmp
4. ./SolarisStudio12.2-solaris-x86-pkg-ML.sh –non-interactive –extract-installation-data tmp/
5. cd tmp
6. for i in SPRO*; do pfexec pkgadd -d $i; done
Pingback: Installing Solaris Studio on Solaris Express | Silent Panda
Pingback: ASMCA» Blog Archive » Oracle Solaris Studio 12.2 on Solaris 11
Hi Kuldip,
Thank you very much for this post – it helps a lot! What is also great, it is the first link
that Google shows when I ask “How to install headers on Solaris 11″
Thanks.
Nik