Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

binutils-2.19.51.0.2: configure: C compiler cannot create executables

3 views
Skip to first unread message

Mark Hobley

unread,
Mar 9, 2009, 1:08:02 PM3/9/09
to
I am trying to compile binutils-2.19.51.0.2 for a stage 0 scratch build.

I have the unpacked sources in ~/binutils-2.19.51.0.2

I now:

cd
mkdir binutils-build
../binutils-2.19.51.0.2/configure --target=$TGT --build='i386-pc-linux'
--prefix=/tools --disable-nls --disable-werror

checking build system type... i386-pc-linux-gnu
checking host system type... i386-pc-linux-gnu
checking target system type... i386-lfs-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output file name... configure: error: in
`/home/lfs/binutils-build':
configure: error: C compiler cannot create executables
See `config.log' for more details.

cat 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 configure, which was
generated by GNU Autoconf 2.59. Invocation command line was

$ ../binutils-2.19.51.0.2/configure --target=i386-lfs-linux-gnu
--build=i386-p
c-linux --prefix=/tools --disable-nls --disable-werror

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

hostname = lfslivecd
uname -m = i386
uname -r = 2.6.22.5
uname -s = Linux
uname -v = #1 SMP Thu Nov 29 07:53:26 GMT 2007

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

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

PATH: /tools/bin
PATH: /bin
PATH: /usr/bin


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

