LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-08-2011, 02:05 PM   #16
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,604

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446

Quote:
Originally Posted by MTK358 View Post
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.
 
Old 06-08-2011, 02:53 PM   #17
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Original Poster
Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
I downloaded the newest x86 LFS Live CD (6.3-r2145) and I am starting from scratch.
 
Old 06-08-2011, 04:13 PM   #18
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Original Poster
Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
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.
 
Old 06-08-2011, 04:31 PM   #19
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Original Poster
Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
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?
 
Old 06-08-2011, 05:26 PM   #20
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,604

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
Quote:
Originally Posted by MTK358 View Post
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?
 
Old 06-09-2011, 10:33 AM   #21
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Original Poster
Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
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
 
Old 06-09-2011, 11:01 AM   #22
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
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.
 
Old 06-09-2011, 11:20 AM   #23
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Original Poster
Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
Quote:
Originally Posted by druuna View Post
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.

Last edited by MTK358; 06-09-2011 at 11:23 AM.
 
Old 06-09-2011, 11:24 AM   #24
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
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......
 
Old 06-09-2011, 11:37 AM   #25
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Original Poster
Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
Quote:
Originally Posted by druuna View Post
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.
Attached Files
File Type: txt gcc-pass2-make-log.txt.gz.txt (12.4 KB, 4 views)
 
Old 06-09-2011, 11:50 AM   #26
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
You did start fresh as in: removed both gcc package and build directories and started with untarring gcc?
 
Old 06-09-2011, 12:15 PM   #27
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Original Poster
Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
Quote:
Originally Posted by druuna View Post
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.
 
Old 06-09-2011, 01:34 PM   #28
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Original Poster
Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
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.
 
Old 06-09-2011, 01:44 PM   #29
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Hi,
Quote:
It works now!
That's always nice to read

Quote:
Originally Posted by MTK358 View Post
.... 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?
 
Old 06-09-2011, 01:56 PM   #30
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Original Poster
Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
Quote:
Originally Posted by druuna View Post
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.

Last edited by MTK358; 06-09-2011 at 01:59 PM.
 
  


Reply

Tags
flags, glibc, lfs, make


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Upcoming pain with glibc-2.14 and Linux-PAM: RPC build supt. is removed from glibc! JoelPB Linux From Scratch 6 12-13-2011 06:31 AM
ERROR:During Making of glibc-build(GLIBC-2.12.1) gau190188 Linux From Scratch 1 01-04-2011 05:19 AM
64-bit VirtualBox host running a single 32-bit guest, good idea? FireRaven Linux - Virtualization and Cloud 10 04-03-2010 03:21 PM
Puzzling glibc-build question... sundialsvcs Linux From Scratch 2 09-18-2005 09:30 AM


All times are GMT -5. The time now is 12:07 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration