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]: