LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   binutils-2.22 configure error "C compiler cannot create executables" (https://www.linuxquestions.org/questions/linux-from-scratch-13/binutils-2-22-configure-error-c-compiler-cannot-create-executables-4175411252/)

iceman911 06-13-2012 11:41 AM

binutils-2.22 configure error "C compiler cannot create executables"
 
Hi there,
this is my first time building lfs; and i stumbled on the first step.:doh:
running the configure script of the first package binutils-2.22 produced the above error.

output of config.log is as follows:

Thanks for reading.

----------------------------------------------------------------
file: 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.64. Invocation command line was

$ ../binutils-2.22/configure --target=i686-lfs-linux-gnu --prefix=/tools --disable-nls --disable-werror

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

hostname = linmachine
uname -m = i686
uname -r = 2.6.24-19-generic
uname -s = Linux
uname -v = #1 SMP Wed Jun 18 14:43:41 UTC 2008

/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: /tools/bin
PATH: /bin
PATH: /usr/bin


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

configure:2230: checking build system type
configure:2244: result: i686-pc-linux-gnu
configure:2291: checking host system type
configure:2304: result: i686-pc-linux-gnu
configure:2324: checking target system type
configure:2337: result: i686-lfs-linux-gnu
configure:2391: checking for a BSD-compatible install
configure:2459: result: /usr/bin/install -c
configure:2470: checking whether ln works
configure:2492: result: yes
configure:2496: checking whether ln -s works
configure:2500: result: yes
configure:2507: checking for a sed that does not truncate output
configure:2571: result: /bin/sed
configure:2580: checking for gawk
configure:2610: result: no
configure:2580: checking for mawk
configure:2596: found /usr/bin/mawk
configure:2607: result: mawk
configure:3742: checking for gcc
configure:3758: found /usr/bin/gcc
configure:3769: result: gcc
configure:3998: checking for C compiler version
configure:4007: gcc --version >&5
gcc (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
Copyright (C) 2007 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:4018: $? = 0
configure:4007: gcc -v >&5
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
configure:4018: $? = 0
configure:4007: gcc -V >&5
gcc: '-V' option must have argument
configure:4018: $? = 1
configure:4007: gcc -qversion >&5
gcc: unrecognized option '-qversion'
gcc: no input files
configure:4018: $? = 1
configure:4038: checking for C compiler default output file name
configure:4060: gcc conftest.c >&5
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:4064: $? = 1
configure:4101: result:
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:4107: error: in `/mnt/lfs/binutils-build':
configure:4111: error: C compiler cannot create executables
See `config.log' for more details.
---------------------------------------------------------------------------

knudfl 06-13-2012 11:55 AM

LFS-6.9, vii. Host System Requirements ...
http://www.linuxfromscratch.org/lfs/.../hostreqs.html

So far it seems that you have no gawk, and no full install of glibc, gcc.
This will do : sudo apt-get install gawk libc6-dev g++

spiky0011 06-13-2012 12:15 PM

Hi

Can you post the output of the host requirements scripts That knudfl pointed to

iceman911 06-14-2012 02:51 AM

Quote:

Originally Posted by knudfl (Post 4702333)
LFS-6.9, vii. Host System Requirements ...
http://www.linuxfromscratch.org/lfs/.../hostreqs.html

So far it seems that you have no gawk, and no full install of glibc, gcc.
This will do : sudo apt-get install gawk libc6-dev g++

-----
Thanks for the help, mate. it worked. :)

geo_man 11-06-2014 05:51 AM

Worked for me too...
 
Quote:

Originally Posted by knudfl (Post 4702333)
LFS-6.9, vii. Host System Requirements ...
http://www.linuxfromscratch.org/lfs/.../hostreqs.html

So far it seems that you have no gawk, and no full install of glibc, gcc.
This will do : sudo apt-get install gawk libc6-dev g++

Thanks


All times are GMT -5. The time now is 02:31 PM.