LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-29-2015, 03:21 PM   #1
zeshanuk
Member
 
Registered: Mar 2015
Distribution: debian jessie baby
Posts: 85

Rep: Reputation: Disabled
Unhappy 5.9. Binutils-2.25 - Pass 2 configure fails


Dear all,

I am trying to do 5.9. Binutils-2.25 - Pass 2 but i have a configure error. I have centos6 as the host os.

Code:
lfs:/mnt/lfs/sources/binutils-2.25$ CC=$LFS_TGT-gcc                \
> AR=$LFS_TGT-ar                 \
> RANLIB=$LFS_TGT-ranlib         \
> ../binutils-2.25/configure     \
>     --prefix=/tools            \
>     --disable-nls              \
>     --disable-werror           \
>     --with-lib-path=/tools/lib \
>     --with-sysroot
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 a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for gcc... x86_64-lfs-linux-gnu-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: in `/mnt/lfs/sources/binutils-2.25':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
lfs:/mnt/lfs/sources/binutils-2.25$
config.log is this:

Code:
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.25/configure --prefix=/tools --disable-nls --disable-werror --with-lib-path=/tools/lib64 --with-sysroot

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

hostname = Unknown
uname -m = x86_64
uname -r = 2.6.32-504.el6.x86_64
uname -s = Linux
uname -v = #1 SMP Wed Oct 15 04:27:16 UTC 2014

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


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

configure:2322: checking build system type
configure:2336: result: x86_64-unknown-linux-gnu
configure:2383: checking host system type
configure:2396: result: x86_64-unknown-linux-gnu
configure:2416: checking target system type
configure:2429: result: x86_64-unknown-linux-gnu
configure:2483: checking for a BSD-compatible install
configure:2551: result: /usr/bin/install -c
configure:2562: checking whether ln works
configure:2584: result: yes
configure:2588: checking whether ln -s works
configure:2592: result: yes
configure:2599: checking for a sed that does not truncate output
configure:2663: result: /bin/sed
configure:2672: checking for gawk
configure:2688: found /bin/gawk
configure:2699: result: gawk
configure:3981: checking for gcc
configure:4008: result: x86_64-lfs-linux-gnu-gcc
configure:4237: checking for C compiler version
configure:4246: x86_64-lfs-linux-gnu-gcc --version >&5
x86_64-lfs-linux-gnu-gcc (GCC) 4.9.2
Copyright (C) 2014 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:4257: $? = 0
configure:4246: x86_64-lfs-linux-gnu-gcc -v >&5
Using built-in specs.
COLLECT_GCC=x86_64-lfs-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/mnt/lfs/tools/bin/../libexec/gcc/x86_64-lfs-linux-gnu/4.9.2/lto-wrapper
Target: x86_64-lfs-linux-gnu
Configured with: ../gcc-4.9.2/configure --target=x86_64-lfs-linux-gnu --prefix=/tools --with-sysroot=/mnt/lfs --with-newlib --without-headers --with-local-prefix=/tools --with-native-system-header-dir=/tools/include --disable-nls --disable-shared --disable-multilib --disable-decimal-float --disable-threads --disable-libatomic --disable-libgomp --disable-libitm --disable-libquadmath --disable-libsanitizer --disable-libssp --disable-libvtv --disable-libcilkrts --disable-libstdc++-v3 --enable-languages=c,c++
Thread model: single
gcc version 4.9.2 (GCC) 
configure:4257: $? = 0
configure:4246: x86_64-lfs-linux-gnu-gcc -V >&5
x86_64-lfs-linux-gnu-gcc: error: unrecognized command line option '-V'
x86_64-lfs-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:4257: $? = 1
configure:4246: x86_64-lfs-linux-gnu-gcc -qversion >&5
x86_64-lfs-linux-gnu-gcc: error: unrecognized command line option '-qversion'
x86_64-lfs-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:4257: $? = 1
configure:4277: checking for C compiler default output file name
configure:4299: x86_64-lfs-linux-gnu-gcc    conftest.c  >&5
configure:4303: $? = 0
configure:4340: result: a.out
configure:4356: checking whether the C compiler works
configure:4365: ./a.out
../binutils-2.25/configure: ./a.out: /tools/lib64/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory
configure:4369: $? = 126
configure:4376: error: in `/mnt/lfs/sources/binutils-build':
configure:4380: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

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

ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_env_AR_FOR_TARGET_set=
ac_cv_env_AR_FOR_TARGET_value=
ac_cv_env_AR_set=set
ac_cv_env_AR_value=x86_64-lfs-linux-gnu-ar
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_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_FOR_TARGET_set=
ac_cv_env_CC_FOR_TARGET_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value=x86_64-lfs-linux-gnu-gcc
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_GOC_FOR_TARGET_set=
ac_cv_env_GOC_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_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LIPO_FOR_TARGET_set=
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=set
ac_cv_env_RANLIB_value=x86_64-lfs-linux-gnu-ranlib
ac_cv_env_READELF_FOR_TARGET_set=
ac_cv_env_READELF_FOR_TARGET_value=
ac_cv_env_READELF_set=
ac_cv_env_READELF_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_build_configargs_set=
ac_cv_env_build_configargs_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_host_configargs_set=
ac_cv_env_host_configargs_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_env_target_configargs_set=
ac_cv_env_target_configargs_value=
ac_cv_host=x86_64-unknown-linux-gnu
ac_cv_path_SED=/bin/sed
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=x86_64-lfs-linux-gnu-gcc
ac_cv_target=x86_64-unknown-linux-gnu
acx_cv_prog_LN=ln

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

