Having a hard time configuring gcc on Solaris 8

I am working on setting up mysql and php on a Sun Box running Solaris 8 and one of the packages that I need to install is gcc.  I have downloaded and followed instructions on how to go about configuring but I am getting the following error:

# /usr/local/gcc-2.95.3/configure
Configuring for a sparc-sun-solaris2.8 host.
Created "Makefile" in /usr/local/gcc-2.95.3/objdir using "mh-frag"
/usr/local/gcc-2.95.3/configure: cc: not found
*** The command 'cc -o conftest -g   conftest.c' failed.
*** You must set the environment variable CC to a working compiler.

I would appreciate some guidance on this.  I have been searching for a quick answer but as usual "no such thing"
rodunoAsked:
Who is Participating?
 
jlevieCommented:
I don't remember if pkgadd needs space in /var/spool/some-place or /var/tmp when unpacking a package as a part of the install and I'm not where I can check the man page to find out right now. I'd guess it would be /var/tmp and you could solve that by:

mkdir /home/temp-dir
cd /var/
mv tmp hold-tmp
ln -s /home/temp-dir tmp

Then when the Gcc is installed you can undo the workaround by removing the symlink and renaming hold-tmp to tmp.
0
 
TintinCommented:
You need a C compiler or at least a bootstrap to compile gcc.

However, unless you *really* like doing things the hard way, the easiest way to install gcc is to download the package from http://sunfreeware.com/
0
 
jlevieCommented:
To be able to configure and build Gcc you must have a C compiler on the system, which you aparently don't. One solution might be to build Gcc on some other Solars 8 system that has a C compiler and install it on this box, if that's a possibility. An easier solution would be to get a pre-built copy of Gcc from http://www.sunfreeware.com/

Note that you may find that you need to install the Solaris developer cluster to get the header files, libs and tools that you'll need for building php & MySQL. Those are on your Solaris 8 CD's.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
greg14unixCommented:
Get the gcc package from www.sunfreeware.com.  Then you want to make sure your $PATH and $LD_LIBRARY_PATH include all the directories of the  required libraries and files.  From there you should be ready to go.  



config it
make it
install it

:-) my my *nix is Cool
0
 
stefan73Commented:
Hi Tintin,
> doing things the hard way
Be aware that the last time I did this on a 4 CPU Sun with parallel make, it took more than two hours and >1GB of HD space. So "hard way" is no exaggeration - it's a three stage bootstrap process with tons of source files.

It works, but it takes ages (especially when you're compiling the full gcc package). And yes, you'd need Sun cc.

Cheers,
Stefan
0
 
sluchCommented:
Hi Roduno

As stated in 2 prior comments go to www.sunfreeware.com, select your Processor/OS then below that select your package (gcc-2.95.3).
In the middle screen you will see "gcc-2.95.3-sol8-sparc-local.gz" this is a compiled version of gcc all you need to do is unzip this file and run pkgadd to install.

I have used this at it worked just fine.

Good luck
Steve ...
0
 
rodunoAuthor Commented:
sluch,
     I tried to run pkgadd and I received this error: pkgadd: ERROR: no packages were found in </var/spool/pkg>
Am I missing something?

0
 
jlevieCommented:
After unpacking the download you need to execute 'pkgadd -d .' while in the directory containg the Gcc package.
0
 
rodunoAuthor Commented:
Yes, thanks, I had actually figured that out in the interim but I ran into another problem where I get an error because of not enough space in the var/ directory.  I heard from another comment that I could ''symbolically link" this directory to another with more space in order to get the pkgadd to work so I am trying to find out how exactly I can do this.
0
 
TintinCommented:
Is /var on a separate filesystem?

Is there stuff in /var/log that you can clean up?

What's the output from

df -k
0
 
rodunoAuthor Commented:
# df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t0d0s0      90079   49343   31729    61%    /
/dev/dsk/c0t0d0s6     798495  716033   26568    97%    /usr
/proc                      0       0       0     0%    /proc
fd                         0       0       0     0%    /dev/fd
mnttab                     0       0       0     0%    /etc/mnttab
/dev/dsk/c0t0d0s3      32847    8621   20942    30%    /var
swap                  674584      16  674568     1%    /var/run
swap                  674592      24  674568     1%    /tmp
/dev/dsk/c0t0d0s5      26615    2133   21821     9%    /opt
/dev/dsk/c0t2d0s7    38476820       9 38092043     1%    /export/home0
/dev/dsk/c0t0d0s7    36827276  120234 36338770     1%    /export/home
/dev/dsk/c0t0d0s1     337815  218529   85505    72%    /usr/openwin
0
 
TintinCommented:
That is an extremely small size allocated to /var.

What you could do is move /var/log (assuming that's where most of the space is being taken up) and move it under /export/home, eg:

cd /var
mv log /export/home
ln -s /export/home/log /var/log
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.