You are not logged in.

#1 2010-02-03 16:13:19

intelligo
Member
Registered: 2010-02-03
Posts: 3

[SOLVED] configure: error: C compiler cannot create executables

I have tried to build three AUR packages, but the builds always fail with the following output:

==> Entering fakeroot environment...
==> Starting build()...
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking build system type... (cached) i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /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)... no
checking for style of include used by make... none
checking for gcc... gcc
checking for C compiler default output file name... 
configure: error: in `/home/learner/builds/tuxmath/src/tuxmath_w_fonts-1.7.2':
configure: error: C compiler cannot create executables
See `config.log' for more details.
==> ERROR: Build Failed.
    Aborting...

I could not find the indicated config.log file.

I installed all the dependencies indicated in the wiki, but I have a feeling I must be missing basic in my configuration.  Both gcc and base-devel are installed.  I've also run makepkg as root.  What amI doing wrong?

Last edited by intelligo (2010-02-04 00:33:14)

Offline

#2 2010-02-03 16:54:53

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: [SOLVED] configure: error: C compiler cannot create executables

Well, post the `config.log' from the failed build (should be at /home/learner/builds/tuxmath/src/tuxmath_w_fonts-1.7.2/config.log).

Also your /etc/makepkg.conf might help.

Offline

#3 2010-02-03 17:17:03

intelligo
Member
Registered: 2010-02-03
Posts: 3

Re: [SOLVED] configure: error: C compiler cannot create executables

Here's the config,log:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by Tux Of Math Command configure 1.7.2, which was
generated by GNU Autoconf 2.63.  Invocation command line was

  $ ./configure --prefix=/usr

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

hostname = uknow4kids
uname -m = i686
uname -r = 2.6.32-ARCH
uname -s = Linux
uname -v = #1 SMP PREEMPT Mon Jan 25 20:06:48 UTC 2010

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

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

PATH: /bin
PATH: /usr/bin
PATH: /sbin
PATH: /usr/sbin
PATH: /usr/bin/perlbin/site
PATH: /usr/bin/perlbin/vendor
PATH: /usr/bin/perlbin/core


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

configure:1951: checking build system type
configure:1969: result: i686-pc-linux-gnu
configure:1991: checking host system type
configure:2006: result: i686-pc-linux-gnu
configure:2034: checking build system type
configure:2052: result: i686-pc-linux-gnu
configure:2074: checking target system type
configure:2089: result: i686-pc-linux-gnu
configure:2134: checking for a BSD-compatible install
configure:2202: result: /bin/install -c
configure:2213: checking whether build environment is sane
configure:2256: result: yes
configure:2281: checking for a thread-safe mkdir -p
configure:2320: result: /bin/mkdir -p
configure:2333: checking for gawk
configure:2349: found /bin/gawk
configure:2360: result: gawk
configure:2371: checking whether make sets $(MAKE)
configure:2397: result: no
configure:2604: checking for style of include used by make
configure:2632: result: none
configure:2702: checking for gcc
configure:2718: found /usr/bin/gcc
configure:2729: result: gcc
configure:2961: checking for C compiler version
configure:2969: gcc --version >&5
gcc (GCC) 4.4.3
Copyright (C) 2010 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:2973: $? = 0
configure:2980: gcc -v >&5
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/usr --enable-shared --enable-languages=c,c++,fortran,objc,obj-c++,ada --enable-threads=posix --mandir=/usr/share/man --infodir=/usr/share/info --enable-__cxa_atexit --disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable-clocale=gnu --disable-libstdcxx-pch --with-tune=generic
Thread model: posix
gcc version 4.4.3 (GCC) 
configure:2984: $? = 0
configure:2991: gcc -V >&5
gcc: '-V' option must have argument
configure:2995: $? = 1
configure:3018: checking for C compiler default output file name
configure:3040: gcc -march=i686 -mtune=generic -O2 -pipe  -Wl,--hash-style=gnu -Wl,--as-needed conftest.c  >&5
gcc: error trying to exec '/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/cc1': execv: Exec format error
configure:3044: $? = 1
configure:3082: result: 
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "Tux Of Math Command"
| #define PACKAGE_TARNAME "tuxmath"
| #define PACKAGE_VERSION "1.7.2"
| #define PACKAGE_STRING "Tux Of Math Command 1.7.2"
| #define PACKAGE_BUGREPORT "tuxmath-devel@lists.sourceforge.net"
| #define PACKAGE "tuxmath"
| #define VERSION "1.7.2"
| #define PROGRAM_NAME "tuxmath"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3088: error: in `/home/learner/builds/tuxmath/src/tuxmath_w_fonts-1.7.2':
configure:3091: 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=set
ac_cv_env_CFLAGS_value='-march=i686 -mtune=generic -O2 -pipe'
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=set
ac_cv_env_LDFLAGS_value='-Wl,--hash-style=gnu -Wl,--as-needed'
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_YACC_set=
ac_cv_env_YACC_value=
ac_cv_env_YFLAGS_set=
ac_cv_env_YFLAGS_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='/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=no
ac_cv_target=i686-pc-linux-gnu

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

