Solved

Compiling problem on Sol. 8 and gcc

Posted on 2002-06-06
5
421 Views
Last Modified: 2013-12-27
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
0
Comment
Question by:micahman
[X]
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
  • 2
  • 2
5 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 7059377
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.
0
 

Author Comment

by:micahman
ID: 7059556
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.
0
 
LVL 40

Accepted Solution

by:
jlevie earned 200 total points
ID: 7059813
Okay, I'd agree it's not a PATH problem. Have you checked to see if you can compile a simple program. I've just checked for any problem with the configure script for diffutils working against GCC 3.0.3 and it works fine for me.

Have you verified that your gcc actually works? Try:

chaos> cat > /tmp/gork.c <<EOF
> #include <stdio.h>
> main() { printf("Anybody home?\n"); }
> EOF
chaos> gcc -o /tmp/gork /tmp/gork.c
chaos> /tmp/gork
Anybody home?
chaos>

Note that you do have to have the Solaris Bundled Developer support packaes installed to be able to use GCC or any other compiler. So if the test above doesn't work you may not have the utilities, include file, and libs from the Developer support installed.
0
 
LVL 38

Expert Comment

by:yuzh
ID: 7060902
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)
0
 

Author Comment

by:micahman
ID: 7069636
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
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.

717 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