Skip to content

shell: resolve symlinked OpenXR active runtime library paths - #165

Open
AngelBePro wants to merge 1 commit into
luohoa97:mainfrom
AngelBePro:fix/openxr-symlink-library-path
Open

AngelBePro wants to merge 1 commit into
luohoa97:mainfrom
AngelBePro:fix/openxr-symlink-library-path

Conversation

@AngelBePro

Copy link
Copy Markdown

What happened

When the system active OpenXR runtime is a symlink (the common case, e.g. ~/.config/openxr/1/active_runtime.json -> /usr/share/openxr/1/openxr_wivrn.json for WiVRn), Cordial reports:

The OpenXR runtime WiVRn names /home//.config/openxr/1/../../../lib/wivrn/libopenxr_wivrn.so, which does not exist.

The library exists at /usr/lib/wivrn/libopenxr_wivrn.so; the manifest’s relative library_path is correct relative to /usr/share/openxr/1/.

Cause

manifest_library() in crates/cordial-shell/src/vr.rs resolves a relative library_path against manifest.parent(). Path::parent() is lexical, so for a symlinked manifest it anchors to the symlink’s directory (~/.config/openxr/1) instead of the target manifest’s directory. manifest_name()/content reads follow the symlink, so the name resolves to “WiVRn” but the lib base resolves to the wrong place. Affects any runtime whose active-runtime manifest is a symlink and whose library_path` is relative (WiVRn, SteamVR, etc.).

Fix

Canonicalize the manifest before taking its parent, falling back to the original path if canonicalization fails. Absolute library_paths are unchanged.

Testing

  • Added a_symlinked_active_runtime_resolves_relative_library_paths_against_the_target covering the WiVRn symlink+relative-path layout.
  • Existing the_users_active_runtime_wins_over_the_systems / wivrn_steamvr_and_packaged_runtimes_are_found_and_resolve_by_id still cover the non-symlink and relative-path cases.
    )

manifest_library() anchored a relative runtime.library_path to
manifest.parent(), which is lexical. When the active runtime is the
common ~/.config/openxr/1/active_runtime.json symlink (e.g. WiVRn,
SteamVR), that resolved against the symlink's directory and reported a
missing library even though the target manifest's relative path was
valid.

Canonicalize the manifest before taking its parent, falling back to the
original path on failure. Adds a regression test covering the symlinked
active-runtime case.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-01T01:53:05.019279Z 08f421b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant