Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Having a hard time configuring gcc on Solaris 8

Posted on 2004-04-13
12
1,249 Views
Last Modified: 2013-12-21
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"
0
Comment
Question by:roduno
  • 3
  • 3
  • 3
  • +3
12 Comments
 
LVL 48

Expert Comment

by:Tintin
ID: 10820120
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
 
LVL 40

Expert Comment

by:jlevie
ID: 10820152
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
 
LVL 1

Expert Comment

by:greg14unix
ID: 10820662
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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 12

Expert Comment

by:stefan73
ID: 10823209
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
 

Expert Comment

by:sluch
ID: 10825414
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
 

Author Comment

by:roduno
ID: 10838447
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
 
LVL 40

Expert Comment

by:jlevie
ID: 10838934
After unpacking the download you need to execute 'pkgadd -d .' while in the directory containg the Gcc package.
0
 

Author Comment

by:roduno
ID: 10838960
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
 
LVL 48

Expert Comment

by:Tintin
ID: 10839002
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
 

Author Comment

by:roduno
ID: 10839012
# 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
 
LVL 48

Expert Comment

by:Tintin
ID: 10839126
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
 
LVL 40

Accepted Solution

by:
jlevie earned 500 total points
ID: 10839214
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

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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…
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.

789 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