AR='x86_64-lfs-linux-gnu-ar'
AR_FOR_BUILD='$(AR)'
AR_FOR_TARGET=''
AS=''
AS_FOR_BUILD='$(AS)'
AS_FOR_TARGET=''
AWK='gawk'
BISON=''
BUILD_CONFIG=''
CC='x86_64-lfs-linux-gnu-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=''
EXTRA_CONFIGARGS_LIBJAVA='--disable-static'
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=''
GOC_FOR_BUILD='$(GOC)'
GOC_FOR_TARGET=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_GDB_TK=''
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
LD=''
LDFLAGS=''
LDFLAGS_FOR_BUILD=''
LDFLAGS_FOR_TARGET=''
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_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB='x86_64-lfs-linux-gnu-ranlib'
RANLIB_FOR_BUILD='$(RANLIB)'
RANLIB_FOR_TARGET=''
RAW_CXX_FOR_TARGET=''
READELF=''
READELF_FOR_TARGET=''
RPATH_ENVVAR=''
RUNTEST=''
SED='/bin/sed'
SHELL='/bin/sh'
STRIP=''
STRIP_FOR_TARGET=''
SYSROOT_CFLAGS_FOR_TARGET=''
TOPLEVEL_CONFIGURE_ARGUMENTS='../binutils-2.25/configure --prefix=/tools --disable-nls --disable-werror --with-lib-path=/tools/lib64 --with-sysroot'
WINDMC=''
WINDMC_FOR_BUILD='$(WINDMC)'
WINDMC_FOR_TARGET=''
WINDRES=''
WINDRES_FOR_BUILD='$(WINDRES)'
WINDRES_FOR_TARGET=''
YACC=''
ac_ct_CC='x86_64-lfs-linux-gnu-gcc'
ac_ct_CXX=''
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_configargs=''
build_configdirs='build-libiberty build-texinfo build-flex build-bison build-m4 build-fixincludes'
build_cpu='x86_64'
build_libsubdir='build-x86_64-unknown-linux-gnu'
build_noncanonical='x86_64-unknown-linux-gnu'
build_os='linux-gnu'
build_subdir='build-x86_64-unknown-linux-gnu'
build_tooldir=''
build_vendor='unknown'
clooginc=''
clooglibs=''
compare_exclusions=''
configdirs='intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl cloog libelf libiconv texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gprof etc expect dejagnu m4 utils guile fastjar gnattools'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
do_compare=''
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
extra_host_libiberty_configure_flags=''
extra_isl_gmp_configure_flags=''
extra_mpc_gmp_configure_flags=''
extra_mpc_mpfr_configure_flags=''
extra_mpfr_configure_flags=''
gmpinc=''
gmplibs=''
host='x86_64-unknown-linux-gnu'
host_alias=''
host_configargs=''
host_cpu='x86_64'
host_noncanonical='x86_64-unknown-linux-gnu'
host_os='linux-gnu'
host_shared=''
host_subdir='.'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
islinc=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
poststage1_ldflags=''
poststage1_libs=''
prefix='/tools'
program_transform_name='s,y,y,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
stage1_cflags=''
stage1_checking=''
stage1_languages=''
stage1_ldflags=''
stage1_libs=''
stage2_werror_flag=''
sysconfdir='${prefix}/etc'
target='x86_64-unknown-linux-gnu'
target_alias=''
target_configargs=''
target_configdirs='target-libgcc target-libbacktrace target-libgloss target-newlib target-libgomp target-libcilkrts target-libatomic target-libitm target-libstdc++-v3 target-libsanitizer target-libvtv target-libssp target-libquadmath target-libgfortran target-boehm-gc target-libffi target-zlib target-libjava target-libobjc target-libada target-libgo target-rda'
target_cpu='x86_64'
target_noncanonical='x86_64-unknown-linux-gnu'
target_os='linux-gnu'
target_subdir='x86_64-unknown-linux-gnu'
target_vendor='unknown'
tooldir=''

## ------------------- ##
## File substitutions. ##
## ------------------- ##

