On Wed, 24 Mar 2021 18:11:46 +0100 Pierre Labastie <pierre.labas...@neuf.fr> wrote:
> On Wed, 2021-03-24 at 17:07 +0100, Patrick Frisch wrote: > > > > Am 24.03.21 um 13:12 schrieb Scott Andrews: > > > > > > echo $LFS > > > > > > Looks like it wasn't set > > > > > > > > > > > > > No, $LFS is set almost always to /mnt/lfs, as it was in this > > case, but the cause for the error was found already. > > > > Do you have a reason why you have two real directories for /lib > > and /lib64, on most systems I know they already symlinked the > > two, so you don't have to make this strange empty link in the > > first place. > > I think having ld-linux-x86-64.so.2 in /lib64 is mandated by the > LSB (as well as having ld-lsb-x86-64.so.3, which I have never seen > used). But we want to have everything else in /lib, so we do the > necessary changes (case $(uname -m) ... in gcc, or > libc_cv_slibdir=/lib in glibc) in order to have everything in /lib, > and just keep the mandatory file as a symlink in /lib64. > Having /lib64 symlinked to /lib would mean that /lib64 and /lib > have the same content. Here /lib64 is almost empty, and this is > what we want... This is possible only if /lib64 is a real directory. > I don't recall /lib53 being called out on LSB, it is in FHS. fhs-3.0.pdf 3.9. /lib : Essential shared libraries and kernel modules 3.9.1. Purpose The /lib directory contains those shared library images needed to boot the system and run the commands 11 in the root filesystem, ie. by binaries in /bin and /sbin.3.9.2. Requirements At least one of each of the following filename patterns are required (they may be files, or symbolic links): File Description libc.so.* The dynamically-linked C library (optional) ld* The execution time linker/loader (optional) 12 If a C preprocessor is installed, /lib/cpp must be a reference to it, for historical reasons.3.9.3. Specific Options The following directories, or symbolic links to directories, must be in /lib, if the corresponding subsystem is installed: Directory Description modules Loadable kernel modules (optional) 3.10. /lib<qual> : Alternate format essential shared libraries (optional) 3.10.1. Purpose There may be one or more variants of the /lib directory on systems which support more than one binary 13 format requiring separate libraries.9 Found at http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html and http://www.freedesktop.org/wiki/Software/xdg-user-dirs. 10 A description of GLib's conventions can be found in the documentation for GUserDirectory, at http://developer.gnome.org/glib/unstable/glib- Miscellaneous-Utility-Functions.html#GUserDirectory. 11 Shared libraries that are only necessary for binaries in /usr (such as any X Window binaries) must not be in /lib. Only the shared libraries required to run binaries in /bin and /sbin may be here. In particular, the library libm.so.* may also be placed in /usr/lib if it is not required by anything in /bin or /sbin. 12 The usual placement of this binary is /usr/bin/cpp. 13 This is commonly used for 64-bit or 32-bit support on systems which support multiple binary formats, but require libraries of the same name. In this case, /lib32 and /lib64 might be the library directories, and /lib a symlink to one of them. 11 The Root Filesystem 3.10.2. Requirements If one or more of these directories exist, the requirements for their contents are the same as the normal / 14 lib directory, except that /lib<qual>/cpp is not required. > > > > And I remember, that I had some issues in the past, because gcc > > searches some libs in /lib64 or vice versa. So I remember that I > > did a LFS build with the two libs symlinked (ln -sf /lib /lib64), > > so I didn't have to fiddle with single library linking, and it > > worked :-) > > That was how we were building a few years ago... > > Pierre This is how most distributions are doing that today...... ls -l lrwxrwxrwx 1 root root 7 Dec 2 07:36 bin -> usr/bin drwxr-xr-x 3 root root 16384 Dec 31 1969 boot drwxr-xr-x 19 root root 4080 Mar 24 13:59 dev drwxr-xr-x 124 root root 12288 Mar 23 07:22 etc drwxr-xr-x 7 root root 4096 Mar 6 13:47 home lrwxrwxrwx 1 root root 7 Dec 2 07:36 lib -> usr/lib drwx------ 2 root root 16384 Dec 2 08:02 lost+found drwxr-xr-x 5 root root 4096 Mar 8 13:43 media drwxr-xr-x 2 root root 4096 Dec 2 07:36 mnt drwxr-xr-x 4 root root 4096 Dec 2 07:46 opt dr-xr-xr-x 218 root root 0 Dec 31 1969 proc drwx------ 10 root root 4096 Mar 22 19:17 root drwxr-xr-x 29 root root 840 Mar 24 13:59 run lrwxrwxrwx 1 root root 8 Dec 2 07:36 sbin -> usr/sbin drwxr-xr-x 2 root root 4096 Dec 2 07:36 srv dr-xr-xr-x 12 root root 0 Dec 31 1969 sys drwxrwxrwt 17 root root 4096 Mar 24 16:57 tmp drwxr-xr-x 11 root root 4096 Mar 3 13:01 usr drwxr-xr-x 11 root root 4096 Mar 5 20:43 var -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style