Re: Is there a chance to phase out `/lib64` directory?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 28, 2023 at 3:22 AM Kevin Kofler via devel
<devel@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Kalev Lember wrote:
> > I would like to have a layout similar to what Debian is doing, so that
> > shared libraries would go in /usr/lib/x86_64-redhat-linux/ and /usr/lib64
> > would be a legacy symlink pointing to it.
>
> That layout is NOT compliant with the FHS.
>
> Which is particularly hilarious as Debian has long refused to use
> /usr/libexec (despite GNU having had it for ages, and Debian's refusal has
> in turn lead several upstreams to not or poorly support it and abuse
> /usr/lib or other directories for its purpose instead) because it was
> purportedly against the FHS (it seems they have never noticed that the
> clause that allows lib64 and lib32 does not actually require the suffix to
> be a number, "exec" is a perfectly fine suffix, so libexec is just another
> lib64/lib32-type directory), but was very fast to add an exception for this
> new entirely non-standard layout. (The FHS requires the arch-specific libdir
> variants to be suffixed sibling directories of lib, NOT subdirectories.)

In RISCV lands things look like this:

[..]
#define STARTFILE_PREFIX_SPEC             \
   "/lib" XLEN_SPEC "/" ABI_SPEC "/ "        \
   "/usr/lib" XLEN_SPEC "/" ABI_SPEC "/ "    \
[..]

Linker default search paths:

[..]
SEARCH_DIR("=/usr/riscv64-redhat-linux/lib64/lp64d")
SEARCH_DIR("=/usr/riscv64-redhat-linux/lib64")
SEARCH_DIR("=/usr/riscv64-redhat-linux/lib6464/lp64d")
SEARCH_DIR("=/usr/lib6464/lp64d")
SEARCH_DIR("=/usr/lib64")
SEARCH_DIR("=/usr/local/lib64/lp64d")
SEARCH_DIR("=/usr/local/lib64")
SEARCH_DIR("=/lib64/lp64d")
SEARCH_DIR("=/lib64")
SEARCH_DIR("=/usr/lib64/lp64d")
SEARCH_DIR("=/usr/riscv64-redhat-linux/lib")
SEARCH_DIR("=/usr/local/lib")
SEARCH_DIR("=/lib")
SEARCH_DIR("=/usr/lib")
[..]

By default the expectation is to find libraries under ABI
subdirectory, e.g. /usr/lib64/lp64d

In Fedora/RISCV /usr/lib64/lp64d is a symlink back to /usr/lib64

>From glibc:

[..]
This program interpreter self-identifies as: /lib/ld-linux-riscv64-lp64d.so.1

Shared library search path:
  (libraries located via /etc/ld.so.cache)
  /lib64/lp64d (system search path)
  /usr/lib64/lp64d (system search path)
[..]

david

>
> > That kind of layout would make it much easier to do cross compilation
> > because you could just take the whole /usr/lib/another-host-triplet/
> > directory from another architecture without it interfering with the host
> > libraries and use it for cross compilation purposes.
>
> Practical cross-compilation to a completely different architecture needs
> sysroots anyway. That way, one can also easily target a different
> distribution on a different (or even the same) architecture, not just Fedora
> on a different architecture.
>
>         Kevin Kofler
> _______________________________________________
> devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
> Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
> Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux