Skip to content

OpenXR-loader fails to load manifest due to permission errors #603

@JulianGro

Description

@JulianGro

When CMAKE_INSTALL_PREFIX is set to a directory that the user on the end-user's system doesn't have read permission for, the OpenXR-loader fails to load anything at all.

Example error:

Error [GENERAL |  | OpenXR-Loader] : Unknown failure: filesystem error: status: Permission denied [/root/.conan2/p/b/openx4d0ad6aedd501/p/etc/openxr/1/api_layers/implicit.d]

On anything that is not a system package, CMAKE_INSTALL_PREFIX might be set to an arbitrary directory. In our case, we build OpenXR-loader using Conan, which means the CMAKE_INSTALL_PREFIX is always inside the Conan folder. In the case of a CI pipeline, this is often the user root which isn't accessible by most users.
Even if you are not building as the root user, it is up to chance whenever the custom CMAKE_INSTALL_PREFIX is has read permissions on the end user's system.

The CMAKE_INSTALL_PREFIX being missing doesn't cause any problems. Only permission denied errors are problematic.

In our case, the workaround is to set the CMAKE_INSTALL_PREFIX to a folder that is unlikely to exist on the user's system, such as inside /Conan2XXX/.

I tried looking into the issue myself, but I am unsure where OpenXR-loader decides what directories to check for manifests, and where it gets those directories from.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions