LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 02-03-2013, 09:15 AM   #1
jalazmi
LQ Newbie
 
Registered: Feb 2013
Posts: 6

Rep: Reputation: Disabled
cannot find a.out file in 6.10 re-adjusting toolchain


hi all,


I'm facing an error after I run this command in 6.10 Re-adjusting the toolchain

Quote:
echo 'main(){}' > dummy.c
cc dummy.c -v -Wl,--verbose &> dummy.log
readelf -l a.out | grep ': /lib'
what I got is:

Quote:
readelf: Error: 'a.out': No such file
I dunno where is my mistake.. can anyone help plz
 
Old 02-03-2013, 09:19 AM   #2
jalazmi
LQ Newbie
 
Registered: Feb 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
may this will explain or help to answer my question


Quote:
root:/sources/gcc-build# cat dummy.log
Reading specs from /tools/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/specs
COLLECT_GCC=cc
COLLECT_LTO_WRAPPER=/tools/libexec/gcc/x86_64-unknown-linux-gnu/4.6.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.6.1/configure --prefix=/tools --with-local-prefix=/tools --enable-clocale=gnu --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch --disable-multilib --disable-bootstrap --disable-libgomp --without-ppl --without-cloog --with-mpfr-include=/mnt/lfs/sources/gcc-build/../gcc-4.6.1/mpfr/src --with-mpfr-lib=/mnt/lfs/sources/gcc-build/mpfr/src/.libs
Thread model: posix
gcc version 4.6.1 (GCC)
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
/tools/libexec/gcc/x86_64-unknown-linux-gnu/4.6.1/cc1 -quiet -v -isystem /usr/include dummy.c -quiet -dumpbase dummy.c -mtune=generic -march=x86-64 -auxbase dummy -version -o /tmp/cc5uGyrQ.s
GNU C (GCC) version 4.6.1 (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.6.1, GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=97 --param ggc-min-heapsize=126588
ignoring nonexistent directory "/tools/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include
/tools/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/include
/tools/include
/tools/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/include-fixed
End of search list.
GNU C (GCC) version 4.6.1 (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.6.1, GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=97 --param ggc-min-heapsize=126588
Compiler executable checksum: 1b36e51b4ec14d4a4f9a820ee2ee0bf8
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
/tools/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../x86_64-unknown-linux-gnu/bin/as --64 -o /tmp/ccGFbVEe.o /tmp/cc5uGyrQ.s
COMPILER_PATH=/tools/libexec/gcc/x86_64-unknown-linux-gnu/4.6.1/:/tools/libexec/gcc/x86_64-unknown-linux-gnu/4.6.1/:/tools/libexec/gcc/x86_64-unknown-linux-gnu/:/tools/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/:/tools/lib/gcc/x86_64-unknown-linux-gnu/:/tools/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../x86_64-unknown-linux-gnu/bin/
LIBRARY_PATH=/tools/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/:/tools/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../x86_64-unknown-linux-gnu/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
/tools/libexec/gcc/x86_64-unknown-linux-gnu/4.6.1/collect2 --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/lib/crt1.o /usr/lib/crti.o /tools/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/crtbegin.o -L/tools/lib/gcc/x86_64-unknown-linux-gnu/4.6.1 -L/tools/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../x86_64-unknown-linux-gnu/lib /tmp/ccGFbVEe.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/4.6.1/crtend.o /usr/lib/crtn.o
collect2: cannot find 'ld'
 
Old 02-04-2013, 07:08 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Quote:
Originally Posted by jalazmi View Post
may this will explain or help to answer my question
Quote:
root:/sources/gcc-build# cat dummy.log
Reading specs from /tools/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/specs
COLLECT_GCC=cc
.
.
.
unknown-linux-gnu/4.6.1/crtend.o /usr/lib/crtn.o
collect2: cannot find 'ld'
ld seems to be missing.

You either made a mistake when installing 5.8. Binutils-2.22 - Pass 2 and/or something went wrong while adjusting the toolchain, specifically these parts:
Quote:
mv -v /tools/bin/{ld,ld-old}
mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
mv -v /tools/bin/{ld-new,ld}
ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
 
Old 02-04-2013, 07:19 AM   #4
jalazmi
LQ Newbie
 
Registered: Feb 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
I did this part with no error

and redo it now please check:

Quote:
root:/sources/gcc-build# mv -v /tools/bin/{ld,ld-old}
mv: cannot stat `/tools/bin/ld': No such file or directory
root:/sources/gcc-build# mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
`/tools/x86_64-unknown-linux-gnu/bin/ld' -> `/tools/x86_64-unknown-linux-gnu/bin/ld-old'
root:/sources/gcc-build# mv -v /tools/bin/{ld-new,ld}
mv: cannot stat `/tools/bin/ld-new': No such file or directory
root:/sources/gcc-build# ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
`/tools/x86_64-unknown-linux-gnu/bin/ld' -> `/tools/bin/ld'
check this

Quote:
root:/sources/gcc-build# ls -l /tools/bin/ | grep 'ld-old'
-rwxr-xr-x 1 root root 1323856 Feb 3 06:14 ld-old

Last edited by jalazmi; 02-04-2013 at 07:38 AM.
 
Old 02-04-2013, 07:34 AM   #5
jalazmi
LQ Newbie
 
Registered: Feb 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
I think I did everything correctly in 5.8. Binutils-2.22 - Pass 2 but in case what I did it was not correct should I simply repeat that step only or what should be the action that I need to follow

plz advice
 
Old 02-04-2013, 07:52 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Quote:
Originally Posted by jalazmi View Post
I did this part with no error

and redo it now please check:
Code:
root:/sources/gcc-build# mv -v /tools/bin/{ld,ld-old}
 mv: cannot stat `/tools/bin/ld': No such file or directory
 root:/sources/gcc-build# mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
 `/tools/x86_64-unknown-linux-gnu/bin/ld' -> `/tools/x86_64-unknown-linux-gnu/bin/ld-old'
 root:/sources/gcc-build# mv -v /tools/bin/{ld-new,ld}
 mv: cannot stat `/tools/bin/ld-new': No such file or directory
 root:/sources/gcc-build# ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
 `/tools/x86_64-unknown-linux-gnu/bin/ld' -> `/tools/bin/ld'
Did you just copy/paste those commands a second time? I do hope that is not the case.... You might want to try and understand what these commands are supposed to do. You just created a bigger problem.....

Anyway, this doesn't look good no matter what you did: mv: cannot stat `/tools/bin/ld': No such file or directory

Because you already executed parts of 6.10 I would suggest to start from scratch and not just re-install binutils.
 
Old 02-04-2013, 08:06 AM   #7
jalazmi
LQ Newbie
 
Registered: Feb 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Oooops.. but it just moving files right..!! and the old ld is already exists with name ld-old..!!

but it seems that really should start from scratch..

thx for your advice.. will come back to you again in case same issue happen to me.. plz accept that.
 
Old 02-08-2013, 02:02 AM   #8
jalazmi
LQ Newbie
 
Registered: Feb 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
re-build from scratch but this time with 32bit instead of 64bit as LFS advice and it seems everything working fine.


now I'm in 6.17.1 gcc 4.7.1 thx drunna for your help and advice.
 
  


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
[SOLVED] LFS 7.0 - 6.10 Re-adjusting the toolchain - No specs file derstephen Linux From Scratch 2 12-01-2011 05:20 PM
Problem with Adjusting ToolChain.... sed: can't read >: No such file or directory lfs_rocks Linux From Scratch 4 03-08-2009 10:30 AM
5.7 adjusting the toolchain echnat0n Linux From Scratch 1 03-19-2007 08:09 AM
adjusting the toolchain bourbonstreet Linux From Scratch 5 11-05-2006 11:43 AM
6.12. Re-adjusting the Toolchain jobesd Linux From Scratch 2 01-16-2005 01:50 PM


All times are GMT -5. The time now is 10:14 PM.

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