Installing gcc... apparently my system doesn't have it.
Hi,
I cannot find gcc on my solaris9 (sparc) server.
How can i install it?
I found the package on sunfreeware.com but that says that you must have the developer tools(?) installed on the system?
I have the Solaris9 box and a whole bunch of CDs in it... Solaris Installation, Software 1 of 2, Software 2 of 2, Software collections, etc etc but i don't know which one (if any) would have gcc on it. Or which one has the developer stuff on it that i aught to install before putting on the sunfreeware gcc package.
So, how do i go about installing gcc?
(and for future reference, is there an easy way to browse the contents of the install CDs? Is there something that lists the contents/what packages are on what disc?)
Many, many thanks,
mark - complete solaris newbie.
[822 byte] By [
mark-w] at [2007-11-26 10:00:01]

# 1
> I cannot find gcc on my solaris9 (sparc) server.
It's not part of Solaris 9.
> How can i install it?
As you mention, sunfreeware is a good place to start. It may also be on the companion CD for Solaris 9, but I don't recall.
> I found the package on sunfreeware.com but that says
> that you must have the developer tools(?) installed
> on the system?
Yes. When you installed solaris, did you do a 'developer' installation or higher (full, and full+OEM are also acceptable)? If so, you've got them.
If you didn't (core, or 'end user' installations), see the Solaris 2 FAQ.
http://www.science.uva.nl/pub/solaris/solaris2.html#q6.2
6.2) Which packages do I need to install to support a C compiler?
> I have the Solaris9 box and a whole bunch of CDs in
> it... Solaris Installation, Software 1 of 2, Software
> 2 of 2, Software collections, etc etc but i don't
> know which one (if any) would have gcc on it. Or
> which one has the developer stuff on it that i aught
> to install before putting on the sunfreeware gcc
> package.
>
> So, how do i go about installing gcc?
If you use sunfreeware, follow the downloading/installing instructions from the link on the left side.
> (and for future reference, is there an easy way to
> browse the contents of the install CDs? Is there
> something that lists the contents/what packages are
> on what disc?)
CD/Solaris_9/Product contains the packages.
I don't have a Solaris 9 CD around, but most of the time disk1 contains a .virtual_packages directory in Product that will have links of the stuff on the other disks.
--
Darren
# 2
> Yes. When you installed solaris, did you do a
> 'developer' installation or higher (full, and
> full+OEM are also acceptable)? If so, you've got
> them.
I didn't install solaris on the machine - i've just adopted it.
Is there anyway of finding out/working out which install was used?
Thanks for your response anyway Darren.
markw at 2007-7-7 1:28:10 >

# 3
After having a read of the link Darren posted, i was able to work things out and successfully have gcc working now. (thanks Darren and sunfreeware.com!)
However, the software i'm trying to install (after using gcc for the initial part of the install) is now wanting to use SUNWspro and can't so is complaining with the following error:
make: /opt/SUNWspro/bin/cc: Command not found
make: *** [obj/srbMaster.o] Error 127
Is SUNWspro to be found on any of the solaris9 install CDs?
Many thanks,
mark.
markw at 2007-7-7 1:28:10 >

# 4
What compiler did you install ?gcc or cc ?If you installed gcc change the compile script to use gcc and not use cc. I am saying this because the error you are getting is pointing to a cc error and not gcc.
# 5
I installed gcc.I understand the error to mean that it wants to use SUNWspro (cc?)... can i not just install this, and make it happy?Or is it not wise to have both gcc and cc installed?
markw at 2007-7-7 1:28:10 >

# 6
> I installed gcc.
>
> I understand the error to mean that it wants to use
> SUNWspro (cc?)... can i not just install this, and
> make it happy?
>
> Or is it not wise to have both gcc and cc installed?
No it's fine, but you probably don't have 'cc' installed at all (hence "command not found").
The application you are trying to compile (you don't say what it is) is trying to invoke that compiler instead of gcc. Sometimes that's because it makes an assumption about what's installed on Solaris, or because 'gcc' wasn't in your path when 'configure' was run or something. At this point it's the application's fault. What is it?
Sometimes something like 'CC=gcc make' will work, but often it's already made assumptions about what flags to pass.
Presumably you could download the (free) Sun Studio drivers as well.
--
Darren
# 7
Darren, Thanks for replying again.What are Sun Studio drivers?Is installing the Sun Studio software teh easiest way to get SUNWspro onto the machine?Thanks.
markw at 2007-7-7 1:28:10 >

# 8
Also, i've just seen that the Studio requires 1.5GB of space.
So i just did df -h and got...
Filesystem sizeused avail capacity Mounted on
/dev/md/dsk/d05.9G5.5G366M94%/
/proc 0K0K0K0%/proc
mnttab 0K0K0K0%/etc/mnttab
fd0K0K0K0%/dev/fd
swap5.2G104K5.2G1%/var/run
swap5.2G872K5.2G1%/tmp
/dev/md/dsk/d418G18M18G1%/spare
/dev/md/dsk/d3 39G99M39G1%/home
So i do have space on the hard disk, but under '/home' rather than /. If i tried to install the Studio, would it use the home space automatically, or do i need to allocate more space to / ? Is this even possible 'live'?
markw at 2007-7-7 1:28:10 >
