LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Error While Trying Build of Binutils (1st Attempt) (https://www.linuxquestions.org/questions/linux-from-scratch-13/error-while-trying-build-of-binutils-1st-attempt-885257/)

gdawg 06-08-2011 01:47 PM

Error While Trying Build of Binutils (1st Attempt)
 
Hi, I'm trying again to build LFS but now I'm stymied at the 1st build attempt of binutils-2.21. After creating the binutils-build directory, when I attempt to configure I get the following output:
Code:

lfs:/mnt/lfs/sources/binutils-build$ ../binutils-2.21/configure \
> --target=$LFS_TGT --prefix=/tools \
> --disable-nls --disable-werror
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
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 a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/mnt/lfs/sources/binutils-build':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
lfs:/mnt/lfs/sources/binutils-build$ ls -l
total 12
-rw-r--r-- 1 lfs lfs 9468 Jun  8 12:21 config.log
lfs:/mnt/lfs/sources/binutils-build$ 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.64.  Invocation command line was

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

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

hostname = dhcppc0
uname -m = i686
uname -r = 2.6.37.6-0.5-desktop
uname -s = Linux
uname -v = #1 SMP PREEMPT 2011-04-25 21:48:33 +0200

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

/bin/arch              = i686
/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:2197: checking build system type
configure:2211: result: i686-pc-linux-gnu
configure:2258: checking host system type
configure:2271: result: i686-pc-linux-gnu
configure:2291: checking target system type
configure:2304: result: i686-lfs-linux-gnu
configure:2358: checking for a BSD-compatible install
configure:2426: result: /usr/bin/install -c
configure:2437: checking whether ln works
configure:2459: result: yes
configure:2463: checking whether ln -s works
configure:2467: result: yes
configure:2474: checking for a sed that does not truncate output
configure:2538: result: /bin/sed
configure:2547: checking for gawk
configure:2563: found /bin/gawk
configure:2574: result: gawk
configure:3858: checking for gcc
configure:3888: result: no
configure:3951: checking for cc
configure:3998: result: no
configure:4054: checking for cl.exe
configure:4084: result: no
configure:4108: error: in `/mnt/lfs/sources/binutils-build':
configure:4111: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

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

ac_cv_build=i686-pc-linux-gnu
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_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=
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_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=
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_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=set
ac_cv_env_target_alias_value=i686-lfs-linux-gnu
ac_cv_env_target_configargs_set=
ac_cv_env_target_configargs_value=
ac_cv_host=i686-pc-linux-gnu
ac_cv_path_SED=/bin/sed
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_target=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=''
AWK='gawk'
BISON=''
BUILD_CONFIG=''
CC=''
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_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB=''
RANLIB_FOR_BUILD='$(RANLIB)'
RANLIB_FOR_TARGET=''
RAW_CXX_FOR_TARGET=''
RPATH_ENVVAR=''
RUNTEST=''
SED='/bin/sed'
SHELL='/bin/sh'
STRIP=''
STRIP_FOR_TARGET=''
SYSROOT_CFLAGS_FOR_TARGET=''
TOPLEVEL_CONFIGURE_ARGUMENTS='../binutils-2.21/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=''
ac_ct_CXX=''
bindir='${exec_prefix}/bin'
build='i686-pc-linux-gnu'
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-gnu'
build_noncanonical='i686-pc-linux-gnu'
build_os='linux-gnu'
build_subdir='build-i686-pc-linux-gnu'
build_tooldir=''
build_vendor='pc'
clooginc=''
clooglibs=''
compare_exclusions=''
config_shell='/bin/sh'
configdirs='intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr mpc ppl cloog libelf libiconv texinfo byacc flex bison binutils gas ld fixincludes gcc cgen 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='${datarootdir}'
datarootdir='${prefix}/share'
do_compare=''
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
extra_host_libiberty_configure_flags=''
extra_mpc_gmp_configure_flags=''
extra_mpc_mpfr_configure_flags=''
extra_mpfr_configure_flags=''
gmpinc=''
gmplibs=''
host='i686-pc-linux-gnu'
host_alias=''
host_configargs=''
host_cpu='i686'
host_noncanonical='i686-pc-linux-gnu'
host_os='linux-gnu'
host_subdir='.'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
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=''
pplinc=''
ppllibs=''
prefix='/tools'
program_transform_name='s&^&i686-lfs-linux-gnu-&'
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='i686-lfs-linux-gnu'
target_alias='i686-lfs-linux-gnu'
target_configargs=''
target_configdirs='target-libgcc target-libiberty target-libgloss target-newlib target-libgomp target-libstdc++-v3 target-libmudflap target-libssp target-libgfortran target-boehm-gc target-libffi target-zlib target-qthreads target-libjava target-libobjc target-libada target-examples target-groff target-gperf target-rda'
target_cpu='i686'
target_noncanonical='i686-lfs-linux-gnu'
target_os='linux-gnu'
target_subdir='i686-lfs-linux-gnu'
target_vendor='lfs'
tooldir=''

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

alphaieee_frag=''
host_makefile_frag='config/mh-x86omitfp'
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

My host distro is SUSE. I've run (echo $LFS) and get the (/mnt/lfs). I've gone back and reset everything that I can think of but can't figure this out. All help will be greatly appreciated.

crts 06-08-2011 02:16 PM

Quote:

Originally Posted by gdawg (Post 4380190)
Code:

configure: error: in `/mnt/lfs/sources/binutils-build':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

My host distro is SUSE. I've run (echo $LFS) and get the (/mnt/lfs). I've gone back and reset everything that I can think of but can't figure this out. All help will be greatly appreciated.

It appears that your system does not satisfy the host system requirements. Did you run the script in chapter vii?
http://www.linuxfromscratch.org/lfs/.../hostreqs.html

What was the output?

gdawg 06-08-2011 10:00 PM

Thank you crts - I neglected to verify that my host distro (openSUSE) met all of the host requirements. So far I've advanced to ch.6.1 and am now logged-in as root. I cannot seem to access the packages I downloaded. When I try to cd to them I get the following:
Quote:

root:/# cd /mnt/lfs/sources
bash: cd: /mnt/lfs/sources: No such file or directory
Where am I going wrong? echo $LFS still shows /mnt/lfs.

druuna 06-09-2011 01:19 AM

Hi,

If you are now doing chapter 6 (6.4 and beyound) then you are inside a chrooted environment and the /mnt/lfs is no longer needed/wanted. From within the chrooted environment you cd to /sources, not $LFS/sources.

Have another look here: 6.4. Entering the Chroot Environment

Hope this helps.

gdawg 06-09-2011 09:02 AM

Thank you druuna, I've been here before but forgot how to reach packages while 'root'. I'm using version 6.8 of LFS manual. In the past you gave me advice on re-entering chapter 6 of the manual. One of the steps says "check if LFS is mounted: *df -h | grep $LFS*". Should I expect some output from that command? Once again, thank you very much for your help and patience.

druuna 06-09-2011 09:24 AM

Hi,
Quote:

Originally Posted by gdawg (Post 4380964)
Thank you druuna, I've been here before but forgot how to reach packages while 'root'. I'm using version 6.8 of LFS manual. In the past you gave me advice on re-entering chapter 6 of the manual. One of the steps says "check if LFS is mounted: *df -h | grep $LFS*". Should I expect some output from that command? Once again, thank you very much for your help and patience.

That command should show output, namely the mountpoint of $LFS.

Every time you restart working on chapter 6 you need to do the following (copy/pasted from the previous thread):
Code:

- become root user
- check if LFS is set: echo $LFS
- check if LFS is mounted: df -h | grep $LFS
- If the above 2 are ok then:
mount -v --bind /dev $LFS/dev
mount -vt devpts devpts $LFS/dev/pts
mount -vt tmpfs shm $LFS/dev/shm
mount -vt proc proc $LFS/proc
mount -vt sysfs sysfs $LFS/sys
chroot "$LFS" /tools/bin/env -i \
    HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
    PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
    /tools/bin/bash --login +h

If $LFS is not mounted (i.e the command does _not_ show any output), mount it (as root): mount -t ext3 /dev/<xxx> $LFS (replace <XXX> with the appropriate device, for example /dev/sda1)

Hope this helps.

gdawg 06-09-2011 11:07 AM

Thanks for the quick reply. I think I messed-up. When I re-entered ch.6, I didn't get any output from the 'mount' check but I proceeded and am now at ch.6.16. What action do you suggest I take?

druuna 06-09-2011 11:19 AM

Hi,
Quote:

Originally Posted by gdawg (Post 4381096)
Thanks for the quick reply. I think I messed-up. When I re-entered ch.6, I didn't get any output from the 'mount' check but I proceeded and am now at ch.6.16. What action do you suggest I take?

I'm not sure what you are asking.

Just to make sure (not sure if you understand looking at the bold part in the above quote): The df -h | grep $LFS should be executed before you enter the chrooted environment, not after (which would not give any output).

gdawg 06-09-2011 11:57 AM

Hi,
Here is what I did: (1) became root; (2) did "echo $LFS" - no output so entered 'export' command - re-did "echo $LFS" - output=/mnt/lfs (3) entered "df -h | grep $LFS" - no output (4) entered "mount" commands (5) entered "chroot" command. I'm currently running "make -k check" in GCC. No unanticipated errors so far (at para. 6.16). Do I need to start over at para. 6.4 (Entering Chroot Environment)? Thanks.

druuna 06-09-2011 12:18 PM

That looks fine and there's no need to start over again, just continue.

gdawg 06-09-2011 02:16 PM

Hi and thanks. I'm at para.6.18 and when I attempt to un-tar "pkg-config-0.25.tar.gz" I get the following error:
Quote:

root:/sources# tar zxf pkg-config-0.25.tar.gz

gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
Does this mean the file is corrupted?

druuna 06-09-2011 02:27 PM

Hi,

It probably is corrupt.

Download it again and check your downloaded file with the md5 sum given on this page: 3.2. All Packages

In case you don't know how, after downloading:
Code:

$ md5sum pkg-config-0.25.tar.gz
a3270bab3f4b69b7dc6dbdacbcae9745  pkg-config-0.25.tar.gz

The bold part should match what's shown on the "All Packages" page, if it is not it is corrupt.

Hope this helps.

gdawg 06-10-2011 09:46 AM

Hi,
That file was corrupt. I removed it and downloaded another file and the md5sum checked out OK. I had some difficulty with the Shadow file. It didn't download when the other packages were downloaded. I found it via Google and downloaded it. I've been using openSUSE 11.4 as the host distro and am now having difficulty booting it. I have a multi-booted system with Win7, Ubuntu, Mint, PCLOS in addition to openSUSE. This morning I updated PCLinuxOS and after that I no longer show SUSE on the boot menu. Before this I booted all distros from openSUSE. I'm currently booted in openSUSE via Super Grub disk. Also openSUSE is installed on an external hard drive. Thanks for your help. As soon as I fix this boot problem I'll get back on LFS. Any suggestions on the boot problem will be appreciated.

druuna 06-10-2011 10:08 AM

Hi,

You're welcome :)

BYW: If you ever need an LFS package have a look here: LFS Packages (not yet updated for the new 6.8 version at the moment).

gdawg 06-10-2011 10:48 AM

Hi,

Thanks for the LFS Packages info. When I tried to chroot this morning I get the following error:
Quote:

dhcppc0:/ # chroot "$LFS" /tools/bin/env -i \
> HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
> PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
> /tools/bin/bash --login +h
chroot: failed to run command `/tools/bin/env': No such file or directory
I followed instructions on how to restart in chapter 6 and all was fine until "chroot" command. Last night when I shutdown I was at the Shadow config. point (para. 6.55). Is it possible that "/tools/bin/env" was deleted during some preceding package configuration?


All times are GMT -5. The time now is 06:19 PM.