alphaieee_frag=''
host_makefile_frag='/dev/null'
ospace_frag=''
serialization_dependencies=''
target_makefile_frag=''

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

/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""

configure: exit 1
bash version-check.sh shows:
Code:
[root@Unknown Desktop]# bash version-check.sh 
bash, version 4.1.2(1)-release
/bin/sh -> /bin/bash
Binutils: version 2.20.51.0.2-5.42.el6 20100205
bison (GNU Bison) 2.4.1
Usage: /usr/bin/yacc [options] filename

Options:
  -b file_prefix        set filename prefix (default "y.")
  -d                    write definitions (y.tab.h)
  -g                    write a graphical description
  -l                    suppress #line directives
  -o output_file        (default "y.tab.c")
  -p symbol_prefix      set symbol prefix (default "yy")
  -r                    produce separate code and table files (y.code.c)
  -t                    add debugging support
  -v                    write description (y.output)
  -V                    show version information and exit
yacc is
bzip2,  Version 1.0.5, 10-Dec-2007.
Coreutils:  8.4
diff (GNU diffutils) 2.8.1
find (GNU findutils) 4.4.2
GNU Awk 4.1.1, API: 1.1
/usr/bin/awk -> /bin/gawk
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)
g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)
(GNU libc) 2.12
GNU grep 2.6.3
gzip 1.3.12
Linux version 2.6.32-504.el6.x86_64 (mockbuild@c6b9.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) ) #1 SMP Wed Oct 15 04:27:16 UTC 2014
m4 (GNU M4) 1.4.13
GNU Make 3.81
patch 2.6
Perl version='5.10.1';
GNU sed version 4.2.1
tar (GNU tar) 1.23
makeinfo (GNU texinfo) 5.2
xz (XZ Utils) 5.2.1
g++ compilation OK
[root@Unknown Desktop]#
Can you help me please? I am really struggling and I am sure I have not messed anything up. Thanks in advance.
 
Old 03-29-2015, 03:23 PM   #2
zeshanuk
Member
 
Registered: Mar 2015
Distribution: debian jessie baby
Posts: 85

Original Poster
Rep: Reputation: Disabled
btw I using Linux From Scratch - Version 7.7 book
 
Old 03-29-2015, 03:36 PM   #3
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
Hi

Did you forget
Code:
mkdir -v ../binutils-build
cd ../binutils-build
untar binutils-2.25 cd into dir follow book

Last edited by spiky0011; 03-29-2015 at 03:38 PM.
 
Old 03-29-2015, 03:44 PM   #4
zeshanuk
Member
 
Registered: Mar 2015
Distribution: debian jessie baby
Posts: 85

Original Poster
Rep: Reputation: Disabled
hi spikey,

I did not forget to issue the configure outside the source directory, I was in binutils-build . Also I have added the version check in the previous post.
 
Old 03-29-2015, 03:48 PM   #5
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
Quote:
lfs:/mnt/lfs/sources/binutils-2.25$ CC=$LFS_TGT-gcc
looks like you are in binutils-2.25 dir not binutils-build

should be

/mnt/lfs/sources/binutils-build

Last edited by spiky0011; 03-29-2015 at 03:51 PM.
 
Old 03-29-2015, 03:51 PM   #6
zeshanuk
Member
 
Registered: Mar 2015
Distribution: debian jessie baby
Posts: 85

Original Poster
Rep: Reputation: Disabled
hey dont you believe me! see below:

