LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 02-25-2010, 02:45 AM   #1
jackplughd
LQ Newbie
 
Registered: Jan 2010
Posts: 22

Rep: Reputation: 0
Failed to prepare Binutils for compilation


I have fallen at the first hurdle! When trying to prepare Binutils for compilation I get the following:

lfs@phoenix:/mnt/lfs/sources/binutils-2.19.1$ ../binutils-2.19.1/configure \
> --target=$LFS_TGT --prefix=/tools \
> --disable-nls --disable-werror
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-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 `/mnt/lfs/sources/binutils-2.19.1':
configure: error: C compiler cannot create executables
See `config.log' for more detail


Below is the output of config.log, sorry it is so long.

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.1/configure --target=i686-lfs-linux-gnu --prefix=/tools --disable-nls --disable-werror

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

hostname = phoenix
uname -m = i686
uname -r = 2.6.24-27-generic
uname -s = Linux
uname -v = #1 SMP Wed Jan 27 23:54:28 UTC 2010

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

/bin/arch = unknown
/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:1549: checking build system type
configure:1567: result: i686-pc-linux-gnulibc1
configure:1602: checking host system type
configure:1616: result: i686-pc-linux-gnulibc1
configure:1624: checking target system type
configure:1638: result: i686-lfs-linux-gnu
configure:1682: checking for a BSD-compatible install
configure:1748: result: /usr/bin/install -c
configure:1759: checking whether ln works
configure:1781: result: yes
configure:1785: checking whether ln -s works
configure:1789: result: yes
configure:2983: checking for gcc
configure:2999: found /usr/bin/gcc
configure:3009: result: gcc
configure:3255: checking for C compiler version
configure:3258: gcc --version </dev/null >&5
gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
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:3261: $? = 0
configure:3263: gcc -v </dev/null >&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.4 (Ubuntu 4.2.4-1ubuntu4)
configure:3266: $? = 0
configure:3268: gcc -V </dev/null >&5
gcc: '-V' option must have argument
configure:3271: $? = 1
configure:3294: checking for C compiler default output file name
configure:3297: gcc conftest.c >&5
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:3300: $? = 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:3338: error: in `/mnt/lfs/sources/binutils-2.19.1':
configure:3341: error: C compiler cannot create executables
See `config.log' for more details.

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

ac_cv_build=i686-pc-linux-gnulibc1
ac_cv_build_alias=i686-pc-linux-gnulibc1
ac_cv_env_AR_FOR_TARGET_set=
ac_cv_env_AR_FOR_TARGET_value=
ac_cv_env_AR_set=
ac_cv_env_AR_value=
ac_cv_env_AS_FOR_TARGET_set=
ac_cv_env_AS_FOR_TARGET_value=
ac_cv_env_AS_set=
ac_cv_env_AS_value=
ac_cv_env_CC_FOR_TARGET_set=
ac_cv_env_CC_FOR_TARGET_value=
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_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_FOR_TARGET_set=
ac_cv_env_CXX_FOR_TARGET_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_DLLTOOL_FOR_TARGET_set=
ac_cv_env_DLLTOOL_FOR_TARGET_value=
ac_cv_env_DLLTOOL_set=
ac_cv_env_DLLTOOL_value=
ac_cv_env_GCC_FOR_TARGET_set=
ac_cv_env_GCC_FOR_TARGET_value=
ac_cv_env_GCJ_FOR_TARGET_set=
ac_cv_env_GCJ_FOR_TARGET_value=
ac_cv_env_GFORTRAN_FOR_TARGET_set=
ac_cv_env_GFORTRAN_FOR_TARGET_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LD_FOR_TARGET_set=
ac_cv_env_LD_FOR_TARGET_value=
ac_cv_env_LD_set=
ac_cv_env_LD_value=
ac_cv_env_LIPO_FOR_TARGET_set=target='i686-lfs-linux-gnu'
target_alias='i686-lfs-linux-gnu'
target_configargs=''
target_cpu='i686'
target_noncanonical='i686-lfs-linux-gnu'
target_os='linux-gnu'
target_subdir='i686-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

