Le 28/01/2012 00:30, Bruce Dubbs a écrit : > Pierre Labastie wrote: >> Well, the reason why grub does not find liblzma is much simpler >> anyway: grub is built before xz! > > It should find xz from Chapter 5. The liblzma.so.5.0.3 is in /tools and > it does have the lzma_code reference. > > There are a few ways to fix this. The easiest is to add /tools to a > LIBRARY_PATH environment variable. We could also just append > #define HAVE_LIBLZMA 1">>confdefs.h > after configure in GRUB. I tried that, but the difference is the same with or without the #define (do not focus on the libraries found, I use ldd on the host, focus only on what libraries are searched):
pierre@turboli:ldd iteration-1/usr/bin/grub-mkimage linux-vdso.so.1 => (0x00007fff18571000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fdd646b4000) /lib64/ld-linux-x86-64.so.2 (0x00007fdd64a5c000) pierre@turboli:ldd iteration-2/usr/bin/grub-mkimage linux-vdso.so.1 => (0x00007fffce4c5000) liblzma.so.5 => /usr/lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f6eda553000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6eda1cf000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f6ed9fc6000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f6ed9daa000) /lib64/ld-linux-x86-64.so.2 (0x00007f6eda79a000) I have not tried to add /tools to a LIBRARY_PATH, because I am (maybe wrongly) worried about linking to a libraries which are then removed. > We could also move xz to be before GRUB. Not tried either, but this should work > The kernel creates the compressed boot images. GRUB only copies a set > of bits into memory. I think GRUB wants xz to access a potential > compressed file system. As far as I understand the docs, in grub2, there are boot images <file>.img created by grub, besides the bits copied to the MBR. Those can be compressed, but the size is not very high anyway regards, Pierre -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page