ACLOCAL='${SHELL} /home/learner/builds/tuxmath/src/tuxmath_w_fonts-1.7.2/missing --run aclocal-1.10'
ALLOCA=''
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='${SHELL} /home/learner/builds/tuxmath/src/tuxmath_w_fonts-1.7.2/missing --run tar'
AUTOCONF='${SHELL} /home/learner/builds/tuxmath/src/tuxmath_w_fonts-1.7.2/missing --run autoconf'
AUTOHEADER='${SHELL} /home/learner/builds/tuxmath/src/tuxmath_w_fonts-1.7.2/missing --run autoheader'
AUTOMAKE='${SHELL} /home/learner/builds/tuxmath/src/tuxmath_w_fonts-1.7.2/missing --run automake-1.10'
AWK='gawk'
BUILD_MINGW32_FALSE=''
BUILD_MINGW32_TRUE=''
CC='gcc'
CCDEPMODE=''
CFLAGS='-march=i686 -mtune=generic -O2 -pipe'
CPP=''
CPPFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR='.deps'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
GETTEXT_MACRO_VERSION=''
GMSGFMT=''
GMSGFMT_015=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
INTLLIBS=''
INTL_MACOSX_LIBS=''
LDFLAGS='-Wl,--hash-style=gnu -Wl,--as-needed'
LIBICONV=''
LIBINTL=''
LIBOBJS=''
LIBS=''
LTLIBICONV=''
LTLIBINTL=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/learner/builds/tuxmath/src/tuxmath_w_fonts-1.7.2/missing --run makeinfo'
MKDIR_P='/bin/mkdir -p'
MSGFMT=''
MSGFMT_015=''
MSGMERGE=''
NAME_VERSION='tuxmath-1.7.2'
NSIS=''
NSI_BUILD_FALSE=''
NSI_BUILD_TRUE=''
NSI_DLL_DIR=''
NSI_INSTALL_DIR=''
OBJEXT=''
PACKAGE='tuxmath'
PACKAGE_BUGREPORT='tuxmath-devel@lists.sourceforge.net'
PACKAGE_NAME='Tux Of Math Command'
PACKAGE_STRING='Tux Of Math Command 1.7.2'
PACKAGE_TARNAME='tuxmath'
PACKAGE_VERSION='1.7.2'
PATH_SEPARATOR=':'
POSUB=''
POW_LIB=''
RANLIB=''
SDL_CFLAGS=''
SDL_CONFIG=''
SDL_LIBS=''
SET_MAKE='MAKE=make'
SHELL='/bin/sh'
STRIP=''
USE_NLS=''
VERSION='1.7.2'
WINDRES=''
XGETTEXT=''
XGETTEXT_015=''
XGETTEXT_EXTRA_OPTIONS=''
YACC=''
YFLAGS=''
ac_ct_CC='gcc'
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include='#'
am__isrc=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} 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/learner/builds/tuxmath/src/tuxmath_w_fonts-1.7.2/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='/bin/mkdir -p'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target='i686-pc-linux-gnu'
target_alias=''
target_cpu='i686'
target_os='linux-gnu'
target_vendor='pc'

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

#define PACKAGE_NAME "Tux Of Math Command"
#define PACKAGE_TARNAME "tuxmath"
#define PACKAGE_VERSION "1.7.2"
#define PACKAGE_STRING "Tux Of Math Command 1.7.2"
#define PACKAGE_BUGREPORT "tuxmath-devel@lists.sourceforge.net"
#define PACKAGE "tuxmath"
#define VERSION "1.7.2"
#define PROGRAM_NAME "tuxmath"

configure: exit 77

And here's makepkg.conf:

#
# /etc/makepkg.conf
#

