Failed to build glibc, VirtualBox 32-bit question
1 Attachment(s)
I started to try building LFS again, and I created a 32-bit VM in VirtualBox. I have gone all the way to glibc pass 1 before I realized that the LFS live CD image I had is 64-bit! :eek: I went back and redid the 64-bit specific steps that I skipped (I hope the order wasn't important).
The strange part is that everything seems to work fine (The host CPU and OS are 64-bit, and the CPU supports hardware virtualization). I would really want to aviod having to redo this since I already spent so much time on it. Also, I'm stuck because I get an error when running make on glibc (screenshot in attachment). How do I fix it, and could it have anything to do with what I mensioned above? |
Hi,
Quote:
Hope this helps. BTW: If you created a 32 bit VM, shouldn't your LFS build reflect that? Strange indeed! What does $(uname -m)-lfs-linux-gnu show? Hope this helps. |
1 Attachment(s)
Quote:
Code:
ln -vs libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | \ Code:
ln -vs libgcc.a $($LFS_TGT-gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/') Quote:
Code:
$ echo $(uname -m)-lfs-linux-gnu |
Hi,
Quote:
Did you check to see if lgcc_eh is actually present and reachable? If you are sure nothing went wrong during the previous 3 packages that where build: Have you seen this post: Getting past 'cannot find -lgcc_eh' and 'inlining failed in call to 'syslog'' errors. Bit old and it might not work with the current LFS version, but you might want to give it a try. Quote:
BTW: I'm assuming you are building LFS 6.8 Stable. |
Quote:
Quote:
Quote:
Code:
gcc -print-libgcc-file-name Code:
$LFS_TGT-gcc -print-libgcc-file-name Quote:
Quote:
|
Hi,
Quote:
The link with the possible solution I posted is based on an older LFS version (I'm not even sure if LFS_TGT was already being used in that version). If you read the complete thread and the link to the lfs mailing list you probably get the same feeling I have: This was during the transition period from 32 bit only to the mixed 32/64 bit that is used nowaday (at least LFS versions 6.7 and 6.8). The following is probably a bold assumptions: This being your first (second?) attempt to build an LFS system I'm pretty sure that you made a mistake in one of the previous chapters. Your not that far into the build yet, and I would suggest starting over, just to make sure all was done the way it should and just in case: Don't change commands given in the book, even if it looks like the edited command does the same. Starting to hack the build this early just doesn't feel good (no hacking should be needed at all.....) and if new errors start to appear at a later stage you'll always wonder if the cause was chapter 5 glibc. Probably not what you expected to read, but hope it helps. |
This is actaully my third or fourth LFS attempt. :redface:
I decided to restart from compiling binutils, since I had made some likely errors and mistakes since then. I also wrote a script that takes a file with a sequence of commands and runs them in order. If one fails, it stops and tells me what command line options to use to resume from that point. I decided that I'll use it this time, and it's really making the whole process easy. I'm already more than half way done with pass 1! |
I completed Pass 1 successfully! I'll post here is something goes wrong that I can't figure out.
|
1 Attachment(s)
Now I get this error when configuring pass 2 of binutins:
|
Hi,
Did you encounter any errors while doing the Adjusting the Toolchain chapter (especially the checks in the caution box)? At this point (Binutils-2.21 - Pass 2) you are partially using what you have build before, which is set by the adjusting the toolchain chapter. If binutils pass 2 fails one of the previous three packages (or a combination or all) did not install correctly (the three packages being: binutils, gcc, or glibc). This is a show-stopper and it does need to be resolved before you continue. Hope this helps. |
1 Attachment(s)
Quote:
It works fine if I use the GCC that came with the LFS live CD, though: Code:
$ /usr/bin/gcc test.c -o test |
Hi,
in your initial post you say that your VM is a 32-bit architecture but you are using the 64-bit liveCD. I wonder if this might be a possible source of trouble. I remember that I also build my first LFS with a 64-bit liveCD. However, it had its own modified LFS-book "onboard". IIRC, there were some differences to the original LFS. So, if I understood correctly so far, then you are using an unofficial liveCD with the official LFS book. I am not saying that this is wrong. Just trying to point out some other possible sources of trouble. So I guess my advise at this point is to keep it as simple as possible and use the official 32-bit liveCD with a 32-bit VM and with the official LFS book. Maybe even build an older version of LFS that definitely works with the liveCD, since the liveCD is pretty old. My last LFS with the liveCD was 6.6. Quote:
Code:
ldd a.out Just saw your EDIT. Do you have a /tools/lib64 directory? If not then try creating a symlink /tools/lib64 -> /tools/lib And of course run 'ldd' on test and not a.out. |
Hi,
Quote:
You've been trying to build LFS by automating it. I would advise not automating and doing it by hand. I've automated the LFS build and found out that some of the commands/actions shown in the book need special care when you automate them. I too tried (half) automating when I did my first build and failed miserably...... ;) Only after knowing what was done in the book by doing it all by hand (twice, during my second build I started adjusting things to my likings and got an even better understanding) I was able to script LFS. It also made sure that I knew which errors where LFS related and which script related. BTW: Do make a backup once you finish chapter 5! It would be too bad if something went wrong during chapter 6 and you had to start all over again. With a backup you can delete all, restore the backup and start from the top of chapter 6 again. Hope this helps. EDIT: Just noted your edit. It did NOT work! You are not supposed to use the gcc that came with liveCD at this point!! |
Quote:
The Live CD is the official 64-bit LFS Live CD. It might not be the newest, though, since I downloaded it a few months ago. If I had to start over, I would definitely get the newest 32-bit official LFS Live CD. Quote:
Code:
$ ldd test Quote:
Quote:
So before staring, I decided to write a big shell script that takes an input file of commands, and runs them automatically, and (unlike a normal shell script) lets me step in, fix the problem, and resume if something fails. It also meant that it's not such a big deal to do a huge part all over again, since the script takes care of it. I tried doing pass 1 manually, and found out that I messed it up after spending a few hours on it. So decided to use my automation script, and I completed pass 1 in a matter of minutes with minimal intervention. Then I spent a long time writing an input file for my automation script that would complete pages 61-91 of the LFS book all on its own. And the point where it failed is when that script got to configuring binutils. I'm still tempted to use my automation scripts even I have to start over, since I spent a lot of time and effort writing them and they really made the process easier. Maybe I should use them slightly less (especially for the more fragile parts), or thoroughly review them to make sure they don't have any mistakes/typos? Quote:
Quote:
|
Hi,
Quote:
|
All times are GMT -5. The time now is 10:26 PM. |