ac_cv_env_LIPO_FOR_TARGET_value=
ac_cv_env_LIPO_set=
ac_cv_env_LIPO_value=
ac_cv_env_NM_FOR_TARGET_set=
ac_cv_env_NM_FOR_TARGET_value=
ac_cv_env_NM_set=
ac_cv_env_NM_value=
ac_cv_env_OBJCOPY_set=
ac_cv_env_OBJCOPY_value=
ac_cv_env_OBJDUMP_FOR_TARGET_set=
ac_cv_env_OBJDUMP_FOR_TARGET_value=
ac_cv_env_OBJDUMP_set=
ac_cv_env_OBJDUMP_value=
ac_cv_env_RANLIB_FOR_TARGET_set=
ac_cv_env_RANLIB_FOR_TARGET_value=
ac_cv_env_RANLIB_set=
ac_cv_env_RANLIB_value=
ac_cv_env_STRIP_FOR_TARGET_set=
ac_cv_env_STRIP_FOR_TARGET_value=
ac_cv_env_STRIP_set=
ac_cv_env_STRIP_value=
ac_cv_env_WINDMC_FOR_TARGET_set=
ac_cv_env_WINDMC_FOR_TARGET_value=
ac_cv_env_WINDMC_set=
ac_cv_env_WINDMC_value=
ac_cv_env_WINDRES_FOR_TARGET_set=
ac_cv_env_WINDRES_FOR_TARGET_value=
ac_cv_env_WINDRES_set=
ac_cv_env_WINDRES_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=set
ac_cv_env_target_alias_value=i686-lfs-linux-gnu
ac_cv_host=i686-pc-linux-gnulibc1
ac_cv_host_alias=i686-pc-linux-gnulibc1
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_ac_ct_CC=gcc
ac_cv_target=i686-lfs-linux-gnu
ac_cv_target_alias=i686-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=''
CFLAGS_FOR_BUILD=''
CFLAGS_FOR_TARGET=''
COMPILER_AS_FOR_TARGET=''
COMPILER_LD_FOR_TARGET=''
COMPILER_NM_FOR_TARGET=''
CONFIGURE_GDB_TK=''
CPPFLAGS=''
CXX=''
CXXFLAGS=''
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/bash'
STRIP=''
STRIP_FOR_TARGET=''
SYSROOT_CFLAGS_FOR_TARGET=''
TOPLEVEL_CONFIGURE_ARGUMENTS='../binutils-2.19.1/configure --target=i686-lfs-linux-gnu --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='i686-pc-linux-gnulibc1'
build_alias=''
build_configargs=''
build_configdirs='build-libiberty build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes'
build_cpu='i686'
build_libsubdir='build-i686-pc-linux-gnulibc1'
build_noncanonical='i686-pc-linux-gnulibc1'
build_os='linux-gnulibc1'
build_subdir='build-i686-pc-linux-gnulibc1'
build_tooldir=''
build_vendor='pc'
config_shell='/bin/bash'
configdirs='intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr 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='i686-pc-linux-gnulibc1'
host_alias=''
host_configargs=''
host_cpu='i686'
host_noncanonical='i686-pc-linux-gnulibc1'
host_os='linux-gnulibc1'
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=''
prefix='/tools'
program_transform_name='s,^,i686-lfs-linux-gnu-,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
stage1_cflags=''
stage1_checking=''
stage1_languages=''
stage2_werror_flag=''
sysconfdir='${prefix}/etc'
target='i686-lfs-linux-gnu'
target='i686-lfs-linux-gnu'
target_alias='i686-lfs-linux-gnu'
target_configargs=''
target_cpu='i686'
target_noncanonical='i686-lfs-linux-gnu'
target_os='linux-gnu'
target_subdir='i686-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


Any help greatly appreciated.

jackplughd
 
Old 02-25-2010, 04:22 AM   #2
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Hi,
first of all post which version of LFS you are trying to build. Secondly, you are supposed to build binutils in a seperate build-directory and NOT in the source directory.
Please try this first and post the results.
 
Old 02-25-2010, 06:17 AM   #3
jackplughd
LQ Newbie
 
Registered: Jan 2010
Posts: 22

