On 10/11/2018 14:13, John Frankish via lfs-dev wrote:
>>> Ref:
>>>
>>> Linux From Scratch - Version SVN-20181106 Chapter 6. Installing Basic 
>>> System Software 6.9. Glibc-2.28
>>>
>>> The instructions mention:
>>>
>>> libc_cv_slibdir=/lib
>>>     This variable sets the correct library for all systems. We do not want 
>>> lib64 to be used.
>>>
>>> ..but after installation I needed the following sed for this to be 
>>> true
>>>
>>> sed -i 's@lib64/ld-linux-x86-64.so.2@lib/ld-linux-x86-64.so.2@' 
>>> /usr/bin/ldd
>>>
>>>
>> We still have a /lib64 directory, and two links:
>> ----------
>> ld-linux-x86-64.so.2 -> ../lib/ld-linux-x86-64.so.2
>> ld-lsb-x86-64.so.3 -> ../lib/ld-linux-x86-64.so.2
>> ----------

> If LSB mandates that those links are present, does it allow for the actual 
> files to be in /lib and the symlinks to  be in /lib64?

After looking more closely, only /lib64/ld-lsb-x86-64.so.3 is mandated by LSB.
Actually, it mandates a set of base libraries that "will be
in an implementation-defined directory which the dynamic linker shall search
by default". See
http://refspecs.linuxbase.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64/requirements.html
for more details.

I've seen nothing telling that a file mandated by the LSB or the FHS cannot be
a symlink. But at some places, they explicitly tell that a specific file can
be a symlink...

> 
> If this is the case, then the loader can be in /lib (with a couple of small 
> adjustments to the gcc build) and anybody who does not have a need to be LSB 
> compliant can just delete /lib64, /usr/lib64 and things will still work - 
> this is in fact what I have done.
> 

Your distro, your rules ;). The book tries to be FHS/LSB compliant. It allows
scripts with FHS/LSB compliant hardcoded paths (such as ldd) to run without
modification. I guess you'll need some adjustments for more packages than gcc
if you completely remove /lib64. OTOH, /usr/lib64 is _not_ mandated by FHS/LSB.

Pierre
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to