#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The download utilities that makepkg should use to acquire sources
#  Format: 'protocol::agent'
DLAGENTS=('ftp::/usr/bin/wget -c --passive-ftp -t 3 --waitretry=3 -O %o %u'
          'http::/usr/bin/wget -c -t 3 --waitretry=3 -O %o %u'
          'https::/usr/bin/wget -c -t 3 --waitretry=3 --no-check-certificate -O %o %u'
          'rsync::/usr/bin/rsync -z %u %o'
          'scp::/usr/bin/scp -C %u %o')

# Other common tools:
# /usr/bin/snarf
# /usr/bin/lftpget -c
# /usr/bin/curl

#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="i686"
CHOST="i686-pc-linux-gnu"

#-- Exclusive: will only run on i686
# -march (or -mcpu) builds exclusively for an architecture
# -mtune optimizes for an architecture, but builds for whole processor family
CFLAGS="-march=i686 -mtune=generic -O2 -pipe"
CXXFLAGS="-march=i686 -mtune=generic -O2 -pipe"
LDFLAGS="-Wl,--hash-style=gnu -Wl,--as-needed"
#-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2"

#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# Defaults: BUILDENV=(fakeroot !distcc color !ccache)
#  A negated environment option will do the opposite of the comments below.
#
#-- fakeroot: Allow building packages as a non-root user
#-- distcc:   Use the Distributed C/C++/ObjC compiler
#-- color:    Colorize output messages
#-- ccache:   Use ccache to cache compilation
#
BUILDENV=(fakeroot !distcc color !ccache)
#
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
#-- specify a space-delimited list of hosts running in the DistCC cluster.
#DISTCC_HOSTS=""

#########################################################################
# GLOBAL PACKAGE OPTIONS
#   These are default values for the options=() settings
#########################################################################
#
# Default: OPTIONS=(strip docs libtool emptydirs zipman purge)
#  A negated option will do the opposite of the comments below.
#
#-- strip:     Strip symbols from binaries/libraries in STRIP_DIRS
#-- docs:      Save doc directories specified by DOC_DIRS
#-- libtool:   Leave libtool (.la) files in packages
#-- emptydirs: Leave empty directories in packages
#-- zipman:    Compress manual (man and info) pages in MAN_DIRS with gzip
#-- purge:     Remove files specified by PURGE_TARGETS
#
OPTIONS=(strip docs libtool emptydirs zipman purge)

#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
INTEGRITY_CHECK=(md5)
#-- Manual (man and info) directories to compress (if zipman is specified)
MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
#-- Doc directories to remove (if !docs is specified)
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
#-- Directories to be searched for the strip option (if strip is specified)
STRIP_DIRS=(bin lib sbin usr/{bin,lib,sbin,local/{bin,lib,sbin}} opt/*/{bin,lib,sbin})
#-- Files to be removed from all packages (if purge is specified)
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)

#########################################################################
# PACKAGE OUTPUT
#########################################################################
#
# Default: put built package and cached source in build directory
#
#-- Destination: specify a fixed directory where all packages will be placed
#PKGDEST=/home/packages
#-- Source cache: specify a fixed directory where source files will be cached
#SRCDEST=/home/sources
#-- Packager: name/email of the person or organization building packages
#PACKAGER="John Doe <john@doe.com>"

#########################################################################
# EXTENSION DEFAULTS
#########################################################################
#
# WARNING: Do NOT modify these variables unless you know what you are
#          doing.
#
PKGEXT='.pkg.tar.gz'
SRCEXT='.src.tar.gz'

# vim: set ft=sh ts=2 sw=2 et:

Thanks for your help!

Offline

#4 2010-02-03 22:11:00

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: [SOLVED] configure: error: C compiler cannot create executables

This is the offending line from config.log

gcc: error trying to exec '/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/cc1': execv: Exec format error

It looks like your gcc package is corrupted, or has the wrong architecture (i686 instead of x86-64, for example).  Try "pacman -Sf gcc".

Last edited by tavianator (2010-02-03 22:12:03)

Offline

#5 2010-02-04 00:31:57

intelligo
Member
Registered: 2010-02-03
Posts: 3

Re: [SOLVED] configure: error: C compiler cannot create executables

Thanks, tavianator!  Both my gcc and base-devel were somehow corrupted, but after forcing a reinstall my builds are going along nicely.

Offline

Board footer

Powered by FluxBB