Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Linux and Unix
Tag Cloud
access acer asus bios bsod computer crash desktop dns driver drivers error ethernet excel freeze gaming graphics hard drive hardware hdmi internet laptop malware memory monitor motherboard network printer problem ram registry repair router slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
problem compiling programs

Reply  
Thread Tools
Fabiogump's Avatar
Member with 250 posts.
 
Join Date: Jul 2001
Experience: Window; enough to know Linux; fish out of water
19-Oct-2005, 11:10 PM #1
Question problem compiling programs
okay a few weeks ago I posted I was having a problem installing RPM's with Suse Yast2. I think I found out why.

I have been having some limited success compiling a few programs from source. Firefox is one and the other was realplayer.

When I tried to compile gaim I get this when I enter ./configure

checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/XXXXX/My: /home/XXXXX/My: No such file or directory
configure: WARNING: `missing' script is too old or missing
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking for sed... /usr/bin/sed
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

Okay linux gurus, what's wrong with this picture? Oh I'm running Suse 9.1 home.
__________________
-gump
AGCurry's Avatar
Senior Member with 431 posts.
 
Join Date: Jun 2005
Location: Kansas City area
Experience: advanced but learning
20-Oct-2005, 12:35 PM #2
Quote:
Originally Posted by Fabiogump
configure: error: no acceptable C compiler found in $PATH
What do you see when you

echo $PATH

?

What happens when you just enter "cc" or "gcc" on the command line?
Fabiogump's Avatar
Member with 250 posts.
 
Join Date: Jul 2001
Experience: Window; enough to know Linux; fish out of water
20-Oct-2005, 09:59 PM #3
here's my last shell session with you suggestion;

@linux:~> cd '/home/XXXXX/My Downloads/gaim-1.5.0'
@linux:~/My Downloads/gaim-1.5.0> echo $path

@linux:~/My Downloads/gaim-1.5.0> gcc
bash: gcc: command not found
@linux:~/My Downloads/gaim-1.5.0> cc
bash: cc: command not found
@linux:~/My Downloads/gaim-1.5.0> cl
bash: cl: command not found
AGCurry's Avatar
Senior Member with 431 posts.
 
Join Date: Jun 2005
Location: Kansas City area
Experience: advanced but learning
21-Oct-2005, 12:48 PM #4
Quote:
Originally Posted by Fabiogump
here's my last shell session with you suggestion;

@linux:~> cd '/home/XXXXX/My Downloads/gaim-1.5.0'
@linux:~/My Downloads/gaim-1.5.0> echo $path

@linux:~/My Downloads/gaim-1.5.0> gcc
bash: gcc: command not found
@linux:~/My Downloads/gaim-1.5.0> cc
bash: cc: command not found
@linux:~/My Downloads/gaim-1.5.0> cl
bash: cl: command not found
Well, your first problem is that the programs you need to compile need to [exist and] be in your path. And, by the way, "path" is different from "PATH".

Find out what directory gcc (or cc) is in and add it to your path:

export PATH=${PATH}:/whatever/directory
aewarnick's Avatar
Senior Member with 839 posts.
 
Join Date: Sep 2002
09-Jan-2006, 01:51 PM #5
I'm having this same exact problem with Linspire. How do I find where the gcc compiler is? Or if it is even there at all.
aewarnick's Avatar
Senior Member with 839 posts.
 
Join Date: Sep 2002
09-Jan-2006, 02:00 PM #6
Here is some output:

andrew@Wintergreen:~$ echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/usr/bin:/usr/share/qt3/bin
andrew@Wintergreen:~$ whereis gcc
gcc:
andrew@Wintergreen:~$ whereis cc
cc:
andrew@Wintergreen:~$ whereis icc
icc:


I can't use my install cd, it seems to be messed up. It was made by Linspire and shipped with my computer, so burning it again is not an option.

Can I download gcc already compiled somewhere for linux?
AGCurry's Avatar
Senior Member with 431 posts.
 
Join Date: Jun 2005
Location: Kansas City area
Experience: advanced but learning
09-Jan-2006, 06:19 PM #7
find / -name 'gcc' -print
find / -name 'cc' -print
aewarnick's Avatar
Senior Member with 839 posts.
 
Join Date: Sep 2002
09-Jan-2006, 06:52 PM #8
Wintergreen:/home/andrew# find / -name 'gcc' -print
/home/andrew/gcc-2.8-dist/etc/default/gcc
/home/andrew/gcc-2.8-dist/usr/local/bin/gcc
/home/andrew/gcc-2.8-dist/usr/local/lib/front-fsf/gcc
/home/gcc-4.0.2/gcc
/home/gcc-4.0.2/gcc/testsuite/ada/acats/tests/gcc
Wintergreen:/home/andrew# find / -name 'cc' -print
/usr/share/locale/l10n/cc
/home/gcc-4.0.2/gcc/testsuite/ada/acats/tests/cc
Wintergreen:/home/andrew# /usr/share/locale/l10n/cc
bash: /usr/share/locale/l10n/cc: is a directory
Wintergreen:/home/andrew# cd /usr/share/locale/l10n/cc
Wintergreen:/usr/share/locale/l10n/cc# ls
entry.desktop flag.png
Wintergreen:/usr/share/locale/l10n/cc#


The gcc you see in the list in /home is one I downloaded that I don't think will work for my system. The only gcc file is has is a gcc.sh file.
aewarnick's Avatar
Senior Member with 839 posts.
 
Join Date: Sep 2002
09-Jan-2006, 08:13 PM #9
I'm also downloading this file:
ftp://ftp.thewrittenword.com/package...4.3.rpm4.tar.Z

I'm not sure it will work either. What do you think?
AGCurry's Avatar
Senior Member with 431 posts.
 
Join Date: Jun 2005
Location: Kansas City area
Experience: advanced but learning
10-Jan-2006, 01:05 PM #10
Andrew -
The last entry in your PATH should be . , so you can run a program in the current directory.
You definitely HAVE gcc, it's just not in your PATH. Try adding
/home/andrew/gcc-2.8-dist/usr/local/bin/
to your PATH. Then, enter "gcc". You should get a message saying something like
"no input files".
Good luck.
aewarnick's Avatar
Senior Member with 839 posts.
 
Join Date: Sep 2002
10-Jan-2006, 04:09 PM #11
The only program in there that may be cc is called cc1. It's in with other programs like:
cc1obj, cc1plus, cpp.

Should I just rename it to cc?
aewarnick's Avatar
Senior Member with 839 posts.
 
Join Date: Sep 2002
10-Jan-2006, 04:22 PM #12
I may have found gcc in there in a wierd place. Let me give it a try to see if it will compile programs. I'll get back to you.
aewarnick's Avatar
Senior Member with 839 posts.
 
Join Date: Sep 2002
10-Jan-2006, 04:38 PM #13
ERROR! C compiler cannot create executables

Anyone have a gcc setup that works that you can get to me somehow?
jiml8's Avatar
Senior Member with 2,612 posts.
 
Join Date: Jul 2005
Experience: I've been at this for too long.
16-Jan-2006, 09:26 PM #14
Quote:
Originally Posted by AGCurry
Andrew -
The last entry in your PATH should be . , so you can run a program in the current directory.
You definitely HAVE gcc, it's just not in your PATH. Try adding
/home/andrew/gcc-2.8-dist/usr/local/bin/
to your PATH. Then, enter "gcc". You should get a message saying something like
"no input files".
Good luck.
NO!!

Never EVER do that!

You should NEVER have ANY directory for which you have write privileges in your path. To do so is to create a massive security hole in your system.

If you do so, you make it possible in principle for a bad guy to trick you into executing his bad program which you have inadvertantly written to a directory that is in your path.

If you want to execute a program in the current directory just invoke it with the ./ syntax. This is simple enough and prevents any possibility of a problem.

OP needs to download a compiled gcc. I think he is downloading source; lacking a c compiler, he can't compile a c compiler. I don't know where that will be found for linspire.
AGCurry's Avatar
Senior Member with 431 posts.
 
Join Date: Jun 2005
Location: Kansas City area
Experience: advanced but learning
17-Jan-2006, 10:47 AM #15
Quote:
Originally Posted by jiml8
NO!!

Never EVER do that!

You should NEVER have ANY directory for which you have write privileges in your path. To do so is to create a massive security hole in your system.

If you do so, you make it possible in principle for a bad guy to trick you into executing his bad program which you have inadvertantly written to a directory that is in your path.

If you want to execute a program in the current directory just invoke it with the ./ syntax. This is simple enough and prevents any possibility of a problem.

OP needs to download a compiled gcc. I think he is downloading source; lacking a c compiler, he can't compile a c compiler. I don't know where that will be found for linspire.
With due respect, and not to hijack the thread, that is just ridiculous.

It is true that "." should be the LAST entry in PATH, for this reason, so that you don't execute a suspect ./cat instead of /usr/bin/cat, for example.

I've been working as a professional software engineer in Unix, for many companies and the federal government, since 1987. PATH has ALWAYS included the current directory. Not to do so will hamstring you as a user and developer.
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 11:40 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.