Quote:
lfs:/mnt/lfs/sources/binutils-build$ CC=$LFS_TGT-gcc \
> AR=$LFS_TGT-ar \
> RANLIB=$LFS_TGT-ranlib \
> ../binutils-2.25/configure \
> --prefix=/tools \
> --disable-nls \
> --disable-werror \
> --with-lib-path=/tools/lib \
> --with-sysroot
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 a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for gcc... x86_64-lfs-linux-gnu-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: in `/mnt/lfs/sources/binutils-build':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
lfs:/mnt/lfs/sources/binutils-build$
 
Old 03-29-2015, 04:01 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
That is not the same as the 1st post? check

what dose this ouput

echo 'main(){}' > dummy.c
$LFS_TGT-gcc dummy.c
readelf -l a.out | grep ': /tools'
 
Old 03-29-2015, 04:07 PM   #8
zeshanuk
Member
 
Registered: Mar 2015
Distribution: debian jessie baby
Posts: 85

Original Poster
Rep: Reputation: Disabled
hi, sorry you was right about the posts,

the output of:

Quote:
echo 'main(){}' > dummy.c
$LFS_TGT-gcc dummy.c
readelf -l a.out | grep ': /tools'
is:
Quote:
[Requesting program interpreter: /tools/lib64/ld-linux-x86-64.so.2]
 
Old 03-29-2015, 04:14 PM   #9
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
whats the output of

Code:
env
and echo $LFS

Also did you remove binutils-2.2.5 and binutils-build dir from 1st build?

Last edited by spiky0011; 03-29-2015 at 04:15 PM.
 
Old 03-29-2015, 04:17 PM   #10
zeshanuk
Member
 
Registered: Mar 2015
Distribution: debian jessie baby
Posts: 85

Original Poster
Rep: Reputation: Disabled
env

Quote:
lfs:/mnt/lfs/sources/binutils-build$ env
TERM=xterm
OLDPWD=/mnt/lfs/sources/binutils-2.25
LC_ALL=POSIX
LFS=/mnt/lfs
PATH=/tools/bin:/bin:/usr/bin
PWD=/mnt/lfs/sources/binutils-build
LFS_TGT=x86_64-lfs-linux-gnu
PS1=\u:\w\$
SHLVL=1
HOME=/home/lfs
_=/bin/env
lfs:/mnt/lfs/sources/binutils-build$
also echo $LFS

Quote:
lfs:/mnt/lfs/sources/binutils-build$ echo $LFS
/mnt/lfs
lfs:/mnt/lfs/sources/binutils-build$
 
Old 03-29-2015, 04:25 PM   #11
zeshanuk
Member
 
Registered: Mar 2015
Distribution: debian jessie baby
Posts: 85

Original Poster
Rep: Reputation: Disabled
regarding binutils source and build folders, 1st build i did remove them, i unpaked the tar again for 2nd pass.
 
Old 03-29-2015, 04:30 PM   #12
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
something went wrong in in glib or gcc

If you removed all untarred dir & build dir when you finished building, I would start again

you have this in config log
../binutils-2.25/configure: ./a.out: /tools/lib64/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory

Last edited by spiky0011; 03-29-2015 at 04:31 PM.
 
Old 03-29-2015, 04:36 PM   #13
zeshanuk
Member
 
Registered: Mar 2015
Distribution: debian jessie baby
Posts: 85

Original Poster
Rep: Reputation: Disabled
hi this is the second time round im am trying this, glibc and gcc compile and install fine. - no errors. what is going to change by starting from binutils pass1? thats where i started again the second time. I have made no changes to the process! I always get stuck at binutils pass2...
 
Old 03-29-2015, 04:41 PM   #14
zeshanuk
Member
 
Registered: Mar 2015
Distribution: debian jessie baby
Posts: 85

Original Poster
Rep: Reputation: Disabled
I have checked the config.log file and it points to 4246 of configure:
Quote:
configure:4246: x86_64-lfs-linux-gnu-gcc -V >&5
x86_64-lfs-linux-gnu-gcc: error: unrecognized command line option '-V'
x86_64-lfs-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:4257: $? = 1
configure:4246: x86_64-lfs-linux-gnu-gcc -qversion >&5
x86_64-lfs-linux-gnu-gcc: error: unrecognized command line option '-qversion'
x86_64-lfs-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:4257: $? = 1
configure:4277: checking for C compiler default output file name
configure:4299: x86_64-lfs-linux-gnu-gcc conftest.c >&5
configure:4303: $? = 0
configure:4340: result: a.out
configure:4356: checking whether the C compiler works
configure:4365: ./a.out
../binutils-2.25/configure: ./a.out: /tools/lib64/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory

configure:4369: $? = 126
configure:4376: error: in `/mnt/lfs/sources/binutils-build':
configure:4380: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
any ideas? I put in bold some of the errors that have popped up in config.log
 
Old 03-29-2015, 04:43 PM   #15
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
Well if your copy pasting commands they should be good, the only other thing is the host
I have built 7.7 a few times now but not on centos i build from lfs. Maybe try slack or arch

you can wait see if anyone else can figure the error out.

The only only other thing you did run the
case $(uname -m) in
x86_64) mkdir -v /tools/lib && ln -sv lib /tools/lib64 ;;
esac
end of binutils 1st pass

Last edited by spiky0011; 03-29-2015 at 04:47 PM.
 
  


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
[SOLVED] binutils-2.24 Pass 2 dave0504 Linux From Scratch 8 11-22-2014 05:00 AM
[SOLVED] ./configure fails during Binutils Pass 2 supern0va Linux From Scratch 5 11-09-2010 10:46 AM
questions on GCC-3.4.3 - Pass 2 and Binutils-2.15.94.0.2.2 - Pass 2 satimis Linux From Scratch 7 12-26-2005 09:23 PM
make configure-host for binutils-2.16.1 fails under 7.0-cross-lfs-20051019-x86_64 Basel Linux From Scratch 2 10-24-2005 11:07 PM
make: *** [configure-libiberty] Error 1 in 5.4. Binutils-2.15.91.0.2 - Pass 1 Flash_G Linux From Scratch 3 06-30-2005 08:51 PM

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

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

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