satimis 发表于 2005-8-1 16:31:43

5.12. Binutils-2.15.94.0.2.2 -

Hi folks,

LFS 6.1

6.12. Re-adjusting the Toolchain
http://www.linuxfromscratch.org/lfs/view/stable/chapter06/readjusting.html

Because I overlooked the "Warning" of
5.12. Binutils-2.15.94.0.2.2 - Pass 2
http://www.linuxfromscratch.org/lfs/view/stable/chapter05/binutils-pass2.html

having removed Binutils source and build directories previously.Therefore I have redo it.

Re-ran
5.3. Binutils-2.15.94.0.2.2 - Pass 1
http://www.linuxfromscratch.org/lfs/view/stable/chapter05/binutils-pass1.html

All went through without complaint


5.12. Binutils-2.15.94.0.2.2 - Pass 2
http://www.linuxfromscratch.org/lfs/view/stable/chapter05/binutils-pass2.html

root:/sources/binutils-build# ../binutils-2.15.94.0.2.2/configure --prefix=/tools \
> --disable-nls --enable-shared --with-lib-path=/tools/lib

Went through without problem

root:/sources/binutils-build# make
......
size.o(.text+0x201): In function `sysv_internal_sizer':
../../binutils-2.15.94.0.2.2/binutils/size.c:499: undefined reference to `bfd_abs_section'
size.o(.text+0x212):../../binutils-2.15.94.0.2.2/binutils/size.c:499: undefined reference to `bfd_und_section'
size.o(.text+0x271): In function `sysv_internal_printer':
../../binutils-2.15.94.0.2.2/binutils/size.c:521: undefined reference to `bfd_abs_section'
size.o(.text+0x282):../../binutils-2.15.94.0.2.2/binutils/size.c:521: undefined reference to `bfd_und_section'
size.o(.text+0x331): In function `print_sizes':
../../binutils-2.15.94.0.2.2/binutils/size.c:451: undefined reference to `bfd_map_over_sections'
size.o(.text+0x44b):../../binutils-2.15.94.0.2.2/binutils/size.c:542: undefined reference to `bfd_map_over_sections'
size.o(.text+0x4fd):../../binutils-2.15.94.0.2.2/binutils/size.c:561: undefined reference to `bfd_map_over_sections'
size.o(.text+0x5cb): In function `display_bfd':
../../binutils-2.15.94.0.2.2/binutils/size.c:263: undefined reference to `bfd_check_format'
size.o(.text+0x5f4):../../binutils-2.15.94.0.2.2/binutils/size.c:267: undefined reference to `bfd_check_format_matches'
size.o(.text+0x601):../../binutils-2.15.94.0.2.2/binutils/size.c:274: undefined reference to `bfd_get_error'
size.o(.text+0x61f):../../binutils-2.15.94.0.2.2/binutils/size.c:283: undefined reference to `bfd_check_format_matches'
size.o(.text+0x659):../../binutils-2.15.94.0.2.2/binutils/size.c:290: undefined reference to `bfd_core_file_failing_command'
size.o(.text+0x6ab):../../binutils-2.15.94.0.2.2/binutils/size.c:300: undefined reference to `bfd_get_error'
size.o(.text+0x71c): In function `display_file':
../../binutils-2.15.94.0.2.2/binutils/size.c:349: undefined reference to `bfd_openr'
size.o(.text+0x737):../../binutils-2.15.94.0.2.2/binutils/size.c:357: undefined reference to `bfd_check_format'
size.o(.text+0x74f):../../binutils-2.15.94.0.2.2/binutils/size.c:317: undefined reference to `bfd_set_error'
size.o(.text+0x75b):../../binutils-2.15.94.0.2.2/binutils/size.c:319: undefined reference to `bfd_openr_next_archived_file'
size.o(.text+0x77d):../../binutils-2.15.94.0.2.2/binutils/size.c:333: undefined reference to `bfd_close'
size.o(.text+0x78b):../../binutils-2.15.94.0.2.2/binutils/size.c:317: undefined reference to `bfd_set_error'
size.o(.text+0x797):../../binutils-2.15.94.0.2.2/binutils/size.c:319: undefined reference to `bfd_openr_next_archived_file'
size.o(.text+0x7a2):../../binutils-2.15.94.0.2.2/binutils/size.c:322: undefined reference to `bfd_get_error'
size.o(.text+0x7c8):../../binutils-2.15.94.0.2.2/binutils/size.c:338: undefined reference to `bfd_close'
size.o(.text+0x7d0):../../binutils-2.15.94.0.2.2/binutils/size.c:362: undefined reference to `bfd_close'
size.o(.text+0x7f3):../../binutils-2.15.94.0.2.2/binutils/size.c:362: undefined reference to `bfd_close'
size.o(.text+0x86e): In function `main':
../../binutils-2.15.94.0.2.2/binutils/size.c:137: undefined reference to `bfd_init'
bucomm.o(.text+0xb): In function `bfd_nonfatal':
bucomm.c: undefined reference to `bfd_get_error'
bucomm.o(.text+0x13):bucomm.c: undefined reference to `bfd_errmsg'
bucomm.o(.text+0x179): In function `set_default_bfd_target':
bucomm.c: undefined reference to `bfd_get_error'
bucomm.o(.text+0x181):bucomm.c: undefined reference to `bfd_errmsg'
bucomm.o(.text+0x3c9): In function `display_info':
bucomm.c: undefined reference to `bfd_openw'
bucomm.o(.text+0x415):bucomm.c: undefined reference to `bfd_set_format'
bucomm.o(.text+0x46a):bucomm.c: undefined reference to `bfd_close_all_done'
bucomm.o(.text+0x668):bucomm.c: undefined reference to `bfd_close_all_done'
bucomm.o(.text+0x693):bucomm.c: undefined reference to `bfd_openw'
bucomm.o(.text+0x6ae):bucomm.c: undefined reference to `bfd_set_format'
bucomm.o(.text+0x726):bucomm.c: undefined reference to `bfd_get_error'
bucomm.o(.text+0x7e1):bucomm.c: undefined reference to `bfd_get_error'
bucomm.o(.text+0x9eb): In function `parse_vma':
bucomm.c: undefined reference to `bfd_scan_vma'
../bfd/.libs/libbfd.so: undefined reference to `bfd_elf32_i386_vec'
../bfd/.libs/libbfd.so: undefined reference to `bfd_efi_app_ia32_vec'
../bfd/.libs/libbfd.so: undefined reference to `symbolsrec_vec'
../bfd/.libs/libbfd.so: undefined reference to `bfd_malloc'
../bfd/.libs/libbfd.so: undefined reference to `bfd_elf32_little_generic_vec'
../bfd/.libs/libbfd.so: undefined reference to `i386linux_vec'
../bfd/.libs/libbfd.so: undefined reference to `srec_vec'
../bfd/.libs/libbfd.so: undefined reference to `binary_vec'
../bfd/.libs/libbfd.so: undefined reference to `ihex_vec'
../bfd/.libs/libbfd.so: undefined reference to `tekhex_vec'
../bfd/.libs/libbfd.so: undefined reference to `bfd_i386_arch'
../bfd/.libs/libbfd.so: undefined reference to `trad_core_vec'
../bfd/.libs/libbfd.so: undefined reference to `bfd_elf32_big_generic_vec'
collect2: ld returned 1 exit status
make[3]: *** [size] Error 1
make[3]: Leaving directory `/sources/binutils-build/binutils'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/sources/binutils-build/binutils'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory `/sources/binutils-build/binutils'
make: *** [all-binutils] Error 2

readelf, interpreter:-
/tools/bin/gcc
/tools/bin/g++
/tools/bin/bash

all displayed /tools/lib/ld-linux.so.2]

root:/sources/binutils-build# echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin

root:/sources/binutils-build# export PATH=/tools/bin:/bin:/usr/bin
root:/sources/binutils-build# echo $PATH
/tools/bin:/bin:/usr/bin

                        
Santy Check
root:/sources/binutils-build# echo 'main(){}' > dummy.c
root:/sources/binutils-build# cc dummy.c
root:/sources/binutils-build# readelf -l a.out | grep ': /lib'
No printout

root:/sources/binutils-build# readelf -l a.out | grep ': /tools'
      [Requesting program interpreter: /tools/lib/ld-linux.so.2]


Re-ran
5.12. Binutils-2.15.94.0.2.2 - Pass 2

root:/sources/binutils-build# ../binutils-2.15.94.0.2.2/configure --prefix=/tools --disable-nls --enable-shared --with-lib-path=/tools/lib

Went through without complaint

root:/sources/binutils-build# make...
......
collect2: ld returned 1 exit status
make[3]: *** [size] Error 1
make[3]: Leaving directory `/sources/binutils-build/binutils'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/sources/binutils-build/binutils'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory `/sources/binutils-build/binutils'
make: *** [all-binutils] Error 2

Please advise how to fix this problem

Remark: Previously both
5.3. Binutils-2.15.94.0.2.2 - Pass 1
and
5.12. Binutils-2.15.94.0.2.2 - Pass 2

went through without problem

Remark:
Rechecked the Notes taken down previously during building LFS;
Bison-2.0
Flex-2.5.31

already installed without problem

B.R.
satimis

linky_fan 发表于 2005-8-2 16:22:36

You use rootduring the' lfsing?

satimis 发表于 2005-8-4 10:48:53

You use rootduring the' lfsing?Yes.Both the FC3 Host and LFS

On the FC3 Host I ran
"su"

NOT

"su -"


B.R.
satimis

linky_fan 发表于 2005-8-4 19:10:58


"su -"

This can provide the "pure"environment

blackwolf 发表于 2005-8-8 11:18:09

After Adjusting Toolchain and before binutils pass2 you must delete binutils-build

satimis 发表于 2005-8-8 11:37:01

After Adjusting Toolchain and before binutils pass2 you must delete binutils-buildFrom my Notes, "binutils source" and "binutils-build" must be deleted after each section completed;
binutils Pass-1 and Pass-2

If following the LFS 6.1 book leaving them for future use after "binutils Pass-1" then on subsequent section it complained with ERROR indicated.I don't knwo WHY.

B.R.
satimis

blackwolf 发表于 2005-8-8 11:51:39

1. Binutils Pass 1 (Do not remove the build and source)
2. Adjusting Toolchain ( the Binutils Pass 1 build directory is needed at here)
3. remove the build directory
4. Binutils Pass2 (Do not remove the build and source)
5. Re-adjusting the Toolchain (the Binutils Pass2 build directory is needed at here)
6. remove the build directory
7. install the Binutils Final Pass.

satimis 发表于 2005-8-8 12:09:57

1. Binutils Pass 1 (Do not remove the build and source)
2. Adjusting Toolchain ( the Binutils Pass 1 build directory is needed at here)
3. remove the build directory
4. Binutils Pass2 (Do not remove the build and source)
5. Re-adjusting the Toolchain (the Binutils Pass2 build directory is needed at here)
6. remove the build directory
7. install the Binutils Final Pass.Yes, according to my Notes I removed the "binutils source" and "binutils-build" directory and fresh-extracting its tarball before proceeding "Pass 2" and "binutils final" respectively.Then it worked without complaint.

B.R.
satimis

timwong 发表于 2005-8-8 13:28:25

because, in the LFS 6.1 book "5.7. Adjusting the Toolchain" section mention:
Now that the adjusted linker is installed, the Binutils build and source directories should be removed.
thanks blackwolf
页: [1]
查看完整版本: 5.12. Binutils-2.15.94.0.2.2 -