LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 05-15-2015, 03:18 PM   #1
Grimlock!
LQ Newbie
 
Registered: May 2015
Posts: 6

Rep: Reputation: Disabled
C compiler cannot create executables


Hello everyone,

I recently installed AntiX debian Linux on an old IBM thinkpad T42. I have been trying to install some software using tar files but I kept getting the error the the C compiler cannot create executables. Can anyone help me out. Here is an example of the error. I do not know if the config.log details will help but i will post them if it will help.

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for ar... ar
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/grimlock/Desktop/tor-0.2.4.27':
configure: error: C compiler cannot create executables
See `config.log' for more details
 
Old 05-15-2015, 03:41 PM   #2
jhekkanen
LQ Newbie
 
Registered: Dec 2014
Location: Finland
Posts: 3

Rep: Reputation: Disabled
Hi, from Thinkpad T41

I think that the log file will be needed or at least the actual error messages
from the compiler test. More details are needed because so many things can go
wrong and cause problems.

Maybe try to compile a simple helloworld and see if that works ok:

Code:
bash-4.2$ cat hello.c 
#include <stdio.h>

int main(void) {
	printf("hello world\n");
	return 0;
}
bash-4.2$ gcc hello.c -o hello
bash-4.2$ ./hello
hello world
It that doesn't work then maybe install the build-essential package from apt. That should pull
in the most common tools.

But the best way forward would be to post the content of the config.log, as more details are really needed here.
 
Old 05-15-2015, 05:05 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,819

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
how did you install GCC ?
did you also install everything gcc NEEDS ,as in did you also install autotools ?

If you did not install "build-essential" do so it is needed
 
Old 05-15-2015, 06:07 PM   #4
anticapitalista
Member
 
Registered: May 2005
Location: Greece
Distribution: antiX using herbstluftwm, fluxbox, IceWM and jwm.
Posts: 350

Rep: Reputation: 86
apt-get install tor
 
Old 05-15-2015, 09:31 PM   #5
Grimlock!
LQ Newbie
 
Registered: May 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks for the help guys but I cant install build-essential either. Here is the config.log. Maybe I should reinstall Antix? I am using the default GCC that comes with AntiX.


It was created by tor configure 0.2.4.27, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = antiX1
uname -m = i686
uname -r = 3.7.10-antix.5-486-smp
uname -s = Linux
uname -v = #2 SMP Tue Oct 15 20:58:22 EEST 2013

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

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

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


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

configure:2668: checking for a BSD-compatible install
configure:2736: result: /usr/bin/install -c
configure:2747: checking whether build environment is sane
configure:2802: result: yes
configure:2953: checking for a thread-safe mkdir -p
configure:2992: result: /bin/mkdir -p
configure:2999: checking for gawk
configure:3015: found /usr/bin/gawk
configure:3026: result: gawk
configure:3037: checking whether make sets $(MAKE)
configure:3059: result: yes
configure:3088: checking whether make supports nested variables
configure:3105: result: yes
configure:3241: checking whether make supports nested variables
configure:3258: result: yes
configure:3276: checking build system type
configure:3290: result: i686-pc-linux-gnu
configure:3310: checking host system type
configure:3323: result: i686-pc-linux-gnu
configure:3602: checking for ar
configure:3618: found /usr/bin/ar
configure:3629: result: ar
configure:3700: checking for gcc
configure:3716: found /usr/bin/gcc
configure:3727: result: gcc
configure:3956: checking for C compiler version
configure:3965: gcc --version >&5
gcc (Debian 4.7.2-5) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3976: $? = 0
configure:3965: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i486-linux-gnu/4.7/lto-wrapper
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-5)
configure:3976: $? = 0
configure:3965: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3976: $? = 4
configure:3965: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3976: $? = 4
configure:3996: checking whether the C compiler works
configure:4018: gcc -I${top_srcdir}/src/common conftest.c >&5
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: cannot find -lc
/usr/bin/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
configure:4022: $? = 1
configure:4060: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "tor"
| #define PACKAGE_TARNAME "tor"
| #define PACKAGE_VERSION "0.2.4.27"
| #define PACKAGE_STRING "tor 0.2.4.27"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "tor"
| #define VERSION "0.2.4.27"
| #define ENABLE_BUF_FREELISTS 1
| #define ENABLE_THREADS 1
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:4065: error: in `/home/grimlock/Desktop/tor-0.2.4.27':
configure:4067: error: C compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i686-pc-linux-gnu
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=i686-pc-linux-gnu
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_AR=ar
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes
am_cv_make_support_nested_variables=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

