Skip to content

Rework the descriptions of directories for shared libraries and the symlinks to them#218

Open
keszybz wants to merge 4 commits into
uapi-group:mainfrom
keszybz:lfsh-lib64-more
Open

Rework the descriptions of directories for shared libraries and the symlinks to them#218
keszybz wants to merge 4 commits into
uapi-group:mainfrom
keszybz:lfsh-lib64-more

Conversation

@keszybz

@keszybz keszybz commented Jun 17, 2026

Copy link
Copy Markdown
Member

The first commit was the initial motivation: the description of multiarch and multilib was edited too many times and was rather confusing to read. It also contained some incorrect statements. The other two commits are cleanups for the surrounding text. Each has an extensive description in the commit message, which won't repeat here.

keszybz and others added 3 commits June 17, 2026 13:59
This "rewrite" mostly rearranges the existing text and does some
minor corrections, but does not introduce changes to the meaning
of the spec.

The old text was initially written to describe multiarch systems, and
was later extended to describe multilib systems, but adding exceptions
and clarifications in various places. As a result, it didn't describe
either case very well. Users will primarily be interested in one
layout or the other (whatever is used by their system), so the text
becomes easier to read if the two layouts are described in separate
subsections.

> /usr/lib/
> Static, private vendor data that is compatible with all architectures
This part was actually wrong. /usr/lib/ contains a lot of stuff
that is architecture-specific. Also, the data is not "private" in
any meaningful way. Shared libraries in particular are … shared.
But plenty of other files are used by multiple consumers too.

Co-authored-by: Jörg Behrmann <behrmann@physik.fu-berlin.de>
We described those symlinks as legacy. But they are part of the ABI,
so they are not going away. So the symlinks themselves are not legacy,
the original directories were, but we are describing the symlinks not
the old layout.

In a multiarch layout, /lib64 does not point to $libdir. It points to
a directory with loaders (or more likely symlinks to) for different
architectures. The premise of multiarch is parallel installation
of multiple architectures, so pointing to a single architecture
(eithr the primary architecture denoted by $libdir or any other)
is incompatible with that.
This document inherited the recommandation for multiarch from its
precedessor, the file-hierarchy man page. The multiarch layout _is_
elegant and flexible, but it hasn't been widely adopted, it is only used
by the Debian family of distributions. At this point, it doesn't seem
likely that it'll be adopted elsewhere. Wiring up installations in this
more complex scheme if much more effort. The ability to support multiple
architectures from a single installation was more useful when
installations were shared. Nowadays, small, tailored images are used
much more often. In particular, for immutable installations, the size of
the image creates a pretty significant cost, so installations that are
trimmed down to support just one architecture make sense. Users who want
to run something on a different architecture will probably download a
full image and spawn a VM. We shouldn't say that multiarch is the
future, or recommend it for "new" installations. New distro efforts are
not doing this and we shouldn't be trying to convince more gullible
readers to try this.
rpm-based distros and Arch handle multilib differently with one shipping
/usr/lib64 and the other shipping /usr/lib32 and therefore /usr/lib containing
different widths among the two.

This adds a split that describes both situations.
@keszybz

keszybz commented Jun 17, 2026

Copy link
Copy Markdown
Member Author

There's one more commit from @behrmann to describe what happens in Arch. PTAL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants