LFS 6.7 Chapter 6.16 GCC-4.5.1 make fails
Hello all,
First off, here's what I'm using to build: Host: Fedora 14 Arch: i686 LFS Book: 6.7 I have run into a problem while building my first LFS. Everything was running smoothly up to 6.16. GCC-4.5.1 where make failed for me. Here's the output from where I believe the error occurs: Code:
Making all in po Here's what I have done to try and solve the problem: - remove the gcc-{4.5.1,build} directories, untar again and follow the instructions in the book. - search the net for others with this problem. Most people with GCC problems seem to fall down at pass 1. - /tools/bin/msgfmt has a /bin/sed hardcoded in. So I created a symlink to /tools/bin/sed This eleviated the first two errors, but make still failed. - /tools/bin/msgfmt has lots of references to "/mnt/lfs/sources/gettext-0.18.1.1/gettext-tools/" in the relink_command variable. This makes me think that something went wrong with the "../gcc-4.5.1/configure --prefi..." command issued before make. Not only should /mnt/lfs not be there since I'm in the chroot jail at the moment, but gettext-0.18.1.1 is not a directory in /sources since I removed it post install in Chapter 5. Any help on where I may have gone wrong would be great - I understand that I may have missed something in the book even though I tried very hard to follow it exactly. I'd hate to have to start again!!! I do want to learn though. Thanks, Ian |
Greetingz!
Perhaps your $PATH is off? When you type "which sed", what do you get back? Code:
Making all in po |
I think the PATH is ok.
Code:
$ echo $PATH Code:
$ which sed :-( Thanks all the same, Ian |
Hi,
Quote:
If sed was not present in /bin in the first place, then you forgot to install it in chapter 5 (or something went wrong during the install). Chapter 6 makes use of what was installed in chapter 5. EDIT: Oops...... I clearly wasn't thinking strait. Sorry. |
If you're right then I don't understand a lot of what's in the LFS Book!
In Chapter 5.29. Sed-4.2.1, configure is called like this: Code:
./configure --prefix=/tools To be honest, I think it's ok that sed fails. The real killer of make appears to be the fact that msgfmt is referencing /mnt/lfs/... That's when make really dies. Cheers for the help, Ian |
Hi,
my /tools/bin/msgfmt is a binary. At least it is in LFS 6.6 (uses gettext version 0.17). So I am not quite sure what you mean when you say that it has hardcoded /bin/sed etc. How did you determine that it has /bin/sed hardcoded in it? Can you post /tools/bin/msgfmt? The way you describe it appears to be a script. Maybe something went wrong during installation of gettext? Quote:
type sed instead. Should work since 'type' is a bash built-in. But I don't think that sed is the problem here since it is installed after gettext in chapter 5. |
Uh oh!
Right you are crts. msgfmt should be a binary file by the looks of things. It appears something went wrong when making it - I spotted one thing in lfs user's .bash_history Code:
cd gettext-tools/ So I should probably try compiling that again, yeah? From the host system, as user lfs and not in the chroot, I expanded the gettext tar again. Once changed into the gettext-tools directory, I ran configure, with this output now: Code:
$ ./configure --prefix=/tools --disable-shared Code:
configure:4643: checking whether the C compiler works Code:
$ echo "main(){}" > dummy.c Since I haven't managed to recompile GCC yet, why doesn't it still work? My guess is it's something to do with readjusting the toolchain in Chapter 6.10, but I'm just about grasping that stuff as it is. I wonder would I be able to compile gettext from within the chroot environment... - Think I'll wait for more advice. Thanks for the help, Ian |
It is not that easy. As you already noticed, you have tweaked your toolchain in chapter 6.10. So before you can fix it you will have to do some adjustments to it. The last time I had to debug my toolchain was with LFS 6.3. And things were a bit different back then. So I am not sure if I can walk you 100%. Debugging the toolchain is tricky. Remote debugging via LQ is even trickier ;)
The first thing you need to do before you try ANYTHING with your toolchain is to make a backup first! Even if your toolchain is not in a good state it is in a somewhat known state. So it is good to fall back to a known point if the fix is not successful. So always work with a copy. The next thing you need to do is to change back ownership to user 'lfs' in your copy. Then switch to user 'lfs'. Since you have an installed OS as host and not a liveCD I assume that you won't have to recreate user 'lfs' and that you can work with user 'lfs'. Issue the following commands (as user lfs) Code:
mv -v /tools/bin/{ld,ld-new} Code:
echo 'main(){}' > dummy.c Code:
gcc --print-libgcc-file-name |
Hi ianll,
Sorry about post #4, I clearly wasn't at the top of my game. |
[SOLVED] LFS 6.7 Chapter 6.16 GCC-4.5.1 make fails
@druuna - No worries - thanks for the help anyway.
@crts - As you said, adjusting the toolchain wouldn't be the easiest thing to do. I took your advice to make a BACKUP and while doing that, remembered that I had already made two backups: before and after stripping in Chapter 5.32. So, I decided to avoid learning too much and simply revert to that backup - I knew I wouldn't mind repeating the first 16 parts of Chapter 6 and that I would rather have my first LFS go smoothly. I exited the chroot environment once I had completed the recommended backup from the host OS. Unmounted the special devices: Code:
umount $LFS/sys Code:
rm -fr $LFS/{var,usr,tools,tmp,sys,srv,sbin,root,proc,opt,mnt,media,lib,home,etc,bin,boot,dev} Code:
tar xvf /tmp/lfs-6.7-pre-5.32.tar.bz2 I'm about to start Chapter 6.23. Iana-Etc-2.30 now, so everything is going smoothly enough. Thanks everyone for their contribution - I do appreciate it. |
Glad you got it working.
Quote:
|
I would like to to thk you ianll I had the exact same problem, Your post pointed me in the right direction, now how to fix
|
have proble to compile gcc
i have problem to compile 6.14 gcc-4.7.1 which is same as that u, how to remove this
|
Quote:
The posts above are about gcc-4.5.1 from an old version of the book. You're talking about gcc-4.7.1 which is in the current development versions of the book. The posts above are about errors made by the original poster. There is no way to tell what your problem is from what you posted. I recommend leaving here and starting a new thread about your problem. Mention the book version you are using and exactly where you are in the book. Describe what you are observing that is not right. Copy and paste from your terminal any configure or make error messages plus a bunch of lines preceding the error lines. But of course do what you think is best. |
thanks for reply,
do u solved this problem for this error, if u solved then pls write a particular answer may be it is help-full for me.... i am using ubuntu 10.10, and working on LFS-Book-7.1, and i have problem in topic { 6.17. GCC-4.6.2 }.. i think same as that of your problem.... thanku |
All times are GMT -5. The time now is 10:21 AM. |