You are not logged in.

#1 2012-03-08 12:27:45

karbon
Member
Registered: 2010-06-29
Posts: 17

[SOLVED]C compiler cannot create executables DUE TO MISSING DEV. PACKS

Hi there, I was trying to build "lib32-libpcap" from AUR using yaourt when the gcc(?) reported an error as following:

==> Starting build()...
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... gcc -m32
checking for C compiler default output file name... 
configure: error: C compiler cannot create executables
See `config.log' for more details.
==> ERROR: A failure occurred in build().
    Aborting...

The content of the "config.log" file:

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

It was created by configure, which was
generated by GNU Autoconf 2.61.  Invocation command line was

  $ ./configure --prefix=/usr --libdir=/usr/lib32 --enable-ipv6

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

hostname = mzws
uname -m = x86_64
uname -r = 3.2.8-1-ARCH
uname -s = Linux
uname -v = #1 SMP PREEMPT Mon Feb 27 21:51:46 CET 2012

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

/bin/arch              = x86_64
/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/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/local/sbin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/bin/core_perl


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

configure:1794: checking build system type
configure:1812: result: x86_64-unknown-linux-gnu
configure:1834: checking host system type
configure:1849: result: x86_64-unknown-linux-gnu
configure:1871: checking target system type
configure:1886: result: x86_64-unknown-linux-gnu
configure:2036: checking for gcc
configure:2063: result: gcc -m32
configure:2301: checking for C compiler version
configure:2308: gcc -m32 --version >&5
gcc (GCC) 4.6.2 20120120 (prerelease)
Copyright (C) 2011 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:2311: $? = 0
configure:2318: gcc -m32 -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/src/gcc-4.6-20120120/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --enable-libstdcxx-time --enable-gnu-unique-object --enable-linker-build-id --with-ppl --enable-cloog-backend=isl --enable-lto --enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold --disable-multilib --disable-libssp --enable-checking=release
Thread model: posix
gcc version 4.6.2 20120120 (prerelease) (GCC) 
configure:2321: $? = 0
configure:2328: gcc -m32 -V >&5
gcc: error: unrecognized option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2331: $? = 1
configure:2354: checking for C compiler default output file name
configure:2381: gcc -m32 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2  -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu conftest.c  >&5
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: skipping incompatible /usr/lib/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
configure:2384: $? = 1
configure:2422: result: 
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:2429: error: C compiler cannot create executables
See `config.log' for more details.

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

ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_env_CC_set=set
ac_cv_env_CC_value='gcc -m32'
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2'
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,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu
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=x86_64-unknown-linux-gnu
ac_cv_prog_ac_ct_CC='gcc -m32'
ac_cv_target=x86_64-unknown-linux-gnu

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

ADDLARCHIVEOBJS=''
ADDLOBJS=''
BT_SRC=''
CAN_SRC=''
CC='gcc -m32'
CFLAGS='-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2'
CPP=''
CPPFLAGS=''
DEFS=''
DYEXT=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
GREP=''
HAVE_LINUX_TPACKET_AUXDATA=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
LDFLAGS='-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu'
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MAN_FILE_FORMATS=''
MAN_MISC_INFO=''
OBJEXT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PCAP_SUPPORT_BT=''
PCAP_SUPPORT_CAN=''
PCAP_SUPPORT_USB=''
RANLIB=''
SHELL='/bin/sh'
SHLICC2=''
SSRC=''
USB_SRC=''
V_CCOPT='-O'
V_DEFS=''
V_FINDALLDEVS=''
V_INCLS=''
V_LEX=''
V_PCAP=''
V_RPATH_OPT=''
V_SHLIB_CMD=''
V_SHLIB_OPT=''
V_SONAME_OPT=''
V_YACC=''
ac_ct_CC='gcc -m32'
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='unknown'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
host='x86_64-unknown-linux-gnu'
host_alias=''
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='/usr/lib32'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
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='x86_64-unknown-linux-gnu'
target_alias=''
target_cpu='x86_64'
target_os='linux-gnu'
target_vendor='unknown'

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

#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""

configure: exit 77

and the makepkg.conf:

#
# /etc/makepkg.conf
#

#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The download utilities that makepkg should use to acquire sources
#  Format: 'protocol::agent'
DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
          'http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u'
          'https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -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/wget

#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="x86_64"
CHOST="x86_64-unknown-linux-gnu"

#-- Compiler and Linker Flags
# -march (or -mcpu) builds exclusively for an architecture
# -mtune optimizes for an architecture, but builds for whole processor family
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu"
#-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2"

#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# Defaults: BUILDENV=(fakeroot !distcc color !ccache check !sign)
#  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
#-- check:    Run the check() function if present in the PKGBUILD
#-- sign:     Generate PGP signature file
#
BUILDENV=(fakeroot !distcc color !ccache check !sign)
#
#-- 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=""
#
#-- Specify a directory for package building.
#BUILDDIR=/tmp/makepkg

