Meumeu / WiVRn

An OpenXR streaming application to a standalone headset
GNU General Public License v3.0
134 stars 22 forks source link

SONAME Configuration & Versioning Policy #49

Closed damaestro closed 2 weeks ago

damaestro commented 3 months ago

We need to configure proper soname's and versioning for downstream packaging policy compliance. The goal is to provide an ABI guarantee for any given soname. This can be accomplished by soname versioning or library symbol versioning. The simpler solution is likely the right one. Soname bumps are usually more involved and will require rebuilding all linked packages.

Fedora: https://docs.fedoraproject.org/en-US/packaging-guidelines/C_and_C++/

Debian: https://www.debian.org/doc/manuals/maint-guide/advanced.en.html#library

Based on the fedora-review tool, there is one soname that needs addressing:

W: no-soname /usr/lib64/libopenxr_wivrn.so

Upstream Monado addressed this in https://gitlab.freedesktop.org/monado/monado/-/issues/335

damaestro commented 3 months ago

This is likely invalid. libopenxr_wivrn.so is not to be linked against and should be defined as a MODULE and is only loaded at runtime. This is a tracking bug pending resolution upstream and confirmation in this project.

xytovl commented 3 months ago

libopenxr_wivrn.so is produced by https://gitlab.freedesktop.org/monado/monado/-/blob/2d26946ffa20d274aefc528e2728175cc76a6227/src/xrt/targets/openxr/CMakeLists.txt#L17 which is already defined as MODULE

This is expected to only be loaded at runtime, what more is needed to address the warning?

damaestro commented 3 months ago

The only additional change would be if we move libopenxr_monado.so to /usr/lib[64]/monado/libopenxr_monado.so we should also move libopenxr_wivrn.so to /usr/lib[64]/wivrn/libopenxr_wivrn.so.

damaestro commented 2 months ago

Yes, we need to move libopenxr_wivrn.so to /usr/lib[64]/wivrn/libopenxr_wivrn.so so it is outside of the ld load path for Fedora packaging. I've tested this with the monado vulkan layers and it's working if everything is still configured correctly. https://gitlab.freedesktop.org/monado/utilities/vulkan-layers/-/issues/3

Per https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderInterfaceArchitecture.md there is no prescribed location and everything is configuration driven.

damaestro commented 2 months ago

Pending evaluation of https://gitlab.freedesktop.org/monado/monado/-/blob/main/doc/packaging-notes.md this might not be needed. https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2193 was rejected based on the proposed standard.

damaestro commented 2 weeks ago

I've confirmed that libopenxr_wivrn.so (an OpenXR Runtime) will remain unversioned and visible to the linker. I'm currently in a review for a Fedora packaging policy that encodes this decision. The only change that we'll need to make for WiVRn will be the file system location and how the new location is exposed the linker. I'll open a new issue once we get to that point.