KhronosGroup / OpenXR-SDK-Source

Sources for OpenXR loader, basic API layers, and example code.

Home Page:https://khronos.org/openxr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can not load library when run hello_xr use inprocess monado runtime

ouclbc opened this issue · comments

when I use hello xr to test monado inprocess runtime, it can not show,the wrong message is below.
it seems openxr loader can not load other so?
10-09 16:10:59.959 7986 7986 I com.khronos.openxr.hello_xr.opengles: type=1400 audit(0.0:62638): avc: denied { use } for comm=4144422D4A44575020436F6E6E6563 path="socket:[122125]" dev="sockfs" ino=122125 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:r:su:s0 tclass=fd permissive=1
10-09 16:10:59.963 7986 7986 I com.khronos.openxr.hello_xr.opengles: type=1400 audit(0.0:62639): avc: denied { read write } for comm=4144422D4A44575020436F6E6E6563 path="socket:[122125]" dev="sockfs" ino=122125 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:r:su:s0 tclass=unix_stream_socket permissive=1
10-09 16:10:59.971 7986 7986 I com.khronos.openxr.hello_xr.opengles: type=1400 audit(0.0:62640): avc: denied { getattr } for comm=4144422D4A44575020436F6E6E6563 path="socket:[122125]" dev="sockfs" ino=122125 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:r:su:s0 tclass=unix_stream_socket permissive=1
10-09 16:10:59.980 7986 7986 V threaded_app: Creating: 0x717f710940
10-09 16:10:59.980 7986 8010 V threaded_app: Config: mcc=0 mnc=0 lang=en cnt=US orien=2 touch=1 dens=560 keys=1 nav=1 keysHid=3 navHid=0 sdk=29 size=2 long=2 modetype=1 modenight=1
10-09 16:10:59.981 7986 8010 V OpenXR-Loader: Verbose [GENERAL | xrInitializeLoaderKHR | OpenXR-Loader] : Entering loader trampoline
10-09 16:10:59.982 7986 8010 V OpenXR-Loader: Verbose [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Entering loader trampoline
10-09 16:10:59.982 7986 7986 V threaded_app: Start: 0x717f710940
10-09 16:10:59.983 7986 8010 I openxr_loader: getActiveRuntimeCursor: Querying URI: content://org.khronos.openxr.runtime_broker/openxr/1/abi/arm64-v8a/runtimes/active/0
10-09 16:10:59.987 7986 8010 I OpenXR-Loader: Got runtime: package: org.freedesktop.monado.openxr_runtime.in_process, so filename: libopenxr_monado.so, native lib dir: /data/app/org.freedesktop.monado.openxr_runtime.in_process-gIn1hUqvOobR9Zcron3ndg==/lib/arm64, has functions: no
10-09 16:10:59.988 7986 8010 E OpenXR-Loader: Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : RuntimeInterface::LoadRuntime skipping manifest file , failed to load with message "dlopen failed: library "libgtkrpc.so" not found"
10-09 16:10:59.988 7986 8010 E OpenXR-Loader: Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : RuntimeInterface::LoadRuntimes - failed to load a runtime10-09 16:10:59.988 7986 8010 E OpenXR-Loader: Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Failed to find default runtime with RuntimeInterface::LoadRuntime()
10-09 16:10:59.988 7986 8010 E OpenXR-Loader: Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Failed querying extension properties
10-09 16:10:59.989 7986 8010 E hello_xr: [16:10:59.989][Error ] XrResult failure [XR_ERROR_RUNTIME_UNAVAILABLE]
10-09 16:10:59.989 7986 8010 E hello_xr: Origin: xrEnumerateInstanceExtensionProperties(layerName, 0, &instanceExtensionCount, nullptr)
10-09 16:10:59.989 7986 8010 E hello_xr: Source: ../../../../openxr_program.cpp:132
10-09 16:10:59.989 7986 8010 V threaded_app: android_app_destroy!

@ouclbc I think the best place to ask this question is https://gitlab.freedesktop.org/monado/monado. From your log, looks like Monado uses libgtkrpc.so on Android and the approach to load this so file used by Monado doesn't support to load it from hello_xr application link namespace and system link namespace. cc @rpavlik.

Yeah best to take this over to monado. That said, I've never even heard of that library so I assume it's something you added to the build system? Easier to troubleshoot if you're able to upload at least part of your fork. (Part of me wonders if you somehow linked against a library from the build computer instead of an android build)

In general it's best to try to static link all the dependencies of the .so file that gets loaded into apps as the runtime, it makes loading simpler and less prone to conflicts.

thank you