Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't get c complier to create executables

Status
Not open for further replies.

john99999

Instructor
Apr 29, 2005
73
US
I get this error even though I have gcc
configure: error: C compiler cannot create executable

linux:~/ettercap-NG-0.7.2 # which gcc
/usr/bin/gcc
linux:~/ettercap-NG-0.7.2 # rpm -q gcc
gcc-3.3.4-11
linux:~/ettercap-NG-0.7.2 # ./configure
checking whether to enable maintainer-specific portions of Makefiles... no

Configuring ettercap NG-0.7.2...

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
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.
linux:~/ettercap-NG-0.7.2 #

When I look at config.log:
Is it saying its not working because it can't find the file conftest.c ? How do I get that file?

Using built-in specs.
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada --disable-checking --libdir=/usr/lib --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i586-suse-linux
Thread model: posix
gcc version 3.3.4 (pre 3.3.5 20040809)
configure:2808: $? = 0
configure:2810: gcc -V </dev/null >&5
gcc: `-V' option must have argument
configure:2813: $? = 1
configure:2836: checking for C compiler default output file name
configure:2839: gcc conftest.c >&5
gcc: installation problem, cannot exec `cc1': No such file or directory
configure:2842: $? = 1
configure: failed program was:
| /* confdefs.h. */
 
It's not gcc, it's the configure script.

gcc -V version-number

says to run version-number of gcc if it is installed (gcc --help told me that).

Your configure script is calling gcc incorrectly.
 
It should be a lower case v?
linux:~/ettercap-NG-0.7.2 # gcc -v
Using built-in specs.
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada --disable-checking --libdir=/usr/lib --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i586-suse-linux
Thread model: posix
gcc version 3.3.4 (pre 3.3.5 20040809)
 
The problem isn't a lack of [tt]conftest.c[/tt]. There's no indication that such a file is not present.

[tt]configure[/tt] just can't find the actual compiler [tt]cc1[/tt] (which should be in something like [tt]/usr/lib/gcc/target-triplet/version-number[/tt]). This is probably because the [tt]gcc -V[/tt] command is failing, but could be a separate issue.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top