LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 05-18-2011, 11:21 AM   #16
gdawg
Member
 
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 70

Original Poster
Rep: Reputation: 0

Hi - I've managed to install binutils and gcc but now I'm stuck at para. 5.6.1 - Installation of Linux API Headers - this is what is returned when I run the required commands:
Quote:
lfs@daisy:~$ make mrproper
make: *** No rule to make target `mrproper'. Stop.
lfs@daisy:~$ sudo make mrproper
[sudo] password for lfs:
make: *** No rule to make target `mrproper'. Stop.
lfs@daisy:~$ make headers_check
make: *** No rule to make target `headers_check'. Stop.
lfs@daisy:~$ sudo make headers_check
make: *** No rule to make target `headers_check'. Stop.
lfs@daisy:~$ make INSTALL_HDR_PATH=dest headers_install
make: *** No rule to make target `headers_install'. Stop.
lfs@daisy:~$ cp -rv dest/include/* /tools/include
cp: cannot stat `dest/include/*': No such file or directory
Is this what I should expect? Appreciate your help.

Last edited by gdawg; 05-18-2011 at 11:24 AM.
 
Old 05-18-2011, 11:26 AM   #17
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

Did you untar the linux kernel source (linux-2.6.37.tar.bz2) and enter the created directory before executing the commands?

Hope this helps.
 
1 members found this post helpful.
Old 05-18-2011, 12:09 PM   #18
gdawg
Member
 
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 70

Original Poster
Rep: Reputation: 0
Hi - druuna, no I didn't go to the linux kernel source. I'll do that right now. Thank you.
Am I correct in deleting the un-tarred directories and build directories after they've been installed?

Kind regards,
Glen

Last edited by gdawg; 05-18-2011 at 12:12 PM. Reason: Forgot to ask a question.
 
Old 05-18-2011, 12:11 PM   #19
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

That's what I thought....

BTW: You're welcome
 
Old 05-18-2011, 01:03 PM   #20
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debain
Posts: 1,762
Blog Entries: 1

Rep: Reputation: 245Reputation: 245Reputation: 245
Yes delete the dirs You can rebuild them if you need to. Also later in book you have to rebuild them again so they will be fresh -build dirs to start on 2nd time.
 
Old 05-21-2011, 01:27 PM   #21
gdawg
Member
 
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 70

Original Poster
Rep: Reputation: 0
Hi folks - I've managed to get to the "chroot" environment but I'm hung-up at section 6.5 of manual version 6.8 (Creating Directories). When I enter the commands I get the following results:
Code:
[root@daisy ~]# mkdir -v $LFS/{dev,proc,sys}
mkdir: cannot create directory `/dev': File exists
mkdir: cannot create directory `/proc': File exists
mkdir: cannot create directory `/sys': File exists
[root@daisy ~]# mknod -m 600 $LFS/dev/console c 5 1
mknod: `/dev/console': File exists
[root@daisy ~]# mknod -m 666 $LFS/dev/null c 1 3
mknod: `/dev/null': File exists
[root@daisy ~]# mount -v --bind /dev $LFS/dev
/dev on /dev type none (rw,bind)
[root@daisy ~]# mount -vt devpts devpts $LFS/dev/pts
devpts on /dev/pts type devpts (rw)
[root@daisy ~]# mount -vt tmpfs shm $LFS/dev/shm
shm on /dev/shm type tmpfs (rw)
[root@daisy ~]# mount -vt proc proc $LFS/proc
mount: proc already mounted
[root@daisy ~]# mount -vt sysfs sysfs $LFS/sys
mount: sysfs already mounted or /sys busy
[root@daisy ~]# chroot "$LFS" /tools/bin/env -i \
>     HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
>     PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
>     /tools/bin/bash --login +h
chroot: cannot change root directory to : No such file or directory
[root@daisy ~]# mkdir -pv /{bin,boot,etc/opt,home,lib,mnt,opt}
mkdir: created directory `/etc/opt'
[root@daisy ~]# mkdir -pv /{media/{floppy,cdrom},sbin,srv,var}
mkdir: created directory `/media/floppy'
mkdir: created directory `/media/cdrom'
mkdir: created directory `/srv'
[root@daisy ~]# install -dv -m 0750 /root
[root@daisy ~]# install -dv -m 1777 /tmp /var/tmp
[root@daisy ~]# mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src}
[root@daisy ~]# mkdir -pv /usr/{,local/}share/{doc,info,locale,man}
mkdir: created directory `/usr/local/share/doc'
mkdir: created directory `/usr/local/share/locale'
[root@daisy ~]# mkdir -v  /usr/{,local/}share/{misc,terminfo,zoneinfo}
mkdir: cannot create directory `/usr/share/misc': File exists
mkdir: cannot create directory `/usr/share/terminfo': File exists
mkdir: cannot create directory `/usr/share/zoneinfo': File exists
mkdir: created directory `/usr/local/share/misc'
mkdir: created directory `/usr/local/share/terminfo'
mkdir: created directory `/usr/local/share/zoneinfo'
[root@daisy ~]# mkdir -pv /usr/{,local/}share/man/man{1..8}
[root@daisy ~]# for dir in /usr /usr/local; do
>   ln -sv share/{man,doc,info} $dir
> done
`/usr/man' -> `share/man'
`/usr/doc' -> `share/doc'
`/usr/info' -> `share/info'
`/usr/local/man' -> `share/man'
ln: failed to create symbolic link `/usr/local/doc': File exists
`/usr/local/info' -> `share/info'
[root@daisy ~]# case $(uname -m) in
>  x86_64) ln -sv lib /lib64 && ln -sv lib /usr/lib64 ;;
> esac
[root@daisy ~]# mkdir -v /var/{lock,log,mail,run,spool}
mkdir: cannot create directory `/var/lock': File exists
mkdir: cannot create directory `/var/log': File exists
mkdir: cannot create directory `/var/mail': File exists
mkdir: cannot create directory `/var/run': File exists
mkdir: cannot create directory `/var/spool': File exists
[root@daisy ~]# mkdir -pv /var/{opt,cache,lib/{misc,locate},local}
mkdir: created directory `/var/lib/locate'
I'm confused about all of the "mkdir: cannot create directory ...:File exists" Is this to be expected?
 
Old 05-21-2011, 02:24 PM   #22
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

It looks like that LFS is not set to /mnt/lfs (assuming you followed the book) and you are not inside the chrooted environment:
Code:
[root@daisy ~]# chroot "$LFS" /tools/bin/env -i \
>     HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
>     PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
>     /tools/bin/bash --login +h
chroot: cannot change root directory to : No such file or directory
Check if it is set:
Code:
echo $LFS
It should print /mnt/lfs

If you fixed that, got to chapter 6.2 and start from there with this command:
Code:
mkdir -v $LFS/{dev,proc,sys}
Hope this helps.
 
1 members found this post helpful.
Old 05-21-2011, 03:05 PM   #23
gdawg
Member
 
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 70

Original Poster
Rep: Reputation: 0
Hi druuna - you are absolutely right. "echo $LFS" as root was blank. I went back to find how to set root up and did "export LFS=/mnt/lfs" as root and all is well. I'm sure I was told to check it but I forgot to and/or didn't remember how to reset it. Well, I'm certainly learning a lot. Thank you very much.

Best regards,

Glen
 
Old 05-21-2011, 03:33 PM   #24
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
You're welcome
 
Old 05-22-2011, 12:06 AM   #25
gdawg
Member
 
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 70

Original Poster
Rep: Reputation: 0
Ran into a bunch of failures while running "make -k check" at 6.16.GCC-4.5.2 of LFS manual. Everything was looking good until I ran this test. Here is a summary of the test:
Quote:
=== gcc Summary ===

# of expected passes 35662
# of unexpected failures 12978
# of expected failures 163
# of unresolved testcases 8270
# of unsupported tests 704
/sources/gcc-build/gcc/xgcc version 4.5.2 (GCC)


Compiler version: 4.5.2 (GCC)
Platform: i686-pc-linux-gnu
configure flags: --prefix=/usr --libexecdir=/usr/lib --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ --disable-multilib --disable-bootstrap --with-system-zlib
EOF
Mail -s "Results for 4.5.2 (GCC) testsuite on i686-pc-linux-gnu" gcc-testresults@gcc.gnu.org &&
mv /sources/gcc-build/./gcc/testsuite/g++/g++.sum /sources/gcc-build/./gcc/testsuite/g++/g++.sum.sent &&
mv /sources/gcc-build/./gcc/testsuite/gcc/gcc.sum /sources/gcc-build/./gcc/testsuite/gcc/gcc.sum.sent &&
mv /sources/gcc-build/./gcc/testsuite/g++/g++.log /sources/gcc-build/./gcc/testsuite/g++/g++.log.sent &&
mv /sources/gcc-build/./gcc/testsuite/gcc/gcc.log /sources/gcc-build/./gcc/testsuite/gcc/gcc.log.sent &&
true
The downloaded files and patches are still in "sources". The test was run as
Quote:
root:/sources/gcc-build#
The manual states that some failures are expected but 12978 seems excessive. All help is appreciated. After the test I ran echo $LFS as root: and got nothing. I then re-ran "export LFS=/mnt/lfs". Was this correct?

Best regards,

Glen

Last edited by gdawg; 05-22-2011 at 12:10 AM.
 
Old 05-22-2011, 01:59 AM   #26
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debain
Posts: 1,762
Blog Entries: 1

Rep: Reputation: 245Reputation: 245Reputation: 245
Did u rerun gcc again,remove the gcc-build dir and gcc dir and untar again do check LFS is mounted, see what results you get
 
Old 05-22-2011, 06:02 AM   #27
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,
Quote:
Originally Posted by gdawg View Post
Ran into a bunch of failures while running "make -k check" at 6.16.GCC-4.5.2 of LFS manual. Everything was looking good until I ran this test.

The manual states that some failures are expected but 12978 seems excessive.
Some errors are expected, but you are correct in saying that 12000+ are too many.

There's not enough information posted to point you to a specific problem so I can only give you some general pointers:

- Did you remove the gcc and gcc build directory before starting? You need to start with a clean building environment. If, for whatever reason, you use a previously used building environment things can go wrong. Suggestion: remove the gcc-4.5.2 and gcc-build directory and start with untarring gcc-4.5.2.tar.bz2 and then follow the instructions in chapter 6.16.

- If the errors are still present: Please post some of them so we can have a look and maybe find the reason(s).

- Are you sure the previous packages build correctly?

Quote:
After the test I ran echo $LFS as root: and got nothing. I then re-ran "export LFS=/mnt/lfs". Was this correct?
No it isn't. Once you enter the chrooted environment LFS isn't needed/used. The chroot command puts you in a jailed environment where /mnt/lfs/ becomes / (your "new" root directory).

Hope this helps.
 
Old 05-22-2011, 10:15 AM   #28
gdawg
Member
 
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 70

Original Poster
Rep: Reputation: 0
Thanks for the replies spiky0011 and druuna. I'm totally lost now. Can't get back to where I was last night. I've been logging in as desktop user john, then "su - lfs" to get to "lfs" prompt. I went back to section 6.2 as "root @ daisy" and tried to repeat steps I took during last session but couldn't get past "I have no name" prompt. I can go to Dolphin, find "Root", open it locate "sources" and see the packages that I downloaded but can't seem to get there via console. When I "su -" and get prompt "root@daisy", "ls -l" doesn't show "Root" nor "sources". I don't know how to get back to where I was during previous session. Request guidance, please.
 
Old 05-22-2011, 10:26 AM   #29
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debain
Posts: 1,762
Blog Entries: 1

Rep: Reputation: 245Reputation: 245Reputation: 245
Did you start at chapter 2.4 then go to 6.2
 
Old 05-22-2011, 10:32 AM   #30
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

The following steps need to be done to enter chapter 6:
Code:
- become root user
- check if LFS is set: echo $LFS
- check if LFS is mounted: df -h | grep $LFS
- If the above 2 are ok then:
mount -v --bind /dev $LFS/dev
mount -vt devpts devpts $LFS/dev/pts
mount -vt tmpfs shm $LFS/dev/shm
mount -vt proc proc $LFS/proc
mount -vt sysfs sysfs $LFS/sys
chroot "$LFS" /tools/bin/env -i \
    HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
    PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
    /tools/bin/bash --login +h
You are now set to continue were you left of last time.

Hope this helps.
 
  


Reply

Tags
lfs


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
[SOLVED] LFS 6.7 : $LFS/sources and $LFS/tools folders missing prakashsince92 Linux From Scratch 5 12-09-2010 03:26 PM
cannot login as user 'lfs' [su - lfs] mayasedai Linux From Scratch 2 07-26-2005 07:10 AM
Note on LFS packages xushi Linux From Scratch 0 05-04-2005 04:55 AM
how important is perl in LFS {O_o} Linux From Scratch 2 07-09-2004 10:50 AM
LFS performance gain? vonPulex Linux From Scratch 2 07-08-2003 02:11 PM


All times are GMT -5. The time now is 04:01 PM.

Main Menu
Advertisement
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