Solved

Having a hard time configuring gcc on Solaris 8

Posted on 2004-04-13
12
1,241 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
 
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
AIX  NFS  question 5 89
Shell script errors 10 99
Host issue and need to move VM's 2 221
text in table need to be center of the box 4 67
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
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.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

706 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

13 Experts available now in Live!

Get 1:1 Help Now