LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-20-2011, 02:55 PM   #1
moata_u
Member
 
Registered: Jan 2011
Posts: 32

Rep: Reputation: 0
Exclamation gcc issue !!


i was trying install top utility , and i got the following error :
Code:
 checking build system type... i386-pc-solaris2.10
checking host system type... i386-pc-solaris2.10
checking target system type... i386-pc-solaris2.10
checking for make... no
checking for gcc... gcc
checking for C compiler default output file name... 
configure: error: C compiler cannot create executables
See `config.log' for more details.
so after downloading gcc and try install i got the following error :

Code:
./configure: gcc: not found
./configure: gcc: not found
*** The command 'gcc -o conftest -g   conftest.c' failed.
*** You must set the environment variable CC to a working compiler.

Please advice !!!!!
 
Old 06-20-2011, 03:12 PM   #2
lisle2011
Member
 
Registered: Mar 2011
Location: Surrey B.C. Canada (Metro Vancouver)
Distribution: Slackware 2.6.33.4-smp
Posts: 179
Blog Entries: 1

Rep: Reputation: 25
gcc

usuallu ./configure CC=gcc
 
Old 06-20-2011, 03:17 PM   #3
moata_u
Member
 
Registered: Jan 2011
Posts: 32

Original Poster
Rep: Reputation: 0
still have problem

Quote:
Originally Posted by lisle2011 View Post
usuallu ./configure CC=gcc
Code:
bash-3.00# ./configure CC=gcc
configure: warning: CC=gcc: invalid host type
loading cache ./config.cache
checking host system type... Invalid configuration `CC=gcc': machine `CC=gcc' not recognized

checking target system type... Invalid configuration `CC=gcc': machine `CC=gcc' not recognized

checking build system type... Invalid configuration `CC=gcc': machine `CC=gcc' not recognized

checking for a BSD compatible install... ./install-sh -c
./configure: gcc: not found
./configure: gcc: not found
*** The command 'gcc -o conftest -g   conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
 
Old 06-20-2011, 04:26 PM   #4
lisle2011
Member
 
Registered: Mar 2011
Location: Surrey B.C. Canada (Metro Vancouver)
Distribution: Slackware 2.6.33.4-smp
Posts: 179
Blog Entries: 1

Rep: Reputation: 25
GCC Issue

Well that should have worked,

there are some slightly different ways that might work.

First locate cc 'whereis cc' likely it is in /usr/bin and is a link pointing to gcc. try CC=/usr/bin/gcc

If you still fail try cc := gcc to prevent recursion, however you would need to add that to Makefile.am I believe.

Finally you could try export cc=/usr/bin/gcc

that would put it into the environment

type env afterwards to see if it is there if you still have the error I am sorry I can't help more.
 
Old 06-20-2011, 04:30 PM   #5
lisle2011
Member
 
Registered: Mar 2011
Location: Surrey B.C. Canada (Metro Vancouver)
Distribution: Slackware 2.6.33.4-smp
Posts: 179
Blog Entries: 1

Rep: Reputation: 25
Reread your original post

In the initial post the program not found was make

checking for make... no
checking for gcc... gcc

so you did not need to re-install gcc as it was there, what was missing is make.

Where dod you download gcc from?
 
Old 06-21-2011, 02:19 AM   #6
moata_u
Member
 
Registered: Jan 2011
Posts: 32

Original Poster
Rep: Reputation: 0
That really ware !!! ,
i have no /usr/bin/gcc
or /usr/bin/cc


nothing !!! , i download gcc from ,http://www.sunfreeware.com/
Please advice
 
Old 06-21-2011, 10:59 AM   #7
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
Quote:
Originally Posted by moata_u View Post
That really ware !!! ,
What does that sentence mean?

Quote:
i download gcc from ,http://www.sunfreeware.com/
Please advice
If that download came with uninstallation instructions, follow them.

Then run:

Code:
apt-get purge gcc
apt-get install build-essential
Installing software manually without your package manager and almost never a good idea.
 
Old 06-21-2011, 06:22 PM   #8
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,287

Rep: Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034
That's a site for SW to run on Solaris, not Linux.
@OP; exactly what OS are you using?
If it IS Solaris, use the Report button to ask the Mods to move this to the Solaris Forum.

To me, this
Quote:
i386-pc-solaris2.10
means it's designed for a 32 bit x86 chip running Solaris 10.
 
  


Reply

Tags
gcc


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Another gcc compilation issue HSN Linux - Software 7 10-01-2009 08:39 AM
Gcc issue i think djcs Debian 5 01-15-2008 02:24 AM
centos4.5 - gcc issue? jp-lack Linux - General 1 06-15-2007 09:14 PM
gcc 3.4.2 and template issue ahwkong Programming 1 04-16-2005 01:18 PM
GCC 3.3.2-6 Installation Issue Shoal Linux - Software 1 11-02-2004 07:24 PM


All times are GMT -5. The time now is 10:41 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration