LinuxQuestions.org
Help answer threads with 0 replies.
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 08-06-2016, 12:04 PM   #1
AnonymousKarol
LQ Newbie
 
Registered: Aug 2016
Posts: 2

Rep: Reputation: Disabled
Readelf test failed in 6.10


Hi there,

I've been compiling my Linux From Scratch and I met a problem at step 6.10. After running
Code:
readelf -l a.out | grep ': /lib'
from inside chroot an error appered:
Code:
readelf: Error: 'a.out': No such file
I searched interent forums and didn't find the answer. Content of dummy.log:
Code:
Reading specs from /tools/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/specs
COLLECT_GCC=cc
COLLECT_LTO_WRAPPER=/tools/libexec/gcc/x86_64-unknown-linux-gnu/5.3.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/tools --with-local-prefix=/tools --with-native-system-header-dir=/tools/include --enable-languages=c,c++ --disable-libstdcxx-pch --disable-multilib --disable-bootstrap --disable-libgomp
Thread model: posix
gcc version 5.3.0 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
 /tools/libexec/gcc/x86_64-unknown-linux-gnu/5.3.0/cc1 -quiet -v -isystem /usr/include dummy.c -quiet -dumpbase dummy.c -mtune=generic -march=x86-64 -auxbase dummy -version -o /tmp/ccUsVmeU.s
GNU C11 (GCC) version 5.3.0 (x86_64-unknown-linux-gnu)
	compiled by GNU C version 5.3.0, GMP version 6.1.0, MPFR version 3.1.3, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/tools/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../x86_64-unknown-linux-gnu/include"
ignoring duplicate directory "/tools/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include
 /tools/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/include
 /tools/include
 /tools/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/include-fixed
End of search list.
GNU C11 (GCC) version 5.3.0 (x86_64-unknown-linux-gnu)
	compiled by GNU C version 5.3.0, GMP version 6.1.0, MPFR version 3.1.3, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: b9df95a33f914f42c407d2c52a9af87a
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
 as -v --64 -o /tmp/ccRgO3cU.o /tmp/ccUsVmeU.s
GNU assembler version 2.26 (x86_64-pc-linux-gnu) using BFD version (GNU Binutils) 2.26.20160125
COMPILER_PATH=/tools/libexec/gcc/x86_64-unknown-linux-gnu/5.3.0/:/tools/libexec/gcc/x86_64-unknown-linux-gnu/5.3.0/:/tools/libexec/gcc/x86_64-unknown-linux-gnu/:/tools/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/:/tools/lib/gcc/x86_64-unknown-linux-gnu/
LIBRARY_PATH=/tools/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/:/usr/lib/../lib64/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
 /tools/libexec/gcc/x86_64-unknown-linux-gnu/5.3.0/collect2 -plugin /tools/libexec/gcc/x86_64-unknown-linux-gnu/5.3.0/liblto_plugin.so -plugin-opt=/tools/libexec/gcc/x86_64-unknown-linux-gnu/5.3.0/lto-wrapper -plugin-opt=-fresolution=/tmp/ccU0ADcU.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o /tools/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/crtbegin.o -L/tools/lib/gcc/x86_64-unknown-linux-gnu/5.3.0 -L/usr/lib/../lib64 /tmp/ccRgO3cU.o --verbose -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /tools/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/crtend.o /usr/lib/../lib64/crtn.o
collect2: fatal error: cannot find 'ld'
compilation terminated.
The problem probably appeared because I repeated some (probably Glibc compilation) steps by mistake.

How can I fix this?
 
Old 08-08-2016, 12:42 PM   #2
Krejzi
Member
 
Registered: Jan 2015
Posts: 215

Rep: Reputation: Disabled
collect2: fatal error: cannot find 'ld'

ls /tools/bin/ld*
 
Old 08-09-2016, 05:22 AM   #3
AnonymousKarol
LQ Newbie
 
Registered: Aug 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
ls /tools/bin.ld* :
Code:
/tools/bin/ld-old  /tools/bin/ld.bfd  /tools/bin/ldd
 
Old 08-09-2016, 05:24 AM   #4
Krejzi
Member
 
Registered: Jan 2015
Posts: 215

Rep: Reputation: Disabled
You missed a step in binutils pass2 to create ld-new, which should replace ld in chapter 6 "Adjusting the Toolchain". You need to go back and start over.
 
1 members found this post helpful.
  


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
readelf and objdump andyzn Programming 1 12-06-2007 05:08 AM
output of readelf -a vmlinux ashlesha Linux - Software 0 09-06-2006 12:39 PM
I failed the media test!!!! slackr007 Fedora 22 01-09-2005 04:11 PM
2.6.x test kernel failed DAChristen29 Slackware 5 12-09-2004 03:52 PM

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

All times are GMT -5. The time now is 02:07 AM.

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