LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   No acceptable C compiler? (https://www.linuxquestions.org/questions/linux-newbie-8/no-acceptable-c-compiler-298909/)

fugufondue 03-07-2005 07:44 PM

No acceptable C compiler?
 
I am trying to install LAME 3.96.1 on my computer from a tar.gz file. After running tar -zvxf on the tarball I change to its directory and type ./configure (as per the INSTALL instructions) and I get the following error from the config.log:

hostname = localhost
uname -m = i686
uname -r = 2.6.8.1-12mdk
uname -s = Linux
uname -v = #1 Fri Oct 1 12:53:41 CEST 2004

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = i686
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /sbin
PATH: /usr/sbin
PATH: /bin
PATH: /usr/bin
PATH: /usr/X11R6/bin
PATH: /usr/local/bin
PATH: /usr/local/sbin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1526: checking build system type
configure:1544: result: i686-pc-linux-gnu
configure:1552: checking host system type
configure:1566: result: i686-pc-linux-gnu
configure:1588: checking for a BSD-compatible install
configure:1642: result: /usr/bin/install -c
configure:1653: checking whether build environment is sane
configure:1696: result: yes
configure:1729: checking for gawk
configure:1745: found /bin/gawk
configure:1755: result: gawk
configure:1765: checking whether make sets $(MAKE)
configure:1785: result: yes
configure:1951: checking whether to enable maintainer-specific portions of Makefiles
configure:1960: result: no
configure:1982: checking for style of include used by make
configure:2010: result: GNU
configure:2087: checking for gcc
configure:2116: result: no
configure:2167: checking for cc
configure:2196: result: no
configure:2209: checking for cc
configure:2255: result: no
configure:2308: checking for cl
configure:2337: result: no
configure:2351: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

***********************
Seeing that there was no C compiler available, I tried to install the gcc 3.4.1-4 rpm (from rpmfind.net) but the installer says the packages are already installed. Why is the ./configure command not finding the proper PATH to gcc or cc or cl or whatever it needs and how do I fix it?

Thank you in advance.

KurtAKARebuild 03-07-2005 07:57 PM

try running the gcc command on its own, it should complain about no input files, like:

$ gcc
gcc: no input files

in this case type 'which gcc' and then make sure that location is in your path environment variable.

if gcc doesn't complain but instead bash complains about not finding gcc then try

$ find / -name gcc | less

that should locate your gcc binary, then, as above, make sure that location is in your path.

good luck

Kurt

mjjzf 03-08-2005 02:16 AM

It is probably the Path, which isn't setup corerctly. Check this.

fugufondue 03-08-2005 04:17 PM

Quote:

Originally posted by KurtAKARebuild
try running the gcc command on its own, it should complain about no input files, like:

$ gcc
gcc: no input files

in this case type 'which gcc' and then make sure that location is in your path environment variable.

if gcc doesn't complain but instead bash complains about not finding gcc then try

$ find / -name gcc | less

Kurt

Kurt,

Thanks for your response. When type gcc at the root command prompt I get this message:

bash: gcc: command not found

When I type find / -name gcc | less as root, the console prints many lines of nothing or single ~'s and the console is locked up. The last line says: line ?-?/? (END). When I type locate gcc at the prompt I get results fom the following directories (Some entries are incomplete, but noted, because I don't know where to find my console logs to copy and paste the info from):

/usr/share/ghostscript (several enties here)
/usr/lib/perl5/i386-linux-thread-multi/linux/compiler-gcc+.ph
/usr/lib/perl5/i386-linux-thread-multi/linux/compiler-gcc.ph
/usr/lib/perl5/i386-linux-thread-multi/linux/compiler-gcc2.ph
/usr/lib/perl5/i386-linux-thread-multi/linux/compiler-gcc3.ph
/usr/lib/gcc-libusr/lib/gcc-lib/i586-mandrake-linux-gnu
/usr/lib/gcc-libusr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96
/usr/lib/gcc-libusr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/include
/usr/lib/gcc-libusr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/cpp0
/usr/lib/openoffice/program/ (several enteries here)
/usr/lib/jdk-1/4/2_05/jre/plugin/i386/ns610-gcc32
/usr/lib/jdk-1/4/2_05/jre/plugin/i386/ns610-gcc32/libjavaplugin_oji.so
/usr/X11R8/man/man1/gccmakedep.1x.bz2
/lib/libgcc_s-3.4.1.so.1
/lib/libgcc_s.so.1


Is the binary here somewhere and how do identify it? Also, once I find it how do I make it part of the PATH?

Thank you.

fugufondue 03-08-2005 04:30 PM

Quote:

Originally posted by OSourceDiplomat
It is probably the Path, which isn't setup corerctly. Check this.
Diplomat,

Thank you for your help, but I'm quite dense when it comes to Linux as I am very new at this. I read the thread you posted, but I'm not exact sure how it applied to my situation. Are the commands PKG_CONFIG_PATH and export PKG_CONFIG_PATH what I should be using to set the PATH for the gcc libraries once (I figure out where and what they are) so that the LAME installation can find a compiler? Also, by changing the PATH will this affect other programs?

Thanks for your patience.

wpn146 03-08-2005 05:03 PM

Try:

Code:

rpm -qa | grep "^gcc-"
On my Redhat 9 system, this produces:
Code:

bash-2.05b$ rpm -qa | grep "^gcc-"
gcc-c++-3.2.2-5
gcc-3.2.2-5
gcc-g77-3.2.2-5
gcc-java-3.2.2-5
gcc-gnat-3.2.2-5

Having located the fact that gcc-3.2.2-5 is installed, try:
Code:

rpm -ql gcc-3.2.2-5 | grep "gcc$"
(substituting the actual version numbers.) On my Redhat 9 system, this produces:
Code:

bash-2.05b$ rpm -ql gcc-3.2.2-5 | grep "gcc$"
/usr/bin/gcc
/usr/bin/i386-redhat-linux-gcc

I don't know why Redhat puts /usr/bin/i386-redhat-linux-gcc, but it is identical with /usr/bin/gcc.

Then use the "ls" command to verify that gcc is where the package thinks it is. It is possible that the gcc package was installed but someone deleted gcc manually?

Now, after you have located gcc, you should verify that it is actually able to compile a program, for example the simple "Hello, World" program found in all C texts. The reason for this is that ./configure does this to verify that the gcc it finds is actually able to compile a program. If you are missing the assembler (as) or the linker (ld), it will complain about it not being able to find an acceptable C compiler.

fbsmith 03-22-2005 08:05 PM

No C Compiler
 
I'm a newby at this and had the same problem with respect to the "configure: error: no acceptable C compiler found in $PATH"

I tries all of the above to no avail. So I went in to "Add and Remove Programs" and wen through every package untill I found where gcc was. (It was under the Administration Tools - which I had not installed)
I installed the package and life was grand.

This can be very frustrating for new users.


All times are GMT -5. The time now is 07:05 PM.