Skip to content

Trying to make openxr work on Pico4 - static fails on silicon M1 osx. #194

@MarcWeber

Description

@MarcWeber

I tried getting OpenXR to work on Pico4.
the hello_xr from Khronos works.

However with Rust I get stuck at create_instance.
The pointer has an address and is not null but calling it doesn't return within create_instance.

The non static versions failed so trying static leading to cmake trying to install to /openxr
which cannot be done on OSX without heavy patching of security policies maybe nobody wants to do.

I also updated the OpenXR submodule (git submodule update --remote --rebase)
which at least allows to use current cmake 4.0.1 rather
than finding latest 3.26 which worked with the referenced submodule version.

But I get the same issue. So I guess either the way how cmake is run or the
cmake files should be patched cause updating failed ?

The working hello_xr from Khronos ships its own openxr_loader.so.

adb shell
  1|PICOA8110:/ $ find / -name '*openxr*' 2> /dev/null
  /vendor/etc/openxr
  /system/lib64/libopenxr_api.so
  /system/lib64/libopenxr_forwardloader.so
  /system/lib/libopenxr_api.so
  /system/lib/libopenxr_forwardloader.so

So looks like the one I tried shipping was found works with the C++ sample but
eventually not with Rust because I cannot find similar library on the Pico4
using find.

 [ 90%] Building CXX object src/loader/CMakeFiles/openxr_loader.dir/__/external/android-jni-wrappers/wrap/android.net.cpp.o
  [ 95%] Building CXX object src/loader/CMakeFiles/openxr_loader.dir/__/external/jnipp/jnipp.cpp.o
  [100%] Linking CXX static library libopenxr_loader.a
  [100%] Built target openxr_loader
  Install the project...
  -- Install configuration: "Release"

  --- stderr
  CMake Error at include/openxr/cmake_install.cmake:54 (file):
    file cannot create directory: /openxr.  Maybe need administrative
    privileges.
  Call Stack (most recent call first):
    include/cmake_install.cmake:47 (include)
    cmake_install.cmake:47 (include)


  make: *** [install] Error 1

  thread 'main' panicked at /Users/marcweber/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cmake-0.1.54/src/lib.rs:1119:5:

  command did not execute successfully, got: exit status: 2

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
note: If the build failed due to a missing target, you can run this command:
note: 
note:     rustup target install aarch64-linux-android

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions