Tuesday, August 22, 2006

Installing gcc compiler on Solaris 10

So today I needed to compile a few programs on one of the Solaris servers but found there was no compiler installed.

The installation of the compiler was painless. First I went to sunfreeware.com and downloaded gcc-3.3.2 and libiconv packages for SPARC/Solaris 10.

wget ftp://ftp.sunfreeware.com/pub/freeware/sparc/10/gcc-3.3.2-sol10-sparc-local.gz
wget ftp://ftp.sunfreeware.com/pub/freeware/sparc/10/libiconv-1.9.2-sol10-sparc-local.gz


After downloading I navigated to the directory and gunzipped them
gunzip gcc-3.3.2-sol10-sparc-local.gz
gunzip libiconv-1.9.2-sol10-sparc-local.gz


After that I installed the libiconv package first, since that is a requirement.
pkgadd -d libiconv-1.9.2-sol10-sparc-local

Installation output
The following packages are available:
1 SMCliconv libiconv
(sparc) 1.9.2

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

Processing package instance from

libiconv(sparc) 1.9.2
Bruno Haible
Using as the package base directory.
## Processing package information.
## Processing system information.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.

The following files are already installed on the system and are being
used by another package:
/usr/local/bin
/usr/local/doc
/usr/local/man
/usr/local/man/man1

Do you want to install these conflicting files [y,n,?,q] y

## Checking for setuid/setgid programs.

Installing libiconv as

## Installing part 1 of 1.
/usr/local/bin/iconv
/usr/local/doc/libiconv/ABOUT-NLS
/usr/local/doc/libiconv/AUTHORS
/usr/local/doc/libiconv/COPYING.LIB
/usr/local/doc/libiconv/ChangeLog
/usr/local/doc/libiconv/DESIGN
/usr/local/doc/libiconv/INSTALL.generic
/usr/local/doc/libiconv/NEWS
/usr/local/doc/libiconv/NOTES
/usr/local/doc/libiconv/PORTS
/usr/local/doc/libiconv/README
/usr/local/doc/libiconv/README.djgpp
/usr/local/doc/libiconv/README.os2
/usr/local/doc/libiconv/README.woe32
/usr/local/doc/libiconv/THANKS
/usr/local/include/iconv.h
/usr/local/include/libcharset.h
/usr/local/include/localcharset.h
/usr/local/lib/libcharset.a
/usr/local/lib/libcharset.la
/usr/local/lib/libcharset.so
/usr/local/lib/libcharset.so.1
/usr/local/lib/libcharset.so.1.0.0
/usr/local/lib/libiconv.la
/usr/local/lib/libiconv.so
/usr/local/lib/libiconv.so.2
/usr/local/lib/libiconv.so.2.2.0
/usr/local/lib/libiconv_plug.so
/usr/local/man/man1/iconv.1
/usr/local/man/man3/iconv.3
/usr/local/man/man3/iconv_close.3
/usr/local/man/man3/iconv_open.3
/usr/local/share/doc/libiconv/iconv.1.html
/usr/local/share/doc/libiconv/iconv.3.html
/usr/local/share/doc/libiconv/iconv_close.3.html
/usr/local/share/doc/libiconv/iconv_open.3.html
[ verifying class ]

Installation of was successful.


Then I installed gcc
pkgadd -d gcc-3.3.2-sol10-sparc-local

Output
[root@db32:/home/fmashraqi/install/gcc] pkgadd -d gcc-3.3.2-sol10-sparc-local

The following packages are available:
1 SMCgcc gcc
(sparc) 3.3.2

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

7 Comments:

At Thu Jan 25, 01:12:00 AM, Blogger Amudha said...

I found this very useful at a time when I needed it desperately..Thanks!!! :)

 
At Tue Feb 13, 08:24:00 AM, Anonymous Anonymous said...

Indeed, it helps a lot man many thanks

 
At Fri Mar 02, 11:53:00 AM, Anonymous Anonymous said...

If you don't have wget you can also ftp in;
(first step)

cd /tmp
ftp ftp.sunfreeware.com
anonymous
blah@blah.com
passive
cd pub/freeware/sparc/10
ls gcc* (note version)
get gcc-3.3.2-sol10-sparc-local.gz
[downloads gcc to /tmp]
ls libigcc*
libiconv-1.9.2-sol10-sparc-local.gz
[downloads libiconv to /tmp]

(then continue following at step 2; gunzip etc.)

 
At Fri May 11, 11:43:00 AM, Blogger compjon said...

Thanks.
This got me out of jam. Good Work.
Do you have an recommendations, on how to sharpen Solaris 10 skills
Thanks

 
At Fri May 11, 11:47:00 AM, Blogger compjon said...

Thanks, got me out of jam.
Great work.
Any recommendations, to sharpen my Solaris skills?
Thanks

 
At Sun Aug 12, 12:38:00 AM, Blogger phani said...

I found what I need by Visiting this site.
Thank you.
sajja.phani@gmail.com

 
At Fri Nov 26, 12:48:00 PM, Blogger Santhros ibn Shinu said...

God bless you, Frank!!!

It was kind of hard to find this accurate info.

One question, why is it that Solaris does not install GCC by default?

 

Post a Comment

Links to this post:

Create a Link

<< Home