LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Failed to build glibc, VirtualBox 32-bit question (https://www.linuxquestions.org/questions/linux-from-scratch-13/failed-to-build-glibc-virtualbox-32-bit-question-885016/)

crts 06-08-2011 02:05 PM

Quote:

Originally Posted by MTK358 (Post 4380102)
I'm using the PDF version of the LFS book 6.8. I downloaded it the day before yesterday. The Live CD did come with the LFS book, but I hate having to use command-line browsers. Having the PDF version on Okular is so much nicer, and the table of contents in the sidebar is very handy.

Can you provide a link from where you got the liveCD with the book? AFAIK, the liveCD comes with the 6.3 version of the book.
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.
From the LFS site
Quote:

The following stable versions are supported and recommended for downloading:

x86 (contains official LFS-6.3 book): lfslivecd-x86-6.3-r2160.iso

x86_64 (contains unofficial LFS book): lfslivecd-x86_64-6.3-r2160.iso
In my understanding, having a livCD to build an unofficial version of the book would make the liveCD unofficial itself. But I might be wrong about that.
Quote:

I checked, and both /tools/lib and /tools/lib64 exist, and they have different contents!
/tools/lib64 should be a symlink to /tools/lib. It is created in chapter 5.4:
Code:

case $(uname -m) in
  x86_64) mkdir -v /tools/lib && ln -sv lib /tools/lib64 ;;
esac

When you realized that you have the x86_64 version and redid the x86_64 you might have created a separate directory instead of the link. But that is just a guess.
I suggest that if you start over then start with a freshly formatted partition. Do not keep any directory structures to save some time. You should also 'set -x' in your script and pipe to 'tee' (stderr & stdout) in order to log what exactly has been executed (i.e. with variables expanded). As far as I can tell from your screenshots the error message is just echo'ed.

MTK358 06-08-2011 02:53 PM

I downloaded the newest x86 LFS Live CD (6.3-r2145) and I am starting from scratch.

MTK358 06-08-2011 04:13 PM

I successfully built pass 1 on my new 32-bit LFS. The test program compiles and runs perfectly.

And I actually reused my automation script, I just edited it a little to correct any errors and to get rid of x86_64 specific parts.

I'll try pass 2 now.

MTK358 06-08-2011 04:31 PM

I got an error when compiling pass 2 of gcc.

I have a log file here, but I can't figure out how to leave the attachment manager window in Lynx. What should I do?

crts 06-08-2011 05:26 PM

Quote:

Originally Posted by MTK358 (Post 4380321)
I got an error when compiling pass 2 of gcc.

I have a log file here, but I can't figure out how to leave the attachment manager window in Lynx. What should I do?

Just tried to upload via lynx. I *think* it cannot be done because it does not have java-script support.
Can you startX and use a graphical browser to post?

MTK358 06-09-2011 10:33 AM

I figured out that I can do it wit the middle-click-to-paste function in the terminal:

Code:

echo timestamp > s-genrtl-h
build/genmodes -m > tmp-min-modes.c
/bin/sh ../../gcc-4.5.2/gcc/../move-if-change tmp-min-modes.c min-insn-modes.c
i686-lfs-linux-gnu-gcc -B/tools/lib -fomit-frame-pointer -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wc++-compat -DHAVE_CONFIG_H -DGENERATOR_FILE  -o build/gencheck \            build/gencheck.o ../build-i686-pc-linux-gnu/libiberty/libiberty.a
make[2]: *** No rule to make target `../build-i686-pc-linux-gnu/fixinclude-c', needed by `stmp-fixinc'.  Stop.
make[2]: *** Waiting for unfinished jobs....
echo timestamp > s-modes-m
echo timestamp > s-gtype
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
make: *** [all] Error 2


druuna 06-09-2011 11:01 AM

Hi,

Quote:

make[2]: *** Waiting for unfinished jobs....
The only time I've seen this message in combination with a failure was when the MAKEFLAGS variable was set (I.e. something like this MAKEFLAGS=-j 2).

You are scripting things and might use this flag to speed things up. If you do, make sure it is unset for the packages that do not like this (the book does mention a few). I would also suggest to always unset this one when doing a make check/test. From personal experience I know that a fair share of the tests fail due to this.

Hope this helps.

MTK358 06-09-2011 11:20 AM

Quote:

Originally Posted by druuna (Post 4381089)
Hi,

The only time I've seen this message in combination with a failure was when the MAKEFLAGS variable was set (I.e. something like this MAKEFLAGS=-j 2).

You are scripting things and might use this flag to speed things up. If you do, make sure it is unset for the packages that do not like this (the book does mention a few). I would also suggest to always unset this one when doing a make check/test. From personal experience I know that a fair share of the tests fail due to this.

I'll try without the -j option.

Since I have a quad-core CPU, I gave the VM 3 cores and added "export MAKEFLAGS='-j3'" to the lfs user's ~/.bashrc.

druuna 06-09-2011 11:24 AM

I thought so :)

I hope you do understand that you do not have to completely remove the -j setting. You now know what to look for and can tune the script(s) accordingly by setting and unsetting it. It does considerably speed things up......

MTK358 06-09-2011 11:37 AM

1 Attachment(s)
Quote:

Originally Posted by druuna (Post 4381116)
I thought so :)

I hope you do understand that you do not have to completely remove the -j setting. You now know what to look for and can tune the script(s) accordingly by setting and unsetting it. It does considerably speed things up......

I wasn't planning on doing everything without -j.

I just decided to set MAKEFLAGS to an empty string and manually run the make command for GCC, before restoring MAKEFLAGS and starting the script again.

Anyway, I did that already, and it failed again. I attached a file containing the output (using the Live CD's GUI). I had to compress it because it exceeded the forum's file size limit.

druuna 06-09-2011 11:50 AM

You did start fresh as in: removed both gcc package and build directories and started with untarring gcc?

MTK358 06-09-2011 12:15 PM

Quote:

Originally Posted by druuna (Post 4381143)
You did start fresh as in: removed both gcc package and build directories and started with untarring gcc?

No, I just re-ran make. I'll do what you said now.

MTK358 06-09-2011 01:34 PM

I tried doing it manually, and it failed because it couldn't find GMP. I must have made a typo. I refused to type all those complex sed commands by hand again, and tried the automated script without "-j3". It failed. Then I started the GUI, opened the browser that came with it, and copied and pated the commands into the terminal. It works now!

Now I'll try using the script to build the rest of pass 2.

druuna 06-09-2011 01:44 PM

Hi,
Quote:

It works now!
That's always nice to read :)

Quote:

Originally Posted by MTK358 (Post 4381216)
.... I must have made a typo. I refused to type all those complex sed commands by hand again, and tried the automated script without "-j3".

If you are using the command line to install LFS I do hope you are aware that you can use lynx (to read the LFS html book) together with the mouse to copy the commands to the terminal?

MTK358 06-09-2011 01:56 PM

Quote:

Originally Posted by druuna (Post 4381226)
If you are using the command line to install LFS I do hope you are aware that you can use lynx (to read the LFS html book) together with the mouse to copy the commands to the terminal?

Yes, but I would rather temporarily use the GUI than do that.

Anyway, except for the occasional typos (which I correct along the way so I can re-use the scripts later), the script is succeccfully building pass 2.

EDIT: Forgot to mention this, but I decided not to use -j3 since it causes some problems. For example, it causes the installation step of "dejagnu" to try to create a directory multiple times, and mkdir fails when the directory is already there.


All times are GMT -5. The time now is 09:31 AM.