Link to home
Start Free TrialLog in
Avatar of micahman
micahman

asked on

Compiling problem on Sol. 8 and gcc

I have a Solaris 2.8 machine I inherited.  I installed the F4Sg++-3.0.4-sol8-local.PKG from Freeware4sun.com.  It installed fine.  I then tried to use it to compile Gnu's diffutils and got the following:

/opt/progs/diffutils-2.8.1 : # ./configure
checking for a BSD-compatible install... config/install-sh -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets ${MAKE}... yes
checking for gawk... (cached) nawk
checking for gcc... gcc
checking for C compiler default output... configure: error: C compiler cannot create executables

I have tried changing the LD_LIBRARY_PATH but have had no luck.  Can someone help?

--- MIcah
Avatar of jlevie
jlevie

Offhand I'd guess that gcc isn't in your PATH and configure can't find it. I don't know where that package installs gcc, posiibing in /usr/local or in /opt/. If it happened to be in /usr/local adding /usr/local/bin to your path would solve the problem. If it's in /opt you'll add something different.
Avatar of micahman

ASKER

Don't think that's it.  Here's the proof:

/opt/progs/diffutils-2.8.1 : # gcc -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.4/specs
Configured with: ./configure --prefix=/usr/local
Thread model: posix
gcc version 3.0.4

So it looks like gcc is in the path.
ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

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 yuzh
I am not sure that if you have install all the package/libs
with this version of gcc complier. I have not try version 3.04, but I have tried gcc 3.1 and gcc 2.95.3 in the last few months.

For start, did you use  The GNU make to create your Makefile(not native Solaris make) and check you Makefile to ensure all the correct lib link is defined? (make sure that is link to /usr/local/lib/gcc-lib...).

I told you my story about this gcc compliler. I use gcc (ver 3.1, installed on Sun Blade 1000, Solaris 8), compiling magic7.1 (VLSI design software) no problem. when I use the same complier to compile electric-6.5(another VLSI design software), failed!!!
I end up complied it on another Sun box with gcc 2.95.3 (Solaris 8, Sun Blade 1000) and it works. It looks like the older version of gcc is more stable than the newer one. I have used the old one (gcc 2.95.3) a lot, not much trouble.

May be you should download it (http://sunfreeware.com/), installed it on a different box, and give it a shot. (please download the glib, libiberty, and GUN version of make, autoconf, automake as well)
Sorry this took so long for me to get back to you.  I believe that you are correct.  I spoke to the person who "built" this server and they said that they didn't see the need for the developer tools since this was a server and not a developer machine.  I'm planning on rebuilding the machine correctly anyway.  Thanks again for the help!

--- Micah