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

Can't build for iOS if OpenVR XR plugin is in project #33

Closed
robinnorth opened this issue Aug 11, 2020 · 5 comments
Closed

Can't build for iOS if OpenVR XR plugin is in project #33

robinnorth opened this issue Aug 11, 2020 · 5 comments
Labels
fixed in next version This has been fixed and will need a test when the next version comes out.

Comments

@robinnorth
Copy link

I am experiencing a similar issue to #5 when building a project for iOS (testing a combined XR and AR setup) where Unity attempts to include multiple versions of the OpenVR XR plugin's native plugins in the build, resulting in the iOS build failing:

Plugin 'XRSDKOpenVR.dll' is used from several locations:
 Packages/com.valvesoftware.unity.openvr/Runtime/x64/XRSDKOpenVR.dll would be copied to <PluginPath>/XRSDKOpenVR.dll
 Packages/com.valvesoftware.unity.openvr/Runtime/x86/XRSDKOpenVR.dll would be copied to <PluginPath>/XRSDKOpenVR.dll
Plugin 'openvr_api.dll' is used from several locations:
 Packages/com.valvesoftware.unity.openvr/Runtime/x86/openvr_api.dll would be copied to <PluginPath>/openvr_api.dll
 Packages/com.valvesoftware.unity.openvr/Runtime/x64/openvr_api.dll would be copied to <PluginPath>/openvr_api.dll
Plugin 'ucrtbased.dll' is used from several locations:
 Packages/com.valvesoftware.unity.openvr/Runtime/x64/ucrtbased.dll would be copied to <PluginPath>/ucrtbased.dll
 Packages/com.valvesoftware.unity.openvr/Runtime/x86/ucrtbased.dll would be copied to <PluginPath>/ucrtbased.dll
Plugin 'libopenvr_api.so' is used from several locations:
 Packages/com.valvesoftware.unity.openvr/Runtime/x64/lib/x64/libopenvr_api.so would be copied to <PluginPath>/libopenvr_api.so
 Packages/com.valvesoftware.unity.openvr/Runtime/x64/libopenvr_api.so would be copied to <PluginPath>/libopenvr_api.so
Please fix plugin settings and try again.

Can these native plugins have their import settings changed to only be included for Editor and Standalone platforms in the same way that the Oculus XR plugin does in order to prevent them being needlessly included in builds for unsupported platforms, like iOS?

Current OpenVR native plugin import settings:
image

Oculus XR plugin import settings:
image

@zite zite added the in progress This is a work item we're currently spending time fixing label Aug 17, 2020
@rpavlik
Copy link

rpavlik commented Oct 5, 2020

I think I fixed this is #55 if it gets merged

@zite zite added fixed in next version This has been fixed and will need a test when the next version comes out. and removed in progress This is a work item we're currently spending time fixing labels Oct 20, 2020
@zite
Copy link
Collaborator

zite commented Dec 11, 2020

Yup, this should be fixed in the latest release. You're welcome to give it a try and let us know if it solves the problem.
https://github.com/ValveSoftware/unity-xr-plugin/releases/tag/v1.1.1b

@kisak-valve
Copy link
Member

Closing per the last comment.

@mastayb
Copy link

mastayb commented May 10, 2021

This issue

Plugin 'libopenvr_api.so' is used from several locations: Packages/com.valvesoftware.unity.openvr/Runtime/x64/lib/x64/libopenvr_api.so would be copied to <PluginPath>/libopenvr_api.so Packages/com.valvesoftware.unity.openvr/Runtime/x64/libopenvr_api.so would be copied to <PluginPath>/libopenvr_api.so Please fix plugin settings and try again.

Still exists in 1.1.4 for Standalone OSX and Linux builds

@adrianhoppe
Copy link

adrianhoppe commented Aug 4, 2021

I agree with @mastayb. The problem still persists.
For a windows build everything works.
But, I get the following error when building for Linux:

Plugin 'libopenvr_api.so' is used from several locations:
Packages/com.valvesoftware.unity.openvr/Runtime/x64/lib/x64/libopenvr_api.so would be copied to /libopenvr_api.so
Packages/com.valvesoftware.unity.openvr/Runtime/x64/libopenvr_api.so would be copied to /libopenvr_api.so
Please fix plugin settings and try again.

UnityEditor.Modules.DefaultPluginImporterExtension:CheckFileCollisions (string)
UnityEditorInternal.PluginsHelper:CheckFileCollisions (UnityEditor.BuildTarget)
UnityEditor.BuildPipeline:BuildPlayer (UnityEditor.BuildPlayerOptions)

Our goal is to build a multi-user game for several windows clients that are connected via a headless Linux server.
For the Linux build, we remove the SteamVR scripts using a condition within the SteamVR assembly definition asset.
However, the OpenVR XR Plugin package still throws the error above.

My current workaround is to delete the folder com.valvesoftware.unity.openvr-1.1.4.tar\package\Runtime\x64\lib that is located within the archive Assets\SteamVR\OpenVRUnityXRPackage\Editor\com.valvesoftware.unity.openvr-1.1.4.tgz.
This removes the duplicate file libopenvr_api.so which was "temporarily" introduced in 0ba278b.
It's not pretty but the temporary changes of 0ba278b will hopefully be removed soon so that this hack is not needed anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed in next version This has been fixed and will need a test when the next version comes out.
Projects
None yet
Development

No branches or pull requests

6 participants