Rework the descriptions of directories for shared libraries and the symlinks to them#218
Open
keszybz wants to merge 4 commits into
Open
Rework the descriptions of directories for shared libraries and the symlinks to them#218keszybz wants to merge 4 commits into
keszybz wants to merge 4 commits into
Conversation
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.
bluca
approved these changes
Jun 17, 2026
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.
Member
Author
|
There's one more commit from @behrmann to describe what happens in Arch. PTAL. |
bluca
approved these changes
Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.