Original Poster
Rep: Reputation: 0
crts

I have created the directory /binutils-build. I cd into the directory and then try and prepare binutild for the build and get the following:

lfs@phoenix:/mnt/lfs/binutils-build$ ../binutils-2.19.1/configure \
> --target=$LFS_TGT --prefix=/tools \
> --disable-nls --disable-werror
bash: ../binutils-2.19.1/configure: No such file or directory
 
Old 02-25-2010, 06:27 AM   #4
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Quote:
Originally Posted by jackplughd View Post
crts

I have created the directory /binutils-build. I cd into the directory and then try and prepare binutild for the build and get the following:

lfs@phoenix:/mnt/lfs/binutils-build$ ../binutils-2.19.1/configure \
> --target=$LFS_TGT --prefix=/tools \
> --disable-nls --disable-werror
bash: ../binutils-2.19.1/configure: No such file or directory
The directory has to be in /mnt/lfs/sources/binutils-build.

Alternatively you could also modify your command too

Code:
../sources/binutils-2.19.1/configure ....
However, creating the build directory is also described in the book. You just need to follow the instructions and NOT deviate from them.
At least not for your very first LFS.
 
Old 03-01-2010, 05:43 AM   #5
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Quote:
Originally Posted by jackplughd View Post
I have fallen at the first hurdle! When trying to prepare Binutils for compilation I get the following:

lfs@phoenix:/mnt/lfs/sources/binutils-2.19.1$ ../binutils-2.19.1/configure \
> --target=$LFS_TGT --prefix=/tools \
> --disable-nls --disable-werror
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-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 `/mnt/lfs/sources/binutils-2.19.1':
configure: error: C compiler cannot create executables
See `config.log' for more detail
Have you installed gcc? configure: error: C compiler cannot create executables seems pretty explicit to me. Also as crts said, don't deviate from the book and then pose noob questions. Follow book, book good.

Andy
 
Old 04-27-2020, 01:06 PM   #6
Kelvin Munyimbili
LQ Newbie
 
Registered: Apr 2020
Distribution: Ubuntu
Posts: 3

Rep: Reputation: Disabled
SOLUTION

The noob is actually right. I followed book, book bad... Well on this occasion
In Version 9.1 of the book, and I'm sure in previous ones as well, the configure command in section 5.4.1 begins with two periods instead of just one

../configure <so on and so forth>
^

According to the book this is done in the just unpacked binutils-2.34 directory. This brings the "no such file or directory" error
Using a single period works.

./configure <so on and so forth>
^

In the binutils-2.34 directory that is, after unpacking.

Last edited by Kelvin Munyimbili; 04-27-2020 at 01:08 PM.
 
Old 04-27-2020, 01:28 PM   #7
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Are you sure you are correct Take another look maybe.
cd binutils
mkdir build cd build < you missed this then
 
Old 04-28-2020, 02:50 AM   #8
Kelvin Munyimbili
LQ Newbie
 
Registered: Apr 2020
Distribution: Ubuntu
Posts: 3

Rep: Reputation: Disabled
You're right, I've cross checked it

Inside Binutils directory

mkdir build
cd build

Then

../configure <so on and so forth>

That works
 
Old 04-28-2020, 02:50 AM   #9
Kelvin Munyimbili
LQ Newbie
 
Registered: Apr 2020
Distribution: Ubuntu
Posts: 3

Rep: Reputation: Disabled
You're right, I've cross checked it

Inside Binutils directory

mkdir build
cd build

Then

../configure <so on and so forth>

That works
 
  


Reply



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
compilation with binutils-2.18 shobhitsharda Linux From Scratch 2 06-01-2009 05:26 AM
binutils-2.17 compilation error rcg1984 Linux From Scratch 7 04-16-2009 08:17 AM
compilation error-binutils-2.16.1 ashmita04 Linux From Scratch 1 10-24-2007 02:50 AM
compilation error- binutils 2.16.1 baljeet Linux From Scratch 2 10-19-2007 09:40 AM
BInutils 2.14 compilation problems Xing Linux - Software 0 09-26-2003 07:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 01:56 AM.

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
Open Source Consulting | Domain Registration