LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 08-01-2005, 03:17 AM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,385

Rep: Reputation: 52
5.12. Binutils-2.15.94.0.2.2 - Pass 2 - error on "make"


Hi folks,

LFS 6.1

6.12. Re-adjusting the Toolchain
http://www.linuxfromscratch.org/lfs/...adjusting.html

Because I overlooked the "Warning" of
5.12. Binutils-2.15.94.0.2.2 - Pass 2
http://www.linuxfromscratch.org/lfs/...ils-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/...ils-pass1.html

All went through without complaint


5.12. Binutils-2.15.94.0.2.2 - Pass 2
http://www.linuxfromscratch.org/lfs/...ils-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
Code:
 
......
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
Code:
/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
Code:
/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'
Code:
      [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
Code:
...
...... 
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

Last edited by satimis; 08-01-2005 at 07:15 AM.
 
Old 08-01-2005, 07:52 PM   #2
kjordan
Member
 
Registered: Jul 2004
Distribution: LFS, I felt the itch and scratched it
Posts: 227

Rep: Reputation: 31
You may be able to get away without having to do that step since the note after the command says that testing has shown that the resulting binutils binaries appear to be identical.
 
Old 08-01-2005, 08:54 PM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,385

Original Poster
Rep: Reputation: 52
Hi kjordan,

Tks for your advice.

Quote:
You may be able to get away without having to do that step since the note after the command says that testing has shown that the resulting binutils binaries appear to be identical.
Because I looked one step forward. On 6.13. Binutils-2.15.94.0.2.2 it also required me to redo Sections;
5.3. Binutils-2.15.94.0.2.2 - Pass 1
and
5.12. Binutils-2.15.94.0.2.2 - Pass 2

so I started to redo the above 2 sections first.

I'll move on to see what will happen. If no problem then I'll continue on "Pass 2" as "Pass 1" already getting through. If failing again I'll remove both Binutils-2.15.94 source and binutils-build as well and redo "Pass 1" and "Pass 2" the 2rd time.

One thought came up to my mind about the failure of "Pass 2" this time. The kernel of the Host FC3 box has been upgraded recently. I could not recall exactly nor maintain a record on the date upgrading the kernel of this box. I ran "yum update" on this box to upgrage some packages including kernel. But I could not trace the date whether it was done before my first compiling "Pass 1" or "Pass 2" or after.

B.R.
satimis
 
Old 08-02-2005, 05:10 AM   #4
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,385

Original Poster
Rep: Reputation: 52
Hi kjordan,

First time started PC

[satimis@localhost ~]$ su
Password:
[root@localhost satimis]# export LFS=/mnt/lfs
[root@localhost satimis]# mount /dev/hda6 /mnt/lfs
[root@localhost satimis]# mkdir -p $LFS
[root@localhost satimis]# echo $LFS
/mnt/lfs

Continued
[root@localhost satimis]# mkdir -p $LFS/{proc,sys}
[root@localhost satimis]# mount -t proc proc $LFS/proc
[root@localhost satimis]# mount -t sysfs sysfs $LFS/sys
[root@localhost satimis]# mount -f -t tmpfs tmpfs $LFS/dev
[root@localhost satimis]# mount -f -t tmpfs tmpfs $LFS/dev/shm
[root@localhost satimis]# mount -f -t devpts -o gid=4,mode=620 devpts $LFS/dev/pts
[root@localhost satimis]# /usr/sbin/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


6.8.1. Creating Initial Device Nodes
root:/# mknod -m 600 /dev/console c 5 1 (omited)
root:/# mknod -m 666 /dev/null c 1 3 (omitted)


6.8.2. Mounting tmpfs and Populating /dev
root:/# mount -n -t tmpfs none /dev
root:/#
root:/# mknod -m 622 /dev/console c 5 1
root:/# mknod -m 666 /dev/null c 1 3
root:/# mknod -m 666 /dev/zero c 1 5
root:/# mknod -m 666 /dev/ptmx c 5 2
root:/# mknod -m 666 /dev/tty c 5 0
root:/# mknod -m 444 /dev/random c 1 8
root:/# mknod -m 444 /dev/urandom c 1 9
root:/# chown root:tty /dev/{console,ptmx,tty}
root:/#
root:/# ln -s /proc/self/fd /dev/fd
root:/# ln -s /proc/self/fd/0 /dev/stdin
root:/# ln -s /proc/self/fd/1 /dev/stdout
root:/# ln -s /proc/self/fd/2 /dev/stderr
root:/# ln -s /proc/kcore /dev/core
root:/# mkdir /dev/pts
root:/# mkdir /dev/shm
root:/#
root:/# mount -t devpts -o gid=4,mode=620 none /dev/pts
root:/# mount -t tmpfs none /dev/shm
(Remark: all no printout )


6.12. Re-adjusting the Toolchain
http://www.linuxfromscratch.org/lfs/...adjusting.html

Skip :-
make -C ld INSTALL=/tools/bin/install install

root:/# perl -pi -e 's@ /tools/lib/ld-linux.so.2@ /lib/ld-linux.so.2@g;' \
> -e 's@\*startfile_prefix_spec:\n@$_/usr/lib/ @g;' \
> `gcc --print-file specs`
root:/

Sanity Check
root:/# echo 'main(){}' > dummy.c
root:/# cc dummy.c
root:/# readelf -l a.out | grep ': /lib'
Code:
      [Requesting program interpreter: /lib/ld-linux.so.2]
root:/# rm dummy.c a.out
root:/#


6.13. Binutils-2.15.94.0.2.2
http://www.linuxfromscratch.org/lfs/.../binutils.html

Remark: Redo Binutils "Pass 1" and "Pass 2" but failed again as reported on my previous posting


Removed both "binutils-2.15.94.0.2.2" and "binutils-build" again on Konqueror


Contiued
root: cd sources/
root:/sources# tar xjf binutils-2.15.94.0.2.2.tar.bz2
root:/sources# mkdir binutils-build
root:/sources# cd binutils-build/

root:/sources/binutils-build# expect -c "spawn ls"
Code:
spawn ls
root:/sources/binutils-build# cd ..
root:/sources# cd binutils-2.15.94.0.2.2
root:/sources/binutils-2.15.94.0.2.2# expect -c "spawn ls"
Code:
spawn ls
root:/sources/binutils-build# ../binutils-2.15.94.0.2.2/configure --prefix=/usr --enable-shared
root:/sources/binutils-build# make tooldir=/usr
Code:
make[3]: Leaving directory `/sources/binutils-build/ld'
make[2]: Leaving directory `/sources/binutils-build/ld'
make[1]: Leaving directory `/sources/binutils-build/ld'
root:/sources/binutils-build# make check
Code:
./test-demangle: 746 tests, 0 failures
make[2]: Leaving directory `/sources/binutils-build/libiberty/testsuite'
make[1]: Leaving directory `/sources/binutils-build/libiberty'
root:/sources/binutils-build# make tooldir=/usr install
Code:
       
make[2]: Entering directory `/sources/binutils-build/libiberty/testsuite'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/sources/binutils-build/libiberty/testsuite'
make[1]: Leaving directory `/sources/binutils-build/libiberty'
root:/sources/binutils-build# cp ../binutils-2.15.94.0.2.2/include/libiberty.h /usr/include
(No printout)


6.14. GCC-3.4.3
http://www.linuxfromscratch.org/lfs/...ter06/gcc.html

root:/# cd sources/
root:/sources# tar xjf gcc-3.4.3.tar.bz2
root:/sources# cd gcc-3.4.3/
root:/sources/gcc-3.4.3# patch -Np1 -i ../gcc-3.4.3-no_fixincludes-1.patch
Code:
patching file gcc/Makefile.in
root:/sources/gcc-3.4.3# patch -Np1 -i ../gcc-3.4.3-linkonce-1.patch
Code:
patching file gcc/config/alpha/alpha.c
patching file gcc/config/arm/pe.h
patching file gcc/config/avr/avr.c
patching file gcc/config/darwin.h
patching file gcc/config/i386/cygming.h
patching file gcc/config/i386/i386-interix.h
patching file gcc/config/ip2k/ip2k.c
patching file gcc/config/mcore/mcore.c
patching file gcc/config/rs6000/xcoff.h
patching file gcc/doc/tm.texi
patching file gcc/final.c
patching file gcc/output.h
patching file gcc/target-def.h
patching file gcc/target.h
patching file gcc/testsuite/g++.old-deja/g++.other/comdat4-aux.cc
patching file gcc/testsuite/g++.old-deja/g++.other/comdat4.C
patching file gcc/varasm.c
root:/sources/gcc-3.4.3# sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
root:/sources/gcc-3.4.3# mkdir ../gcc-build
root:/sources/gcc-3.4.3# cd ../gcc-build
root:/sources/gcc-build# ../gcc-3.4.3/configure --prefix=/usr \
> --libexecdir=/usr/lib --enable-shared \
> --enable-threads=posix --enable-__cxa_atexit \
> --enable-clocale=gnu --enable-languages=c,c++
root:/sources/gcc-build# make
Code:
..   
....
fi
make[4]: Leaving directory `/sources/gcc-build/i686-pc-linux-gnu/libstdc++-v3'
make[3]: Leaving directory `/sources/gcc-build/i686-pc-linux-gnu/libstdc++-v3'
make[2]: Leaving directory `/sources/gcc-build/i686-pc-linux-gnu/libstdc++-v3'
make[1]: Leaving directory `/sources/gcc-build/i686-pc-linux-gnu/libstdc++-v3'
root:/sources/gcc-build#
root:/sources/gcc-build# make -k check
Code:
...
....
make[3]: Leaving directory `/sources/gcc-build/i686-pc-linux-gnu/libstdc++-v3'
make[2]: Leaving directory `/sources/gcc-build/i686-pc-linux-gnu/libstdc++-v3'
make[1]: *** [check-recursive] Error 1
make[1]: Target `check' not remade because of errors.
make[1]: Leaving directory `/sources/gcc-build/i686-pc-linux-gnu/libstdc++-v3'
make: *** [check-target-libstdc++-v3] Error 2
make[1]: Entering directory `/sources/gcc-build/i686-pc-linux-gnu/libiberty'
make[2]: Entering directory `/sources/gcc-build/i686-pc-linux-gnu/libiberty/testsuite'
make[2]: Nothing to be done for `check'.
make[2]: Leaving directory `/sources/gcc-build/i686-pc-linux-gnu/libiberty/testsuite'
make[1]: Leaving directory `/sources/gcc-build/i686-pc-linux-gnu/libiberty'
make: Target `check' not remade because of errors.
It seemed error present ???

Moved on
root:/sources/gcc-build# make install
Code:
...
....
fi
make[4]: Leaving directory `/sources/gcc-build/i686-pc-linux-gnu/libstdc++-v3'
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/sources/gcc-build/i686-pc-linux-gnu/libstdc++-v3'
make[2]: Leaving directory `/sources/gcc-build/i686-pc-linux-gnu/libstdc++-v3'
make[1]: Leaving directory `/sources/gcc-build/i686-pc-linux-gnu/libstdc++-v3'
make[1]: Entering directory `/sources/gcc-build/i686-pc-linux-gnu/libiberty'
make[2]: Entering directory `/sources/gcc-build/i686-pc-linux-gnu/libiberty/testsuite'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/sources/gcc-build/i686-pc-linux-gnu/libiberty/testsuite'
make[1]: Leaving directory `/sources/gcc-build/i686-pc-linux-gnu/libiberty'
root:/sources/gcc-build# ln -s ../usr/bin/cpp /lib
(No printout)

Checking - Sanity Check
http://www.linuxfromscratch.org/lfs/...adjusting.html

root:/sources/gcc-build# ln -s ../usr/bin/cpp /lib
root:/sources/gcc-build# echo 'main(){}' > dummy.c
root:/sources/gcc-build# cc dummy.c
root:/sources/gcc-build# readelf -l a.out | grep ': /lib'
Code:
      [Requesting program interpreter: /lib/ld-linux.so.2]
It seemed no error indicated here.

root:/sources/gcc-build# rm dummy.c a.out
root:/sources/gcc-build#

Shall I redo this Section. I'm now continue moving on.

B.R.
satimis
 
Old 08-02-2005, 05:26 PM   #5
kjordan
Member
 
Registered: Jul 2004
Distribution: LFS, I felt the itch and scratched it
Posts: 227

Rep: Reputation: 31
Seems fine, you can move on
 
  


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
Binutils-2.15.94.0.2.2 - Pass 1 stuck up after make install kagashe Linux From Scratch 9 10-09-2005 11:42 AM
Binutils Pass 1 error make LDFLAGS="-all-static" Phyrexicaid Linux From Scratch 5 08-25-2005 10:43 AM
LFS6.1 Section3.13 - Binutils : Error on "make tooldir=/usr" StevePhM Linux From Scratch 4 07-21-2005 12:22 AM
ProFTPd erron on the "./configure" JDeer0618 Linux - Software 2 02-02-2004 11:39 PM
I can't logon with the "user" and "pass"...help! bseven Linux - Newbie 5 11-08-2002 01:45 PM


All times are GMT -5. The time now is 03:58 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration