Honing package users: some build notes. . . and problems.
jxa127 at verizon.net
Wed Sep 1 21:30:43 PDT 2010
-----BEGIN PGP SIGNED MESSAGE-----
It's been quite a while since I've posted, but I _have_ been busy
building LFS 6.6 with package users, albeit slowly.
I promised to post some build notes, so here they are (so far).
Quick background: I'm building LFS 6.6 on a Slackware 13.1 (32-bit)
host running in a QEMU-KVM virtual machine with a 60 GB disk image.
(The VM's host is Slackware64 13.1, but that's neither here nor
there). I have a script that I use to resume my LSF build. It seems to
work well to get me back into the chroot environment. The script I use
is at the bottom of this message. I post it to show that I'm entering
the chroot environment correctly (as far as I know anyway). Finally, I
built and installed Nano in chapter 5 so I have a text editor
available in chapter 6.
1) The initial toolchain builds just fine and the instructions on the
package user hint are just fine.
2) The package user scripts and wrappers install just fine during the
proper spot in chapter 6.
3) The Linux headers install without a problem.
4) The man pages installed just fine too. As far as I can tell, the
there's no attempt to make the man?p directories as indicated in the hint.
5) glibc -- I simply could not get glibc to work as a package user.
The configure step seemed to go okay, and so did make (sort of). Make
check gave the expected errors, but make install didn't really seem to
work. The kicker was when I tried to run localdef and got the error
that there was no such file or directory -- even though I was looking
at /usr/bin/localedef and it seemed to have the correct permissions.
I even went back and rebuilt the toolchain from scratch. I got the
same result with glibc.
Finally I did what the package user hint says and chickened out for
that package. It built perfectly.
I suspect that folks have been able to build glibc as a package user,
but I am not currently knowledgeable enough to track down the
problem(s). If anyone has any ideas and/or a solution. Please post it!
As a policy, I'm thinking of finishing my build of LFS 6.6 with GCC
and Binutils also built as root. There's no reason to uninstall those
packages, and upgrading them is essentially rebuilding LFS.
6) One idea that just occurred to me is go halfway with a package user
for something like glibc. As an example, I run the install_package
script for glibc, untar the source tarball, but then exit out of the
glibc user. I got back to the /usr/src/glibc directory and chown all
the files in the source directory to be root:glibc. And then I build
the package as root.
My ideas is that the package would build without trouble because of
the root permissions, but all the installed files would be part of the
glibc group. Would this even work?
7) Zlib builds without any problems as a package user.
Conclusions so far: glibc is a pain to build as a package user. I
don't know if I'm missing something simple or what.
My plan is to continue to build LFS 6.6 even though 6.7 is on the cusp
of being released. I'll get to it soon enough. :-)
Here's the script:
# The purpose of this script is to make it easier to resume
# an LFS build in chapter 6 and beyond after having to exit
# from the chroot environment to shutdown or reboot.
# Make sure that root has the $LFS variable set:
# First step: mount the LFS partitions
mount -v -t ext3 /dev/sda7 $LFS
mount -v -t ext3 /dev/sda5 $LFS/boot
mount -v -t ext3 /dev/sda6 $LFS/sources
# Secind step: 6.2.2. Mounting and Populating /dev
mount -v --bind /dev $LFS/dev
# Third step: 6.2.3. Mounting Virtual Kernel File Systems
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
# Finally, enter the chroot environment:
chroot "$LFS" /tools/bin/env -i \
HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
/tools/bin/bash --login +h
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
More information about the lfs-dev