LinuxQuestions.org
Review your favorite Linux distribution.
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 07-25-2014, 01:13 PM   #1
dmssargent
Member
 
Registered: Jul 2014
Posts: 32

Rep: Reputation: Disabled
as: no such file or directory


In the section of the LFS book (stable) I discovered that bash was giving off as as no such file or directory. I checked binutils and all of them have a similiar problem. bash works fine, etc works fine. I am working in the chrooted enviroment. ldd gives:
Code:
/tools/bin/ldd: line 117: ./as: No such file or directory
The PATH is set to:
Code:
/bin:/usr/bin:/sbin/usr/sbin:/tools/bin
Update: the as tool works prefectly in the non-chrooted enviroment, this only applies to the chrooted enviroment

Edit 1: from the host os ldd reports the LFS "as" as:
Code:
	linux-vdso.so.1 =>  (0x00007fffc2dff000)
	libz.so.1 => /usr/local/lib/libz.so.1 (0x00007fe23f0b4000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe23ed29000)
	/lib64/ld-li

Last edited by dmssargent; 07-25-2014 at 04:03 PM. Reason: New Information available
 
Old 07-25-2014, 10:51 PM   #2
j_v
Member
 
Registered: Oct 2011
Distribution: Slackware64
Posts: 364

Rep: Reputation: 67
Log output for the failed build?
 
Old 07-25-2014, 11:41 PM   #3
dmssargent
Member
 
Registered: Jul 2014
Posts: 32

Original Poster
Rep: Reputation: Disabled
Requested output:

Code:
root: /sources/linux-3.13.3# make mrproper
root: /sources/linux-3.13.3# make headers_check
  CHK     include/generated/uapi/linux/version.h
  UPD     include/generated/uapi/linux/version.h
  HOSTCC  scripts/basic/fixdep
gcc: error trying to exec '/tools/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../x86_64-unknown-linux-gnu/bin/as': execv: No such file or directory
scripts/Makefile.host:118: recipe for target 'scripts/basic/fixdep' failed
make[1]: *** [scripts/basic/fixdep] Error 1
Makefile:422: recipe for target 'scripts_basic' failed
make: *** [scripts_basic] Error 2
root: /sources/linux-3.13.3#
 
Old 07-26-2014, 12:03 AM   #4
j_v
Member
 
Registered: Oct 2011
Distribution: Slackware64
Posts: 364

Rep: Reputation: 67
Quote:
Originally Posted by dmssargent View Post
Requested output:

Code:
root: /sources/linux-3.13.3# make mrproper
root: /sources/linux-3.13.3# make headers_check
  CHK     include/generated/uapi/linux/version.h
  UPD     include/generated/uapi/linux/version.h
  HOSTCC  scripts/basic/fixdep
gcc: error trying to exec '/tools/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../x86_64-unknown-linux-gnu/bin/as': execv: No such file or directory
scripts/Makefile.host:118: recipe for target 'scripts/basic/fixdep' failed
make[1]: *** [scripts/basic/fixdep] Error 1
Makefile:422: recipe for target 'scripts_basic' failed
make: *** [scripts_basic] Error 2
root: /sources/linux-3.13.3#
The highlighted part is the tuple that gcc was configured to build for. It should be x86_64-lfs-linux-gnu. Pass 1 and/or pass 2 of gcc builds were done for wrong target. Probably the the lfs user environment was incomplete, as per spec'd in http://www.linuxfromscratch.org/lfs/...vironment.html or the --target configure option to the gcc pass 1 build was mistyped, some thing of that kidney.

Last edited by j_v; 07-26-2014 at 12:07 AM.
 
Old 07-26-2014, 09:43 AM   #5
dmssargent
Member
 
Registered: Jul 2014
Posts: 32

Original Poster
Rep: Reputation: Disabled
In that in case, why does the tuple you are talking about exist and have the same problem? Any idea of how to redo GCC - pass 2 without redoing everything past it? (I expect to redo somethings, but hope not to do so)
 
Old 07-26-2014, 05:25 PM   #6
j_v
Member
 
Registered: Oct 2011
Distribution: Slackware64
Posts: 364

Rep: Reputation: 67
Well, I'll be darned. I remembered that one wrong. I should have double checked, but the problem might be with binutils pass 2. The tools built in binutils pass 2 should be installed in /tools/$ARCH-unknown-linux-gnu/bin. (It was the pass 1 that I was thinking of, that builds the initial cross tools and compiler). gcc is saying that it can't find 'as' in the exact location where it should be.
If that's the case, then how did the pass 2 compiler get built properly? It's really weird trying to debug this kind of thing with only partial logs and only the ones where the error occures. In my experience, an error in the 'current' build is usually caused by an earlier problem. I'm guessing too much here, so if you want to supply more logs maybe someone (even me if I can remember to make sure I verify my facts) can point you in the right direction. I apologize if I wasted both of our time here.
 
