LinuxQuestions.org
Review your favorite Linux distribution.
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 04-16-2010, 01:11 PM   #1
lord_Tux
LQ Newbie
 
Registered: Apr 2010
Posts: 2

Rep: Reputation: 0
Question bootstrap error 2 compiling gcc


i am using lfs6.3 and was trying to compile gcc on my 64-bit LinuxMint system, but when entering the following line:
Code:
sudo make bootstrap
i came across this error:
Code:
file not recognized: File format not recognized
collect2: ld returned 1 exit status
make[3]: *** [libgcc_s.so] Error 1
make[3]: Leaving directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/gcc'
make[2]: *** [stmp-multilib] Error 2
make[2]: Leaving directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/gcc'
make: *** [bootstrap] Error 2
 
Old 04-16-2010, 02:37 PM   #2
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Hi,

which chapter? Also post a little bit more of the output. The configure log might also be helpful.
 
Old 04-18-2010, 11:09 AM   #3
lord_Tux
LQ Newbie
 
Registered: Apr 2010
Posts: 2

Original Poster
Rep: Reputation: 0
its in Chapter 5.4

and this is the output from configure:

Code:
loading cache ./config.cache
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking build system type... x86_64-unknown-linux-gnu
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether ln works... (cached) yes
checking whether ln -s works... (cached) yes
checking for gcc... (cached) gcc -B/usr/bin/
checking whether the C compiler (gcc -B/usr/bin/  ) works... yes
checking whether the C compiler (gcc -B/usr/bin/  ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc -B/usr/bin/ accepts -g... (cached) yes
checking for gnatbind... no
checking whether compiler driver understands Ada... (cached) no
checking how to compare bootstrapped objects... (cached) cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... yes
checking for MPFR... no
*** This configuration is not supported in the following subdirectories:
     target-libada gnattools target-libstdc++-v3 target-libgfortran target-libffi target-boehm-gc target-zlib target-libjava zlib fastjar target-libobjc
    (Any other directories should still work fine.)
*** removing build-x86_64-unknown-linux-gnu/libiberty/Makefile to force reconfigure
rm: cannot remove `build-x86_64-unknown-linux-gnu/libiberty/Makefile': Permission denied
*** removing build-x86_64-unknown-linux-gnu/fixincludes/Makefile to force reconfigure
rm: cannot remove `build-x86_64-unknown-linux-gnu/fixincludes/Makefile': Permission denied
*** removing intl/Makefile to force reconfigure
rm: cannot remove `intl/Makefile': Permission denied
*** removing libiberty/Makefile to force reconfigure
rm: cannot remove `libiberty/Makefile': Permission denied
*** removing libcpp/Makefile to force reconfigure
rm: cannot remove `libcpp/Makefile': Permission denied
*** removing gcc/Makefile to force reconfigure
rm: cannot remove `gcc/Makefile': Permission denied
checking for bison... no
checking for byacc... no
checking for yacc... no
checking for bison... no
checking for gm4... (cached) m4
checking for flex... no
checking for lex... no
checking for flex... no
checking for makeinfo... no
checking for expect... no
checking for runtest... no
checking for x86_64-unknown-linux-gnu-ar... (cached) ar
checking for x86_64-unknown-linux-gnu-as... (cached) as
checking for x86_64-unknown-linux-gnu-dlltool... no
checking for dlltool... no
checking for x86_64-unknown-linux-gnu-ld... (cached) /usr/bin/ld
checking for x86_64-unknown-linux-gnu-lipo... no
checking for lipo... no
checking for x86_64-unknown-linux-gnu-nm... (cached) nm
checking for x86_64-unknown-linux-gnu-ranlib... (cached) ranlib
checking for x86_64-unknown-linux-gnu-strip... (cached) strip
checking for x86_64-unknown-linux-gnu-windres... no
checking for windres... no
checking for x86_64-unknown-linux-gnu-objcopy... (cached) objcopy
checking for x86_64-unknown-linux-gnu-objdump... (cached) objdump
checking for x86_64-unknown-linux-gnu-ar... (cached) ar
checking for x86_64-unknown-linux-gnu-as... (cached) as
checking for x86_64-unknown-linux-gnu-cc... (cached) cc
checking for x86_64-unknown-linux-gnu-c++... (cached) c++
checking for x86_64-unknown-linux-gnu-dlltool... no
checking for dlltool... no
checking for x86_64-unknown-linux-gnu-gcc... (cached) gcc
checking for x86_64-unknown-linux-gnu-gcj... no
checking for gcj... no
checking for x86_64-unknown-linux-gnu-gfortran... no
checking for gfortran... no
checking for x86_64-unknown-linux-gnu-ld... (cached) ld
checking for x86_64-unknown-linux-gnu-lipo... no
checking for lipo... no
checking for x86_64-unknown-linux-gnu-nm... (cached) nm
checking for x86_64-unknown-linux-gnu-objdump... (cached) objdump
checking for x86_64-unknown-linux-gnu-ranlib... (cached) ranlib
checking for x86_64-unknown-linux-gnu-strip... (cached) strip
checking for x86_64-unknown-linux-gnu-windres... no
checking for windres... no
checking where to find the target ar... host tool
checking where to find the target as... host tool
checking where to find the target cc... just compiled
checking where to find the target c++... host tool
checking where to find the target c++ for libstdc++... host tool
checking where to find the target dlltool... host tool
checking where to find the target gcc... just compiled
checking where to find the target gcj... host tool
checking where to find the target gfortran... host tool
checking where to find the target ld... host tool
checking where to find the target lipo... host tool
checking where to find the target nm... host tool
checking where to find the target objdump... host tool
checking where to find the target ranlib... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
checking if symbolic links between directories work... (cached) yes
creating ./config.status
creating Makefile
Then this is the output from sudo make bootstrap:

Code:
make[1]: Entering directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/build-x86_64-unknown-linux-gnu/libiberty'
make[2]: Entering directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/build-x86_64-unknown-linux-gnu/libiberty/testsuite'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/build-x86_64-unknown-linux-gnu/libiberty/testsuite'
make[1]: Leaving directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/build-x86_64-unknown-linux-gnu/libiberty'
make[1]: Entering directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/build-x86_64-unknown-linux-gnu/fixincludes'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/build-x86_64-unknown-linux-gnu/fixincludes'
make[1]: Entering directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/intl'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/intl'
make[1]: Entering directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/libiberty'
make[2]: Entering directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/libiberty/testsuite'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/libiberty/testsuite'
make[1]: Leaving directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/libiberty'
make[1]: Entering directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/libcpp'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/libcpp'
Bootstrapping the compiler
make[1]: Entering directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/gcc'
make CC="gcc -B/usr/bin/" libdir=/tools/lib LANGUAGES="c " \
		CFLAGS="-g -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING" \
		MAKEINFO="/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-4.1.2/missing makeinfo --split-size=5000000" MAKEINFOFLAGS="--no-split" \
		COVERAGE_FLAGS= OBJS-onestep="tree-chrec.o tree-scalar-evolution.o tree-data-ref.o tree-cfg.o tree-dfa.o tree-eh.o tree-ssa.o tree-optimize.o tree-gimple.o gimplify.o tree-pretty-print.o tree-into-ssa.o tree-outof-ssa.o tree-ssa-ccp.o tree-vn.o tree-ssa-uncprop.o tree-ssa-dce.o  tree-ssa-copy.o tree-nrv.o tree-ssa-copyrename.o tree-ssa-pre.o tree-ssa-live.o tree-ssa-operands.o tree-ssa-alias.o tree-ssa-phiopt.o tree-ssa-forwprop.o tree-nested.o tree-ssa-dse.o tree-ssa-dom.o domwalk.o tree-tailcall.o gimple-low.o tree-iterator.o tree-phinodes.o tree-ssanames.o tree-sra.o tree-complex.o tree-vect-generic.o tree-ssa-loop.o tree-ssa-loop-niter.o tree-ssa-loop-manip.o tree-ssa-threadupdate.o tree-vectorizer.o tree-vect-analyze.o tree-vect-transform.o tree-ssa-loop-ivcanon.o tree-ssa-propagate.o tree-ssa-address.o tree-ssa-math-opts.o tree-ssa-loop-ivopts.o tree-if-conv.o tree-ssa-loop-unswitch.o alias.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o cfg.o cfganal.o cfgbuild.o cfgcleanup.o cfglayout.o cfgloop.o cfgloopanal.o cfgloopmanip.o loop-init.o loop-unswitch.o loop-unroll.o cfgrtl.o combine.o conflict.o convert.o coverage.o cse.o cselib.o dbxout.o ddg.o tree-ssa-loop-ch.o loop-invariant.o tree-ssa-loop-im.o debug.o df.o diagnostic.o dojump.o dominance.o loop-doloop.o dwarf2asm.o dwarf2out.o emit-rtl.o except.o explow.o loop-iv.o expmed.o expr.o final.o flow.o fold-const.o function.o gcse.o genrtl.o ggc-common.o global.o graph.o gtype-desc.o haifa-sched.o hooks.o ifcvt.o insn-attrtab.o insn-emit.o insn-modes.o insn-extract.o insn-opinit.o insn-output.o insn-peep.o insn-recog.o integrate.o intl.o jump.o  langhooks.o lcm.o lists.o local-alloc.o loop.o mode-switching.o modulo-sched.o optabs.o options.o opts.o params.o postreload.o postreload-gcse.o predict.o insn-preds.o pointer-set.o print-rtl.o print-tree.o profile.o value-prof.o var-tracking.o real.o recog.o reg-stack.o regclass.o regmove.o regrename.o reload.o reload1.o reorg.o resource.o rtl.o rtlanal.o rtl-error.o sbitmap.o sched-deps.o sched-ebb.o sched-rgn.o sched-vis.o sdbout.o simplify-rtx.o sreal.o stmt.o stor-layout.o stringpool.o targhooks.o timevar.o toplev.o tracer.o tree.o tree-dump.o varasm.o varray.o vec.o version.o vmsdbgout.o xcoffout.o alloc-pool.o et-forest.o cfghooks.o bt-load.o pretty-print.o ggc-page.o web.o passes.o tree-profile.o rtlhooks.o cfgexpand.o lambda-mat.o lambda-trans.o	lambda-code.o tree-loop-linear.o tree-ssa-sink.o tree-vrp.o tree-stdarg.o tree-cfgcleanup.o tree-ssa-reassoc.o tree-ssa-structalias.o tree-object-size.o i386.o  host-linux.o tree-inline.o cgraph.o cgraphunit.o tree-nomudflap.o ipa.o ipa-inline.o ipa-utils.o ipa-reference.o ipa-pure-const.o ipa-type-escape.o ipa-prop.o ipa-cp.o"
make[2]: Entering directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/gcc'
make \
	  CFLAGS="-g -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -Wmissing-format-attribute  " \
	  CONFIG_H="config.h  auto-host.h ../../gcc-4.1.2/gcc/../include/ansidecl.h" \
	  MAKEOVERRIDES= \
	  -f libgcc.mk all
make[3]: Entering directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/gcc'
make GCC_FOR_TARGET=" ./xgcc -B./ -B/tools/x86_64-unknown-linux-gnu/bin/ -isystem /tools/x86_64-unknown-linux-gnu/include -isystem /tools/x86_64-unknown-linux-gnu/sys-include -L/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/gcc/../ld" \
	  AR_FOR_TARGET="ar" \
	  AR_CREATE_FOR_TARGET="ar  rc" \
	  AR_EXTRACT_FOR_TARGET="ar  x" \
	  AR_FLAGS_FOR_TARGET="" \
	  CC="gcc -B/usr/bin/" CFLAGS="-g -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -Wmissing-format-attribute  " \
	  BUILD_PREFIX="" \
	  BUILD_PREFIX_1="loser-" \
	  LANGUAGES="c " \
	  LIBGCC2_CFLAGS="-O2  -O2 -g -O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  "  \
	  MULTILIB_CFLAGS="" T= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o crtfastmath.o
make[4]: Entering directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/gcc'
make[4]: `crtend.o' is up to date.
make[4]: `crtbeginS.o' is up to date.
make[4]: `crtendS.o' is up to date.
make[4]: `crtbeginT.o' is up to date.
make[4]: `crtfastmath.o' is up to date.
make[4]: Leaving directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/gcc'
./xgcc -B./ -B/tools/x86_64-unknown-linux-gnu/bin/ -isystem /tools/x86_64-unknown-linux-gnu/include -isystem /tools/x86_64-unknown-linux-gnu/sys-include -L/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/gcc/../ld -O2  -O2 -g -O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc/./libgcc.map -o ./libgcc_s.so.1.tmp  libgcc/./_muldi3_s.o libgcc/./_negdi2_s.o libgcc/./_lshrdi3_s.o libgcc/./_ashldi3_s.o libgcc/./_ashrdi3_s.o libgcc/./_cmpdi2_s.o libgcc/./_ucmpdi2_s.o libgcc/./_clear_cache_s.o libgcc/./_enable_execute_stack_s.o libgcc/./_trampoline_s.o libgcc/./__main_s.o libgcc/./_absvsi2_s.o libgcc/./_absvdi2_s.o libgcc/./_addvsi3_s.o libgcc/./_addvdi3_s.o libgcc/./_subvsi3_s.o libgcc/./_subvdi3_s.o libgcc/./_mulvsi3_s.o libgcc/./_mulvdi3_s.o libgcc/./_negvsi2_s.o libgcc/./_negvdi2_s.o libgcc/./_ctors_s.o libgcc/./_ffssi2_s.o libgcc/./_ffsdi2_s.o libgcc/./_clz_s.o libgcc/./_clzsi2_s.o libgcc/./_clzdi2_s.o libgcc/./_ctzsi2_s.o libgcc/./_ctzdi2_s.o libgcc/./_popcount_tab_s.o libgcc/./_popcountsi2_s.o libgcc/./_popcountdi2_s.o libgcc/./_paritysi2_s.o libgcc/./_paritydi2_s.o libgcc/./_powisf2_s.o libgcc/./_powidf2_s.o libgcc/./_powixf2_s.o libgcc/./_powitf2_s.o libgcc/./_mulsc3_s.o libgcc/./_muldc3_s.o libgcc/./_mulxc3_s.o libgcc/./_multc3_s.o libgcc/./_divsc3_s.o libgcc/./_divdc3_s.o libgcc/./_divxc3_s.o libgcc/./_divtc3_s.o libgcc/./_fixunssfsi_s.o libgcc/./_fixunsdfsi_s.o libgcc/./_fixunsxfsi_s.o libgcc/./_fixsfdi_s.o libgcc/./_fixunssfdi_s.o libgcc/./_floatdisf_s.o libgcc/./_fixdfdi_s.o libgcc/./_fixunsdfdi_s.o libgcc/./_floatdidf_s.o libgcc/./_fixxfdi_s.o libgcc/./_fixunsxfdi_s.o libgcc/./_floatdixf_s.o libgcc/./_fixtfdi_s.o libgcc/./_fixunstfdi_s.o libgcc/./_floatditf_s.o libgcc/./_divdi3_s.o libgcc/./_moddi3_s.o libgcc/./_udivdi3_s.o libgcc/./_umoddi3_s.o libgcc/./_udiv_w_sdiv_s.o libgcc/./_udivmoddi4_s.o libgcc/./unwind-dw2_s.o libgcc/./unwind-dw2-fde-glibc_s.o libgcc/./unwind-sjlj_s.o libgcc/./gthr-gnat_s.o libgcc/./unwind-c_s.o -lc && rm -f ./libgcc_s.so && if [ -f ./libgcc_s.so.1 ]; then mv -f ./libgcc_s.so.1 ./libgcc_s.so.1.backup; else true; fi && mv ./libgcc_s.so.1.tmp ./libgcc_s.so.1 && ln -s libgcc_s.so.1 ./libgcc_s.so
/lib/libc.so.6: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make[3]: *** [libgcc_s.so] Error 1
make[3]: Leaving directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/gcc'
make[2]: *** [stmp-multilib] Error 2
make[2]: Leaving directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/media/4af7c556-6828-4dcc-ab94-d047f4ab1df8/sources/gcc-build/gcc'
make: *** [bootstrap] Error 2
 
Old 04-18-2010, 12:48 PM   #4
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Did you check the host system requirements? Looks like you do not have bison installed. First make sure your system meets that requirements and then start over with freshly untarred sources.

Also, there are some permission issues in your config file. You are supposed to issue those commands as user lfs. So do not use sudo here, you mustn't be root in chapter 5. Just untar the sources as user lfs and proceed as described in the book.

Maybe it's best if you start reading the book again from the beginning and do not skip any chapter. You will not succeed building your LFS on the fly.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
GCC Build error Bootstrap comparison failure! R03L Linux From Scratch 4 07-22-2009 01:55 PM
Error compiling gcc 3.3.6 with 64bit gcc 4.0.3 cs-cam Linux - Software 0 04-22-2006 06:20 AM
LFS5.1.1 gcc-core-3.3.3 bootstrap (first pass) error. Cynric Linux From Scratch 3 08-18-2004 10:34 PM
GCC first build for LFS, bootstrap error Blibblob Linux From Scratch 8 01-07-2004 06:50 PM
gcc 2.3 bootstrap error NGraphiX Linux From Scratch 1 05-15-2003 12:45 PM

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

All times are GMT -5. The time now is 11:22 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