#########################################################################
# GLOBAL PACKAGE OPTIONS
#   These are default values for the options=() settings
#########################################################################
#
# Default: OPTIONS=(strip docs libtool emptydirs zipman purge !upx)
#  A negated option will do the opposite of the comments below.
#
#-- strip:     Strip symbols from binaries/libraries
#-- 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
#-- upx:       Compress binary executable files using UPX
#
OPTIONS=(strip docs libtool emptydirs zipman purge !upx)

#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
INTEGRITY_CHECK=(md5)
#-- Options to be used when stripping binaries. See `man strip' for details.
STRIP_BINARIES="--strip-all"
#-- Options to be used when stripping shared libraries. See `man strip' for details.
STRIP_SHARED="--strip-unneeded"
#-- Options to be used when stripping static libraries. See `man strip' for details.
STRIP_STATIC="--strip-debug"
#-- 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})
#-- 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
#-- Source packages: specify a fixed directory where all src packages will be placed
#SRCPKGDEST=/home/srcpackages
#-- Packager: name/email of the person or organization building packages
#PACKAGER="John Doe <john@doe.com>"
#-- Specify a key to use for package signing
#GPGKEY=""

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

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

Am running a up-to-date x64 Arch with [multilib] enabled; perhaps it's a silly mistake I made somewhere but I'm no dev and so cannot figure out what went wrong in the config.log....please help with your kindness and thanks in advance!

Last edited by karbon (2012-03-10 04:28:58)

Offline

#2 2012-03-08 13:15:19

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,408
Website

Re: [SOLVED]C compiler cannot create executables DUE TO MISSING DEV. PACKS

Are you really up-to-date?   gcc-4.6.3 was put in [core] four days ago but you still seem to have 4.6.2.

Offline

#3 2012-03-08 19:24:54

stronnag
Member
Registered: 2011-01-25
Posts: 39

Re: [SOLVED]C compiler cannot create executables DUE TO MISSING DEV. PACKS

If you have multilib and testing enabled, you also need  multilib-testing, otherwise (as I know from bitter experience), you get these hard to track down errors.

Offline

#4 2012-03-09 09:42:31

karbon
Member
Registered: 2010-06-29
Posts: 17

Re: [SOLVED]C compiler cannot create executables DUE TO MISSING DEV. PACKS

Thanks for your replies:)

Allan wrote:

Are you really up-to-date?   gcc-4.6.3 was put in [core] four days ago but you still seem to have 4.6.2.

Well...at least as up-to-date as on March 2nd(when I did last system-wide upgrade); trying to update system tonight to see whether this works.

stronnag wrote:

If you have multilib and testing enabled, you also need  multilib-testing, otherwise (as I know from bitter experience), you get these hard to track down errors.

Nope I didn't enable [testing]; I've discovered some packages in [multilib], namely gcc-multilib or something similar(with the -multilib subfix) and some of these packages belong to the group "multilib-devel". Is installing these packages a must for compiling 32-bit packages?

Offline

#5 2012-03-09 09:51:36

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,408
Website

Re: [SOLVED]C compiler cannot create executables DUE TO MISSING DEV. PACKS

karbon wrote:

I've discovered some packages in [multilib], namely gcc-multilib or something similar(with the -multilib subfix) and some of these packages belong to the group "multilib-devel". Is installing these packages a must for compiling 32-bit packages?


Yes, you need the multilib version of gcc to build 32bit packages on your 64 bit system.

Offline

#6 2012-03-09 10:23:16

karbon
Member
Registered: 2010-06-29
Posts: 17

Re: [SOLVED]C compiler cannot create executables DUE TO MISSING DEV. PACKS

Allan wrote:

Yes, you need the multilib version of gcc to build 32bit packages on your 64 bit system.

So installing the whole multilib-devel group? Thanks for pointing out that, more feedback after updating.

Offline

#7 2012-03-10 04:27:35

karbon
Member
Registered: 2010-06-29
Posts: 17

Re: [SOLVED]C compiler cannot create executables DUE TO MISSING DEV. PACKS

OK problem solved; multilib-devel is needed; thanks for all your helps!:)

Offline

#8 2012-04-24 05:22:20

wunjo
Member
Registered: 2011-04-06
Posts: 17

Re: [SOLVED]C compiler cannot create executables DUE TO MISSING DEV. PACKS

I have the same problem, but installing multilib-devel didn't helped

Edit: never mind, updating the whole system fixed this, sorry for futile post hmm

Last edited by wunjo (2012-04-24 05:23:48)

Offline

Board footer

Powered by FluxBB