-
Notifications
You must be signed in to change notification settings - Fork 10
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
Unable to compile Unity Android plugins #22
Comments
I'm going to look into this further but it looks like Visual Studio was getting in the way on my end.. I switched the generator to "Unix Makefiles" and built successfully
|
for future reference: https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-android and the examples for calling cmake on the commandline for NDK builds on windows use |
@BrianTopp interesting, I added some notes RE my experience with building for Android on windows: https://github.com/Cycling74/rnbo.unity.audioplugin#notes-for-cross-compiling-for-android-on-windows I am also running VS 2022 and I don't see those same issues RE the locks. Here is my commandline for reference:
|
Thanks! Yeah, after your previous comments I switched to using Ninja, and that seems to have solved all build issues on my end. I'm not sure what the issue with VS 2022 was. It looks like the only difference in what you've just posted is the "-DANDROID_CPP_FEATURES=exceptions", but I've tried recompiling with that argument and am still getting the same lock errors. I'll continue to use Ninja as that works well. Thanks for your help! |
Hello,
I submitted this through the Cycling 74 support, and they asked me to also post this here.
I’m struggling to get RNBO plugins to properly compile for Unity Android. I’ve been able to compile for Mac and PC (on respective platforms) but am unable to compile the same patches for Unity Android. I’ve been following along with the github docs but keep running into the same issue where it appears as though all of the files are created properly in the initial step, but then when building I get a number of errors that appear to be related to the RNBOWrapper.cpp. I’ve included the output errors below, which hopefully you can make sense of. I also fully understand that this repo is still in an experimental stage, so mainly want to draw attention to the issues and see if there is a current solution, or if perhaps there was some issue with my approach.
Thanks!
steps : Following the build steps on the RNBO Unity Audio Plugin repo, specifically for Android building
notes : This is console output, including the commands I inputted to start the build process:
PS E:\Repos\RNBO Unity Plugins\RNBO Build SRC\build> cmake .. -DANDROID_ABI=arm64-v8a -DCMAKE_TOOLCHAIN_FILE="C:\Program Files\Unity\Hub\Editor\2022.2.0f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\build\cmake\android.toolchain.cmake" -DPLUGIN_NAME="MyChorus" -DANDROID_PLATFORM=29 -DPLUGIN_UNITY_PLATFORM_NAME=Android
-- Building for: Visual Studio 17 2022
-- Android: Targeting API '29' with architecture 'arm64', ABI 'arm64-v8a', and processor 'aarch64'
-- Android: Selected unified Clang toolchain
-- The CXX compiler identification is unknown
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Unity/Hub/Editor/2022.2.0f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe - skipped
-- building for Android with bit depth 64 for CPU ARM64
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring done (3.2s)
-- Generating done (0.0s)
-- Build files have been written to: E:/Repos/RNBO Unity Plugins/RNBO Build SRC/build
PS E:\Repos\RNBO Unity Plugins\RNBO Build SRC\build> cmake --build .
MSBuild version 17.5.0+6f08c67f3 for .NET Framework
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
ANDROID_SDK_ROOT=C:\Program Files (x86)\Android\android-sdk
ANT_HOME=
JAVA_HOME=C:\Program Files\Android\jdk\jdk-8.0.302.8-hotspot\jdk8u302-b08
NDK_ROOT=C:\Microsoft\AndroidNDK\android-ndk-r23c
Checking Build System
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
ANDROID_SDK_ROOT=C:\Program Files (x86)\Android\android-sdk
ANT_HOME=
JAVA_HOME=C:\Program Files\Android\jdk\jdk-8.0.302.8-hotspot\jdk8u302-b08
NDK_ROOT=C:\Microsoft\AndroidNDK\android-ndk-r23c
Building Custom Rule E:/Repos/RNBO Unity Plugins/RNBO Build SRC/CMakeLists.txt
RNBOWrapper.cpp
In file included from :380:
(1,9): warning : 'ANDROID_API' macro redefined [-Wmacro-redefined] [E:\Repos\RNBO Unity Plugins\RNBO Build SRC\build\RNBOUnityPlugin.vcxproj]
#define ANDROID_API 29
^
(370,9): note: previous definition is here
#define ANDROID_API ANDROID_MIN_SDK_VERSION
^
In file included from E:\Repos\RNBO Unity Plugins\RNBO Build SRC\src\RNBOWrapper.cpp:7:
E:\Repos\RNBO Unity Plugins\RNBO Build SRC\export\rnbo\src\3rdparty\readerwriterqueue/readerwriterqueue.h(93,6): error : cannot use 'throw' with exceptions disabled [E:\Repos\RNBO Unity Plugins\RNBO Build SRC\build\R
NBOUnityPlugin.vcxproj]
throw std::bad_alloc();
^
E:\Repos\RNBO Unity Plugins\RNBO Build SRC\export\rnbo\src\3rdparty\readerwriterqueue/readerwriterqueue.h(108,5): error : cannot use 'throw' with exceptions disabled [E:\Repos\RNBO Unity Plugins\RNBO Build SRC\build
RNBOUnityPlugin.vcxproj]
throw std::bad_alloc();
^
E:\Repos\RNBO Unity Plugins\RNBO Build SRC\src\RNBOWrapper.cpp(22,23): error : no type named 'shared_mutex' in namespace 'std'; did you mean 'timed_mutex'? [E:\Repos\RNBO Unity Plugins\RNBO Build SRC\build\RNBOUnityP
lugin.vcxproj]
using rw_mutex = std::shared_mutex;
The text was updated successfully, but these errors were encountered: