[lfs-dev] Putting a copy util-linux in /tools

Armin K. krejzi at email.com
Sat Jan 18 15:30:18 PST 2014



On 19.1.2014 0:24, Bruce Dubbs wrote:
> Armin K. wrote:
>>
>>
>> On 18.1.2014 23:04, Bruce Dubbs wrote:
>>> Armin K. wrote:
>>>> Well if it works, why not then. Just one minor suggestion below
>>>>
>>>
>>>>>
>>>>> Chapter 6: e2fsprogs
>>>>>
>>>>> mkdir -v build
>>>>> cd build
>>>>> export LD_LIBRARY_PATH=/tools/lib
>>>>> LDFLAGS="-L /tools/lib -luuid -lblkid" \
>>>>> CFLAGS="-I /tools/include"         \
>>>>> ../configure --prefix=/usr         \
>>>>>                    --with-root-prefix="" \
>>>>>                    --enable-elf-shlibs   \
>>>>>                    --disable-libblkid    \
>>>>>                    --disable-libuuid     \
>>>>>                    --disable-uuidd       \
>>>>>                    --disable-fsck
>>>>
>>>> Can't you just symlink the libraries to /lib as it's being done with
>>>> several other libraries/binaries?
>>>
>>> That's possible, but when?  In Chapter 5 we haven't created the
>>> directories in the chroot / yet.  Doing that in Chapter 5 breaks up the
>>> flow of Chapter 6.
>
>> No, no. You got me wrong. I was asking about util-linux libraries,
>> libblkid, libuuid and libmount to be symlinked to /lib to avoid usage of
>> LD_LIBRARY_PATH since it isn't used anywhere else.
>>
>> Same is currently being done at the beginning of chapter6 for
>> libgcc_s.so and libstdc++.so.
>>
>> http://www.linuxfromscratch.org/lfs/view/development/chapter06/createfiles.html
>
> I'm glad you reminded me of that.  I suppose I could avoid a lot of
> changes if we made the symlinks, including one for
> /usr/include/{blkid,uuid}/. I'll keep investigating.
>

You don't really want to do this. If /usr/include/blkid is a symlink to 
/tools/include/blkid, make install in chapter6 might install the headers 
in /tools and that's not what we want. Furthermore, make install might 
fail because it wants to create a directory but there's a symlink in 
place. Special case is just to symlink the header files if there aren't 
many to a directory in /usr/include.



More information about the lfs-dev mailing list