Old 07-26-2014, 05:50 PM   #7
dmssargent
Member
 
Registered: Jul 2014
Posts: 32

Original Poster
Rep: Reputation: Disabled
I would be happy to do that, but I need to know what logs to post and I was following what I believed the book's build policy.
 
Old 07-26-2014, 06:13 PM   #8
j_v
Member
 
Registered: Oct 2011
Distribution: Slackware64
Posts: 364

Rep: Reputation: 67
Of course. I don't mean to be a jerk, though I may have been in my embarrassment at seeing I had jumped at the wrong conclusion, even remembered a few things wrong.

The logs to look at should be the chapter 5 binutils (pass 1 and pass 2) and gcc (pass 1 and pass 2).
 
Old 07-26-2014, 07:20 PM   #9
dmssargent
Member
 
Registered: Jul 2014
Posts: 32

Original Poster
Rep: Reputation: Disabled
Well, I did my best to recreate the logs. I am just now noticed something that seems a bit scary in the last 2 passes."...host tool"

There is a archive I generated of what I believe to be helpful:
https://onedrive.live.com/redir?resi...347110C1%21414
 
Old 07-26-2014, 08:52 PM   #10
j_v
Member
 
Registered: Oct 2011
Distribution: Slackware64
Posts: 364

Rep: Reputation: 67
OK, I've not finished looking through, but there's a definite clue in gcc_pass-2/make_install.log. Permissions problem for directory ownership.
Another one that has me curious is line 115 in gcc_pass-2/make_errors.log; I've looked through the logs for my most recent build and see no errors where xgcc's backend (cc1) bombs like that. But that might only be a clue to something else.

Still looking, so I'll report back as I get more sorted out.
 
Old 07-26-2014, 09:07 PM   #11
dmssargent
Member
 
Registered: Jul 2014
Posts: 32

Original Poster
Rep: Reputation: Disabled
The reason I believe is due to the ownership being changing before the logs. I ahd to regenerate them and the make install logs are not very good doue to this. I am still to new to linux to unchown them.
 
Old 07-26-2014, 09:12 PM   #12
j_v
Member
 
Registered: Oct 2011
Distribution: Slackware64
Posts: 364

Rep: Reputation: 67
Ah, well... take a look at binutils_pass-1/make_install.log. It says it all. Probably missed the chown command on /tools or it failed or something in that vein.
 
Old 07-26-2014, 09:14 PM   #13
j_v
Member
 
Registered: Oct 2011
Distribution: Slackware64
Posts: 364

Rep: Reputation: 67
Oh, I see, so you'd done the chown in chapter 6 back to root ownership, then I guess.
Ok, I'll keep looking.
 
Old 07-26-2014, 09:25 PM   #14
j_v
Member
 
Registered: Oct 2011
Distribution: Slackware64
Posts: 364

Rep: Reputation: 67
At the bottom of the binutils_pass-2/post_build.log, there is an error that makes me wonder if ld/ld-new really got copied to the /tools/bin directory:
Quote:
cp: cannot create regular file '/to
If I'm right here, and the retargeted ld-new didn't get copied, then it would possibly explain xgcc's cc1 not getting linked in gcc_pass-2.
 
Old 07-26-2014, 09:32 PM   #15
dmssargent
Member
 
Registered: Jul 2014
Posts: 32

Original Poster
Rep: Reputation: Disabled
ld-new in tools/bin exists. Is owned by root, I generated the logs under the lfs user.
Anyway to compare the files?
 
  


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
[SOLVED] Invoke root directory owner/group while moving file/directory yogesh_attarde Linux - Security 5 04-14-2014 11:36 PM
su:warning: cannot change directory to home/orausr: No such file or directory cdhar Linux - Newbie 4 09-11-2012 06:17 AM
chroot:cannot change root directory to: No such file directory janakiramulu Linux From Scratch 5 04-23-2011 01:00 AM
Get first file of directory then copy to other directory andd rename the file Faye Linux - Software 4 01-30-2011 09:16 AM
How to protect a file/directory in your home login directory (RH Linux) jitsenho Linux - Security 9 07-03-2006 11:08 PM

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

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