Link to home
Start Free TrialLog in
Avatar of rosetalk
rosetalk

asked on

How to install gcc on Solaris?

I am running solaris 8 and I would like to install gcc. After reading the installation notes at http://gcc.gnu.org/install, I still don't understand how to do it.

I have added the package for libgcc. After pkgadd the gcc libraries, I have no clue how to proceed. I am not sure besides the libraries, what other packages I need to add as I could not find the gcc compiler.

Could someone provide me with a simple step by step instruction on how to install gcc and how to perform a simple compile using gcc?

I also have a C++ compiler /opt/SUNWspro. Will the installation of gcc has any impact on the C++ compiler?

Please be patient with me I am new to compiling C++ in unix.
Thanks
ASKER CERTIFIED SOLUTION
Avatar of Otetelisanu
Otetelisanu

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of micahman
micahman

Yeah, I've had issues with compiling gcc on Solaris boxes in the past.  After my ump-teenth try I decided it may be better to just pkgadd the darn thing.  You can get a Solaris gcc pkg from sunfreeware.com, www.freeware4sun.com, and even http://www.ibiblio.org/pub/.  Don't forget to check the versions on the pkgs as sometimes they lag from the most recent version out there.

--- M
Avatar of rosetalk

ASKER

I have downloaded gcc-3.2.2-sol8-sparc-local.gz and it is about 273MB. This package includes the GNU C, C++, g77, Java, and OBJC compiler suites and support files. I don't want to install so many things. Are they neccessary? Are there any downloads with only the gcc compiler.

There is this statement in the gcc-3.2.2 comments that says "To use the gcc package from sunfreeware.com you MUST install all of the SUNW deveoper packages that come on Sun's Solaris CDs."

I did not installed the Sun developer packages in my server and I can't afford to them because of disk space constraint.

Please advise. Thanks.
My advise would be to get the gcc package from http://www.sunfreeware.com/.  You'll find any dependancies listed there along with detailed installation instructions.

Once you've installed that package, I'd recommend getting the gcc source and building from scratch.

Anyway, thats my 2cents.
- Pogga.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by  Otetelisanu

Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

liddler
EE Cleanup Volunteer