Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMAKE_INSTALL_LIBDIR may not be a relative path #47

Closed
SomeoneSerge opened this issue Mar 13, 2024 · 3 comments
Closed

CMAKE_INSTALL_LIBDIR may not be a relative path #47

SomeoneSerge opened this issue Mar 13, 2024 · 3 comments

Comments

@SomeoneSerge
Copy link

Hi! We encounter issues with the following line, e.g. when installing different components into separate prefixes:

RUNTIME_DIR_RELATIVE_TO_MANIFEST ../../../${CMAKE_INSTALL_LIBDIR}

Broader context: https://github.com/jtojnar/cmake-snips?tab=readme-ov-file#assuming-cmake_install_dir-is-relative-path. Discussion regarding the ../../../ issue specifically: NixOS/nixpkgs#293058 (comment)

What would you think about switching to CMAKE_INSTALL_FULL_LIBDIR? I must admit I lack the context and don't know if it's important for you to have relative paths in the manifests

Thanks

@xytovl
Copy link
Collaborator

xytovl commented Mar 14, 2024

This was done to match the default introduced by https://gitlab.freedesktop.org/monado/monado/-/merge_requests/1240

I have to check if this is needed for compatibility with Steam: the host filesystem is mounted on /run/host (see https://gitlab.com/znixian/OpenOVR/-/tree/openxr#linux-specific-info) and I am not sure it is smart enough to remap path read from the manifest if it is in a mapped directory.

@xytovl
Copy link
Collaborator

xytovl commented Mar 24, 2024

I have tested an absolute path in the manifest:
/etc/openxr/1/active_runtime.json, symlink to /run/host/usr/share/openxr/1/openxr_wivrn.json

{
    "file_format_version": "1.0.0",
    "runtime": {
        "name": "Monado",
        "library_path": "/usr/lib64/libopenxr_wivrn.so"
    }
}

When launching a game in steam, I have to manually set XR_RUNTIME_JSON to /run/host/etc/openxr/1/active_runtime.json (or the equivalent /run/host/usr/share/openxr/1/openxr_wivrn.json as the etc file is a symlink).
Loading the library then fails with

Error [GENERAL |  | OpenXR-Loader] : /run/host/usr/share/openxr/1/openxr_wivrn.json library /usr/lib64/libopenxr_wivrn.so does not appear to exist

@xytovl
Copy link
Collaborator

xytovl commented Apr 8, 2024

#55 adds WIVRN_OPENXR_INSTALL_ABSOLUTE_RUNTIME_PATH CMake option to force an absolute path.

@xytovl xytovl closed this as completed Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants