[Aboriginal] Breakage while building LFS7.2
Rob Landley
rob at landley.net
Thu Nov 1 15:43:47 PDT 2012
On 10/31/2012 12:46:22 PM, Prasanna Balan wrote:
> Hello
> I am trying to build LFS 7.2 using control images.I am using the
> patch attached below.
> The build breaks while extracting tzdata.I've attached the
> ( relevant )build log below the patch.
> I necessarily added a ls command above mv in the extract function.
> Notice how the packages above show ls properly and for tzdata it
> shows up like readlink -f
>
> I want to confirm that this is for all and my system is not broken.
It's saying that the tzdata you're copying _to_ already exists, and is
not a directory. (I.E. it's complaining about the target file, not the
source.)
Let's see, clone a clean directory, apply your patch...
=== lfs-packages ( )
Extracting 'lfs-packages'...
lfs-packages
usage: ls [-ACFHLRSacdfiklmnpqrstux1] [directory...]
[snip]
ls: Unknown option h
mv: invalid option -- 'v'
BusyBox v1.20.2 (2012-10-30 18:30:59 CDT) multi-call binary.
...
My $PATH is to the aboriginal build/host directory (my host system
hasn't got mksquashfs), so you've added options that aren't in the
busybox binaries.
Try "hg revert common/download_functions.sh" and...
Ah. the problem is that the extract software assumes that each tarball
extracts into a single subdirectory. It then wildcard renames that
directory to the new destination. (cd tempdir; tar xvjf blah.tar.*; mv
* ~/destination/newdirname)
But the tzdata archive in 7.2 is extracting:
$ tar tvzf
build/lfs-bootstrap/packages/lfs-packages/tzdata-2012.5.tar.gz
-rw-r--r-- 0/0 44941 2012-07-18 19:45 africa
-rw-r--r-- 0/0 15827 2012-07-18 19:30 antarctica
-rw-r--r-- 0/0 112760 2012-07-25 09:13 asia
-rw-r--r-- 0/0 68423 2012-07-25 09:40 australasia
-rw-r--r-- 0/0 121390 2012-07-25 09:13 europe
-rw-r--r-- 0/0 135756 2012-07-25 09:13 northamerica
-rw-r--r-- 0/0 73854 2012-07-25 09:13 southamerica
-rw-r--r-- 0/0 1190 2012-07-18 19:30 pacificnew
-rw-r--r-- 0/0 2955 2012-07-18 19:30 etcetera
-rw-r--r-- 0/0 4083 2012-07-18 19:30 backward
-rw-r--r-- 0/0 1546 2012-07-18 19:30 systemv
-rw-r--r-- 0/0 393 2012-07-18 19:30 factory
-rw-r--r-- 0/0 19306 2012-07-18 19:30 solar87
-rw-r--r-- 0/0 19324 2012-07-18 19:30 solar88
-rw-r--r-- 0/0 19600 2012-07-18 19:30 solar89
-rw-r--r-- 0/0 4326 2012-07-18 19:30 iso3166.tab
-rw-r--r-- 0/0 19913 2012-07-18 19:30 zone.tab
-rw-r--r-- 0/0 3186 2012-07-25 09:13 leapseconds
-rw-r--r-- 0/0 680 2012-07-18 19:30 yearistype.sh
So the rename is going "that destination is not an existing directory,
I can't move multiple files to something that isn't a directory!"
Looks like we'll have to special case it.
Ah, I see you've already got some special casing:
for i in $(cd "$SRCDIR"; ls *.tar.*)
do
- extract_package $(noversion $i)
+ a=$(noversion $i)
+ if [ $a != "binutils" -a $a != "bash" -a $a != "linux" -a $a !=
"glibc" -a $a != "gcc" ]
+ then
+ extract_package $a
+ fi
done
I do actually want to build the new toolchain, glibc, and I think I
_am_ building the new bash? (Thought I was...)
The problem with replacing the existing toolchain is that if you're
using the distcc acceleration trick it suddenly stops working, so we
might want some kind of config option about it. This is why I've got
the "FILTER" functionality in run-build-stages, which lets you exclude
any of the categories in images/lfs-bootstrap/mnt/package-list (and
exclude multiple ones via
FILTER="busybox|internationalization|pointless".)
To use it you should be able to do something like:
KERNEL_EXTRA="FILTER=busybox|internationalization|pointless"
./native-build.sh \
/path/to/control-image.hdc
(KERNEL_EXTRA appends extra stuff to the kernel command line, and any
keyword=value thing the kernel doesn't recognize gets turned into an
environment variable for PID 1.)
And yes, for 7.2 you'll probably have to update package-list. That file
can't be automatically generated from the list of existing packages
because it controls the build order. (LFS is sensitive to which
packages are installed in which order, and you can't work that out from
the contents of the tarball-of-tarballs.)
Rob
More information about the Aboriginal
mailing list