Solved

GCC 3.4.1 installation procedure

Posted on 2004-08-18
3
628 Views
Last Modified: 2013-12-27
Does anybody have a good reference site/documents for installing gcc on Solaris8 machine. I prefer installation guide with examples.

The installation guide that comes with the gcc.tar file confused me!
I downloaded the gcc from http://gcc.gnu.org

Pls help.
0
Comment
Question by:eijatt
  • 2
3 Comments
 
LVL 38

Accepted Solution

by:
yuzh earned 100 total points
Comment Utility
Hi eijatt,

     You can download gcc-3.4.1 binary package from (default install in /usr/local)
     http://sunfreeware.com/

     eg, If you are runing Solaris 8 (Sparc),
       1. download gcc-3.4.1-sol8-sparc-local.gz
       2. unzip the file, use:
           gunzip gcc-3.4.1-sol8-sparc-local.gz
       3. install gcc (you need to login as root, or su as root to do the job), type
           in:
           cd /dir-of-download-file
           pkgadd -d <name-of-package>
           eg:
           pkgadd -d gcc-3.4.1-sol8-sparc-local
           
     To use gcc, you need to set PATH, LD_LIBRARY_PATH, and  MANPATH
     eg:
           PATH=$PATH:/usr/local/bin     # installed utilities
           LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
           MANPATH=$MANPATH:/usr/local/man
           export PATH  LD_LIBRARY_PATH  MANPATH

      It is a good idea to install gdb, libgcc, glib,  libiconv as well (download from the
same site ) the procedures are the same as the gcc installation.

0
 
LVL 34

Expert Comment

by:PsiCop
Comment Utility
I generally get the package from Sunfreeware.com and install using the package. Unless you purchased the Sun compiler with your Solaris license, there's no compiler on the system with which to compile the gcc source code.

The packages on sunfreeware.com are generally configured to install in /usr/local/bin. I hate that. I put my stuff in /opt. You can change this tendency fairly easily; see --> http://www.brandonhutchinson.com/Relocating_Solaris_packages.html

Or you can use pkgtrans to unpack the package and edit the pkginfo file to change the BASEDIR value to your liking. When you try to install using pkgadd, it'll whine that the pkginfo file length and chksum are wrong, but will helpfully give you the values it wants. Edit the pkgmap file (the length and checksum values are down at the end) to have the values that pkgadd expects, then re-run pkgadd.
0
 
LVL 34

Expert Comment

by:PsiCop
Comment Utility
Damn, yuzh beat me to it while I was typing.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now