Saturday, December 30, 2006

Installing Sun Studio 11 Compiler -- a nightmare

Getting started hacking on OpenSolaris requires a working copy of Sun Studio 11. Unfortunately gtar/tar refused to play ball.

At first I thought the archive was corrupt on the local akamai mirror. (Sun Download Manager said so...) However the folks on #opensolaris confirmed SDM is broken. Having downloaded the file under OS X, the md5sum was:

openssl md5 sunstudio11-ii-20060829-sol-x86.tar.Z
MD5(sunstudio11-ii-20060829-sol-x86.tar.Z)= b7c5ca71acb7a7a82dc4abcc4c04a355

Now things get odd:
scp'ing the file to my opensolaris machine, and the file sometimes doesn't md5sum to that value. Retry and it works.

Following the instructions, I should untar the file like so:
# mkdir /opt/SUNWspro
# cd /opt/SUNWspro
# /usr/sfw/bin/gtar -zxvf DOWNLOAD-DIRECTORY/sunstudio11-ii-DATE-PLATFORM.tar.Z
Unfortunately gtar dies with:
./contrib/xemacs-21.4.12/lib/xemacs/xemacs-packages/etc/jde/java/lib/
./contrib/xemacs-21.4.12/lib/xemacs/xemacs-packages/etc/jde/java/lib/bsh.jar
/usr/sfw/bin/gtar: Skipping to next header
/usr/sfw/bin/gtar: Archive contains obsolescent base-64 headers
/usr/sfw/bin/gtar: Error exit delayed from previous errors


and more worryingly:
openssl md5 /export/home/james/sunstudio11-ii-20060829-sol-x86.tar.Z
MD5(/export/home/james/sunstudio11-ii-20060829-sol-x86.tar.Z)= 6706958fe49af73a9c6a14c4fcf38e23
(yes the md5sum was correct before).

After banging my head on a brick wall #opensolaris suggested using tar (with an uncorrputed version of the file).

# zcat /export/home/james/sunstudio11-ii-20060829-sol-x86.tar.Z | tar -xvf -

Un-tarred without errors. Unfortunately the md5sum has once again changed. Are there monkeys in my system?
-bash-3.00$ openssl md5 sunstudio11-ii-20060829-sol-x86.tar.Z
MD5(sunstudio11-ii-20060829-sol-x86.tar.Z)= 19fb560e0f47c9ba9e7f2f1d055ac607

*worried*