A2X=''
ACLOCAL='${SHELL} /home/grimlock/Desktop/tor-0.2.4.27/missing aclocal-1.14'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='0'
AM_V='$(V)'
AR='ar'
ASCIIDOC=''
AUTOCONF='${SHELL} /home/grimlock/Desktop/tor-0.2.4.27/missing autoconf'
AUTOHEADER='${SHELL} /home/grimlock/Desktop/tor-0.2.4.27/missing autoheader'
AUTOMAKE='${SHELL} /home/grimlock/Desktop/tor-0.2.4.27/missing automake-1.14'
AWK='gawk'
BINDIR=''
BUILDDIR=''
BUILD_CURVE25519_DONNA_C64_FALSE=''
BUILD_CURVE25519_DONNA_C64_TRUE=''
BUILD_CURVE25519_DONNA_FALSE=''
BUILD_CURVE25519_DONNA_TRUE=''
BUILD_NT_SERVICES_FALSE=''
BUILD_NT_SERVICES_TRUE=''
CC='gcc'
CCDEPMODE=''
CFLAGS=''
CONFDIR=''
CPP=''
CPPFLAGS=' -I${top_srcdir}/src/common'
CURVE25519_ENABLED_FALSE=''
CURVE25519_ENABLED_TRUE=''
CURVE25519_LIBS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LOCALSTATEDIR=''
LOGFACILITY=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/grimlock/Desktop/tor-0.2.4.27/missing makeinfo'
MINIUPNPC_FALSE=''
MINIUPNPC_TRUE=''
MKDIR_P='/bin/mkdir -p'
NAT_PMP_FALSE=''
NAT_PMP_TRUE=''
OBJEXT=''
OPENSSL=''
PACKAGE='tor'
PACKAGE_BUGREPORT=''
PACKAGE_NAME='tor'
PACKAGE_STRING='tor 0.2.4.27'
PACKAGE_TARNAME='tor'
PACKAGE_URL=''
PACKAGE_VERSION='0.2.4.27'
PATH_SEPARATOR=':'
RANLIB=''
SED=''
SET_MAKE=''
SHA1SUM=''
SHELL='/bin/bash'
STRIP=''
TORGROUP=''
TORUSER=''
TOR_CPPFLAGS_libevent=''
TOR_CPPFLAGS_libminiupnpc=''
TOR_CPPFLAGS_libnatpmp=''
TOR_CPPFLAGS_openssl=''
TOR_CPPFLAGS_zlib=''
TOR_LDFLAGS_libevent=''
TOR_LDFLAGS_libminiupnpc=''
TOR_LDFLAGS_libnatpmp=''
TOR_LDFLAGS_openssl=''
TOR_LDFLAGS_zlib=''
TOR_LIBEVENT_LIBS=''
TOR_LIB_GDI=''
TOR_LIB_IPHLPAPI=''
TOR_LIB_MATH=''
TOR_LIB_WS32=''
TOR_OPENSSL_LIBS=''
TOR_ZLIB_LIBS=''
USE_ASCIIDOC_FALSE=''
USE_ASCIIDOC_TRUE=''
USE_BUFFEREVENTS_FALSE=''
USE_BUFFEREVENTS_TRUE=''
USE_EXTERNAL_EVDNS_FALSE=''
USE_EXTERNAL_EVDNS_TRUE=''
USE_FW_HELPER_FALSE=''
USE_FW_HELPER_TRUE=''
USE_OPENBSD_MALLOC_FALSE=''
USE_OPENBSD_MALLOC_TRUE='#'
VERSION='0.2.4.27'
ac_ct_CC='gcc'
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include=''
am__isrc=''
am__leading_dot='.'
am__nodep=''
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build='i686-pc-linux-gnu'
build_alias=''
build_cpu='i686'
build_os='linux-gnu'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='i686-pc-linux-gnu'
host_alias=''
host_cpu='i686'
host_os='linux-gnu'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /home/grimlock/Desktop/tor-0.2.4.27/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "tor"
#define PACKAGE_TARNAME "tor"
#define PACKAGE_VERSION "0.2.4.27"
#define PACKAGE_STRING "tor 0.2.4.27"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define PACKAGE "tor"
#define VERSION "0.2.4.27"
#define ENABLE_BUF_FREELISTS 1
#define ENABLE_THREADS 1

configure: exit 77
 
Old 05-15-2015, 10:09 PM   #6
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Here is the error message from that text...

Code:
configure:4018: gcc -I${top_srcdir}/src/common conftest.c >&5
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: cannot find -lc
/usr/bin/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
libc is the standard C library; not being able to find it indicates a very broken build toolchain. You need to answer John VV's questions about how you installed gcc. Why can't you install build-essential? What error message do you get?
 
Old 05-15-2015, 10:32 PM   #7
Grimlock!
LQ Newbie
 
Registered: May 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
I am using the version of GCC that was installed when I installed AntiX

grimlock@antiX1:~
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i486-linux-gnu/4.7/lto-wrapper
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-5)
 
Old 05-15-2015, 10:37 PM   #8
Grimlock!
LQ Newbie
 
Registered: May 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
This is what I get when I try to get build essential

root@antiX1:/home/grimlock# apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package build-essential is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'build-essential' has no installation candidate
 
Old 05-15-2015, 11:18 PM   #9
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
You might try doing an "apt-get update" and then trying to do "apt-get install build-essential" again.
 
Old 05-16-2015, 04:40 AM   #10
anticapitalista
Member
 
Registered: May 2005
Location: Greece
Distribution: antiX using herbstluftwm, fluxbox, IceWM and jwm.
Posts: 350

Rep: Reputation: 86
If you are using antiX-13.2 you should upgrade the kernel.

see post 12 November, 2013.

http://antix.mepis.org/index.php?title=Main_Page
 
Old 05-16-2015, 08:39 AM   #11
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,604

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Part of the problem is that the configure script is a bit out of date based on the tests done for version checks for gcc.

You might try using "autoconf -f" if there is a configure.in present (there should be one). Sometimes this can fix such things - but not always. The problem may be in a macro carried along with the package.
 
Old 05-17-2015, 12:48 AM   #12
Grimlock!
LQ Newbie
 
Registered: May 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
Ok I got it to work! What I needed to do was delete the text sudo apt-get update in the /etc/apt/sources-list.d/momo-xamarin.list file. After that I was able to install build essential. Thanks for the help everyone
 
  


Reply


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
C compiler cannot create executables Bazbo Linux - Software 5 11-21-2006 02:05 AM
C compiler cannot create executables alexweb Mandriva 2 07-12-2006 08:04 AM
c compiler cannot create executables karphead Slackware 8 09-30-2005 11:20 PM
C++ compiler cannot create executables IceStorm Linux - Newbie 6 06-14-2004 02:45 AM
C compiler cannot create executables shams Linux - Software 6 06-12-2004 02:55 PM


All times are GMT -5. The time now is 03:09 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration