LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   gcc issue !! (http://www.linuxquestions.org/questions/linux-newbie-8/gcc-issue-887391/)

moata_u 06-20-2011 02:55 PM

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 !!!!!

lisle2011 06-20-2011 03:12 PM

gcc
 
usuallu ./configure CC=gcc

moata_u 06-20-2011 03:17 PM

still have problem
 
Quote:

Originally Posted by lisle2011 (Post 4391082)
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.


lisle2011 06-20-2011 04:26 PM

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.

lisle2011 06-20-2011 04:30 PM

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?

moata_u 06-21-2011 02:19 AM

That really ware !!! ,
i have no /usr/bin/gcc
or /usr/bin/cc


nothing !!! , i download gcc from ,http://www.sunfreeware.com/
Please advice

MTK358 06-21-2011 10:59 AM

Quote:

Originally Posted by moata_u (Post 4391454)
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.

chrism01 06-21-2011 06:22 PM

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.


All times are GMT -5. The time now is 08:03 AM.