Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Obi Rope build error with Unity 2023.1 on APK Build for XR
#1
Hi,

We are successfully using OBI Rope with Unity 2022.3 LTS or our OpenXR Unity Project for Meta Quest 2. We upgraded to Unity 2023.1 and we couldn't generate the APK due to gradle build error. We tried everything and slowly started isolating our plugins one by one till we were able to produce the error only with OBI Rope Asset. It works well with 2022 Unity but if OBI Robe is present in the project, it does not generate the APK build for Quest 2.

We are using Unity builtin XR Plugin Management with OpenXR plugin.

Code:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':unityLibrary:mergeReleaseNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction
   > 2 files found with path 'lib/arm64-v8a/libc++_shared.so' from inputs:
      - /Users/username/23TestXR/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/build/intermediates/merged_jni_libs/release/out/arm64-v8a/libc++_shared.so
      - /Users/username/23TestXR/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/build/intermediates/cxx/RelWithDebInfo/3p2l6l3t/obj/arm64-v8a/libc++_shared.so
     If you are using jniLibs and CMake IMPORTED targets, see
     https://developer.android.com/r/tools/jniLibs-vs-imported-targets

We are investigating more and will share if we can isolate the problem but I have created a sample project that contains only OBI Rope plugin and an empty scene. In order to reproduce just Open the project in 2023.1 Unity and switch build platform to Android and try to Build the APK. We tested this on mac and its not generating the build. If we remove OBI Rope asset then it builds successfully.

https://drive.google.com/file/d/1er0W8T6...sp=sharing
Reply
#2
(25-10-2023, 09:49 AM)vrtraining Wrote: Hi,

We are successfully using OBI Rope with Unity 2022.3 LTS or our OpenXR Unity Project for Meta Quest 2. We upgraded to Unity 2023.1 and we couldn't generate the APK due to gradle build error. We tried everything and slowly started isolating our plugins one by one till we were able to produce the error only with OBI Rope Asset. It works well with 2022 Unity but if OBI Robe is present in the project, it does not generate the APK build for Quest 2.

We are using Unity builtin XR Plugin Management with OpenXR plugin.

Code:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':unityLibrary:mergeReleaseNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction
   > 2 files found with path 'lib/arm64-v8a/libc++_shared.so' from inputs:
      - /Users/username/23TestXR/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/build/intermediates/merged_jni_libs/release/out/arm64-v8a/libc++_shared.so
      - /Users/username/23TestXR/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/build/intermediates/cxx/RelWithDebInfo/3p2l6l3t/obj/arm64-v8a/libc++_shared.so
     If you are using jniLibs and CMake IMPORTED targets, see
     https://developer.android.com/r/tools/jniLibs-vs-imported-targets

We are investigating more and will share if we can isolate the problem but I have created a sample project that contains only OBI Rope plugin and an empty scene. In order to reproduce just Open the project in 2023.1 Unity and switch build platform to Android and try to Build the APK. We tested this on mac and its not generating the build. If we remove OBI Rope asset then it builds successfully.

https://drive.google.com/file/d/1er0W8T6...sp=sharing

Hi,

If you're using the Burst backend (which is the recommended approach, since the native-library based Oni has been deprecated for some time now), there's no need to use libc++_shared.so. You can simply remove the library / exclude it from the build.

kind regards,
Reply
#3
(25-10-2023, 10:00 AM)josemendez Wrote: Hi,

If you're using the Burst backend (which is the recommended approach, since the native-library based Oni has been deprecated for some time now), there's no need to use libc++_shared.so. You can simply remove the library / exclude it from the build.

kind regards,

Thanks, so far its working well
Reply
#4
If I don't remove libc++_shared.so, will it cause any issues with the project besides the build error?
GB WhatsApp
Reply
#5
(11-04-2024, 10:18 AM)Corce Wrote: If I don't remove libc++_shared.so, will it cause any issues with the project besides the build error?
GB WhatsApp

Hi,

Impossible to tell without knowing what platform you're building for or what other libraries are included in the build.

Not removing it should generally not cause any issues, in any case, removing it will if your build doesn't contain another copy of it, and you're using the Oni (fallback) backend which requires it.
Reply
#6
Even though it's causing a build error now, are there any potential advantages to keeping libc++_shared.so in the project once the build issue is resolved?
picsart photo editor
Reply
#7
(01-07-2024, 03:00 PM)philljones22 Wrote: Even though it's causing a build error now, are there any potential advantages to keeping libc++_shared.so in the project once the build issue is resolved?
picsart photo editor

If you're using Burst (which you should definitely do) then no, libc++_shared.so is completely unused and can be removed.

kind regards,
Reply