configure:1562: checking build system type
configure:1580: result: i386-pc-linux-gnu
configure:1615: checking host system type
configure:1629: result: i386-pc-linux-gnu
configure:1637: checking target system type
configure:1651: result: i386-lfs-linux-gnu
configure:1695: checking for a BSD-compatible install
configure:1761: result: /usr/bin/install -c
configure:1772: checking whether ln works
configure:1794: result: yes
configure:1798: checking whether ln -s works
configure:1802: result: yes
configure:3001: checking for gcc
configure:3017: found /usr/bin/gcc
configure:3027: result: gcc
configure:3273: checking for C compiler version
configure:3276: gcc --version </dev/null >&5
gcc (GCC) 4.1.2
Copyright (C) 2006 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:3279: $? = 0
configure:3281: gcc -v </dev/null >&5
Using built-in specs.
Target: i486-pc-linux-gnu
Configured with: ../gcc-4.1.2/configure --prefix=/usr
--libexecdir=/usr/lib --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++
--enable-static --disable-multilib
Thread model: posix
gcc version 4.1.2
configure:3284: $? = 0
configure:3286: gcc -V </dev/null >&5
gcc: '-V' option must have argument
configure:3289: $? = 1
configure:3312: checking for C compiler default output file name
configure:3315: gcc -march=i386 -Wa,-march=i386 conftest.c >&5
as: unrecognized option `-march=i386'
configure:3318: $? = 1
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:3356: error: in `/home/lfs/binutils-build':
configure:3359: error: C compiler cannot create executables
See `config.log' for more details.

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

ac_cv_build=i386-pc-linux-gnu
ac_cv_build_alias=i386-pc-linux
ac_cv_env_AR_FOR_TARGET_set=
<snip> They all=

ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-march=i386 -Wa,-march=i386'
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value='-march=i386 -Wa,-march=i386'
ac_cv_env_CXX_FOR_TARGET_set=
<snip> They all=

ac_cv_env_WINDRES_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=i386-pc-linux
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=set
ac_cv_env_target_alias_value=i386-lfs-linux-gnu
ac_cv_host=i386-pc-linux-gnu
ac_cv_host_alias=i386-pc-linux
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_ac_ct_CC=gcc
ac_cv_target=i386-lfs-linux-gnu
ac_cv_target_alias=i386-lfs-linux-gnu
acx_cv_prog_LN=ln

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

AR=''
AR_FOR_BUILD='$(AR)'
AR_FOR_TARGET=''
AS=''
AS_FOR_BUILD='$(AS)'
AS_FOR_TARGET=''
BISON=''
CC='gcc'
CC_FOR_BUILD='$(CC)'
CC_FOR_TARGET=''
CFLAGS='-march=i386 -Wa,-march=i386'
CFLAGS_FOR_BUILD=''
CFLAGS_FOR_TARGET=''
COMPILER_AS_FOR_TARGET=''
COMPILER_LD_FOR_TARGET=''
COMPILER_NM_FOR_TARGET=''
CONFIGURE_GDB_TK=''
CPPFLAGS=''
CXX=''
CXXFLAGS='-march=i386 -Wa,-march=i386'
CXXFLAGS_FOR_BUILD=''
CXXFLAGS_FOR_TARGET=''
CXX_FOR_BUILD='$(CXX)'
CXX_FOR_TARGET=''
DEBUG_PREFIX_CFLAGS_FOR_TARGET=''
DEFS=''
DLLTOOL=''
DLLTOOL_FOR_BUILD='$(DLLTOOL)'
DLLTOOL_FOR_TARGET=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
EXPECT=''
FLAGS_FOR_TARGET=''
FLEX=''
GCC_FOR_TARGET=''
GCC_SHLIB_SUBDIR=''
GCJ_FOR_BUILD='$(GCJ)'
GCJ_FOR_TARGET=''
GDB_TK=''
GFORTRAN_FOR_BUILD='$(GFORTRAN)'
GFORTRAN_FOR_TARGET=''
GNATBIND=''
GNATMAKE=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_GDB_TK=''
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
LD=''
LDFLAGS=''
LDFLAGS_FOR_BUILD=''
LD_FOR_BUILD='$(LD)'
LD_FOR_TARGET=''
LEX=''
LIBOBJS=''
LIBS=''
LIPO=''
LIPO_FOR_TARGET=''
LN='ln'
LN_S='ln -s'
LTLIBOBJS=''
M4=''
MAINT=''
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE=''
MAKEINFO=''
NM=''
NM_FOR_BUILD='$(NM)'
NM_FOR_TARGET=''
OBJCOPY=''
OBJDUMP=''
OBJDUMP_FOR_TARGET=''
OBJEXT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB=''
RANLIB_FOR_BUILD='$(RANLIB)'
RANLIB_FOR_TARGET=''
RAW_CXX_FOR_TARGET=''
RPATH_ENVVAR=''
RUNTEST=''
SHELL='/bin/sh'
STRIP=''
STRIP_FOR_TARGET=''
SYSROOT_CFLAGS_FOR_TARGET=''
TOPLEVEL_CONFIGURE_ARGUMENTS='../binutils-2.19.51.0.2/configure
--target=i386-lfs-linux-gnu --build=i386-pc-linux --prefix=/tools
--disable-nls --disable-werror'
WINDMC=''
WINDMC_FOR_BUILD='$(WINDMC)'
WINDMC_FOR_TARGET=''
WINDRES=''
WINDRES_FOR_BUILD='$(WINDRES)'
WINDRES_FOR_TARGET=''
YACC=''
ac_ct_CC='gcc'
ac_ct_CXX=''
ac_ct_GNATBIND=''
ac_ct_GNATMAKE=''
bindir='${exec_prefix}/bin'
build='i386-pc-linux-gnu'
build_alias='i386-pc-linux'
build_configargs=''
build_configdirs='build-libiberty build-texinfo build-byacc build-flex
build-bison build-m4 build-fixincludes'
build_cpu='i386'
build_libsubdir='build-i386-pc-linux'
build_noncanonical='i386-pc-linux'
build_os='linux-gnu'
build_subdir='build-i386-pc-linux'
build_tooldir=''
build_vendor='pc'
clooginc=''
clooglibs=''
config_shell='/bin/sh'
configdirs='intl mmalloc libiberty opcodes bfd readline tcl tk itcl
libgui zlib libcpp libdecnumber gmp mpfr ppl cloog texinfo byacc flex
bison binutils gas ld fixincludes gcc sid sim gdb make patch prms
send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake
libtool diff rcs fileutils shellutils time textutils wdiff find uudecode
hello tar gzip indent recode release sed utils guile perl gawk findutils
gettext zip fastjar gnattools'
datadir='${prefix}/share'
datarootdir=''
do_compare=''
docdir=''
exec_prefix='NONE'
gmpinc=''
gmplibs=''
host='i386-pc-linux-gnu'
host_alias=''
host_configargs=''
host_cpu='i386'
host_noncanonical='i386-pc-linux'
host_os='linux-gnu'
host_subdir='.'
host_vendor='pc'
htmldir=''
includedir='${prefix}/include'
infodir='${prefix}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
oldincludedir='/usr/include'
pdfdir=''
pplinc=''
ppllibs=''
prefix='/tools'
program_transform_name='s,^,i386-lfs-linux-gnu-,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
stage1_cflags=''
stage1_checking=''
stage1_languages=''
stage2_werror_flag=''
sysconfdir='${prefix}/etc'
target='i386-lfs-linux-gnu'
target_alias='i386-lfs-linux-gnu'
target_configargs=''
target_cpu='i386'
target_noncanonical='i386-lfs-linux-gnu'
target_os='linux-gnu'
target_subdir='i386-lfs-linux-gnu'
target_vendor='lfs'
tooldir=''

## ------------- ##
## Output files. ##
## ------------- ##

alphaieee_frag=''
host_makefile_frag='config/mh-x86omitfp'
ospace_frag=''
serialization_dependencies=''
target_makefile_frag=''

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

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

configure: exit 77

Does anyone know what is wrong here?

Mark.

--
Mark Hobley
Linux User: #370818 http://markhobley.yi.org/

Balwinder S Dheeman

unread,
Mar 9, 2009, 2:28:17 PM3/9/09
to

[snip]

> configure: exit 77
>
> Does anyone know what is wrong here?

IMHO, the options --build=i386-pc-linux and --target=i386-lfs-linux-gnu
are confusing your gcc; gcc might treat these triggering a cross build
and, or compilation.

Does your build system has symlinks i386-lfs-linux-gnu --> i386-pc-linux
in $PREFIX/include and $PREFIX/lib? If not, try creating these manually.

And the following:

$PREFIX/usr/bin/i386-lfs-linux-gnu-cpp -> cpp-4.1
$PREFIX/usr/bin/i386-lfs-linux-gnu-cpp-4.1 -> cpp-4.1
$PREFIX/usr/bin/i386-lfs-linux-gnu-g++ -> g++-4.1
$PREFIX/usr/bin/i386-lfs-linux-gnu-g++-4.1 -> g++-4.1
$PREFIX/usr/bin/i386-lfs-linux-gnu-gcc -> gcc-4.1
$PREFIX/usr/bin/i386-lfs-linux-gnu-gcc-4.1 -> gcc-4.1

Hope that helps,
--
Dr Balwinder S "bsd" Dheeman Registered Linux User: #229709
Anu'z Linux@HOME (Unix Shoppe) Machines: #168573, 170593, 259192
Chandigarh, UT, 160062, India Gentoo, Fedora, Debian/FreeBSD/XP
Home: http://cto.homelinux.net/~bsd/ Visit: http://counter.li.org/

Tim Greer

unread,
Mar 9, 2009, 3:06:06 PM3/9/09
to
Mark Hobley wrote:

> I am trying to compile binutils-2.19.51.0.2 for a stage 0 scratch
> build.
>
> I have the unpacked sources in ~/binutils-2.19.51.0.2
>
> I now:
>
> cd
> mkdir binutils-build
> ../binutils-2.19.51.0.2/configure --target=$TGT
> --build='i386-pc-linux' --prefix=/tools --disable-nls --disable-werror
>
> checking build system type... i386-pc-linux-gnu
> checking host system type... i386-pc-linux-gnu
> checking target system type... i386-lfs-linux-gnu
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether ln works... yes
> checking whether ln -s works... yes
> checking for gcc... gcc
> checking for C compiler default output file name... configure: error:
> in `/home/lfs/binutils-build':
> configure: error: C compiler cannot create executables
> See `config.log' for more details.
>

Do you have access to the compiler as the user you're using to run
configure and make?
--
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!

Mark Hobley

unread,
Mar 9, 2009, 3:08:01 PM3/9/09
to
Mark Hobley <markh...@hotpop.donottypethisbit.com> wrote:
> I am trying to compile binutils-2.19.51.0.2 for a stage 0 scratch build.

> mkdir binutils-build


> ../binutils-2.19.51.0.2/configure --target=$TGT --build='i386-pc-linux'
> --prefix=/tools --disable-nls --disable-werror
>

> cat config.log

> configure:3312: checking for C compiler default output file name
> configure:3315: gcc -march=i386 -Wa,-march=i386 conftest.c >&5

> as: unrecognized option `-march=i386' <---
|
I am using the Linux From Scratch live CD.

GNU assembler version 2.17 (i486-pc-linux-gnu) using BFD version 2.17

cat testasm.c
int main(void)
{
asm("cpuid"); /* Invalid on the i386 */
}

gcc -march=i386 -Wa,-march=i386 testasm.c
as: unrecognized option `-march=i386'

I think this means that I am going to have to do a double build. I am
going to have to build to get GNU assembler version 2.19. Then I am
going to have to build again using the new version to apply the switch.

(Building Linux from scratch, from a scratch built Linux from scratch).

I wonder how long it will take for the GNU assembler 2.19 to make it
onto the LFS cdrom?

0 new messages