Solved

GCC 3.4.1 installation procedure

Posted on 2004-08-18
3
629 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
ID: 11837303
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
ID: 11837309
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
ID: 11837311
Damn, yuzh beat me to it while I was typing.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to clone solaris 10 machine 33 114
How can i set a Environment Variable in my Unix script ? 3 51
Bash Script to Analyze Oracle Schemas 11 84
Martian Packets Unix 5 31
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

920 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

14 Experts available now in Live!

Get 1:1 Help Now