Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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.
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)
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.
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).
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.