Compiling problem on Sol. 8 and gcc

Posted on 2002-06-06
Medium Priority
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
Question by:micahman
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
LVL 40

Expert Comment

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.

Author Comment

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.
LVL 40

Accepted Solution

jlevie earned 800 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"); }
chaos> gcc -o /tmp/gork /tmp/gork.c
chaos> /tmp/gork
Anybody home?

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.
LVL 38

Expert Comment

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)

Author Comment

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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
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 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…
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.:
Suggested Courses
Course of the Month10 days, 20 hours left to enroll

770 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