Unable to build rive-android for contribution
Opened this issue · 3 comments
vegeta2102 commented
Description
Just want to build rive-android with debug mode as CONTRIBUTE.md step but I got a problem.
Error log
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':kotlin:configureCMakeDebug[arm64-v8a]'.
> [CXX1429] error when building with cmake using /Users/hoang.vu/Work/rive-android/kotlin/src/main/cpp/CMakeLists.txt: -- The CXX compiler identification is Clang 14.0.6
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Users/hoang.vu/Library/Android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring incomplete, errors occurred!
See also "/Users/hoang.vu/Work/rive-android/kotlin/.cxx/Debug/4h3l715i/arm64-v8a/CMakeFiles/CMakeOutput.log".
C++ build system [configure] failed while executing:
/Users/hoang.vu/Library/Android/sdk/cmake/3.22.1/bin/cmake \
-H/Users/hoang.vu/Work/rive-android/kotlin/src/main/cpp \
-DCMAKE_SYSTEM_NAME=Android \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_SYSTEM_VERSION=21 \
-DANDROID_PLATFORM=android-21 \
-DANDROID_ABI=arm64-v8a \
-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \
-DANDROID_NDK=/Users/hoang.vu/Library/Android/sdk/ndk/25.1.8937393 \
-DCMAKE_ANDROID_NDK=/Users/hoang.vu/Library/Android/sdk/ndk/25.1.8937393 \
-DCMAKE_TOOLCHAIN_FILE=/Users/hoang.vu/Library/Android/sdk/ndk/25.1.8937393/build/cmake/android.toolchain.cmake \
-DCMAKE_MAKE_PROGRAM=/Users/hoang.vu/Library/Android/sdk/cmake/3.22.1/bin/ninja \
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/hoang.vu/Work/rive-android/kotlin/build/intermediates/cxx/Debug/4h3l715i/obj/arm64-v8a \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/hoang.vu/Work/rive-android/kotlin/build/intermediates/cxx/Debug/4h3l715i/obj/arm64-v8a \
-DCMAKE_BUILD_TYPE=Debug \
-B/Users/hoang.vu/Work/rive-android/kotlin/.cxx/Debug/4h3l715i/arm64-v8a \
-GNinja \
-DCMAKE_VERBOSE_MAKEFILE=1 \
-DANDROID_ALLOW_UNDEFINED_SYMBOLS=ON \
"-DANDROID_CPP_FEATURES=no-exceptions no-rtti" \
-DANDROID_STL=c++_shared
from /Users/hoang.vu/Work/rive-android/kotlin
BUILD TYPE: Debug
Device & Versions
- MacbookPro Chip M3
- Android Studio Koala
- Device: Emulator Android15
- SDK Level [Android SDK API Level 35]
- ndk versrion : 25.1.8937393
vegeta2102 commented
[Update]
I also tried to build with the below command but got the error
./build.rive.for.sh -a arm64-v8a
~/Work/code/rive-android/kotlin/src/main/cpp
+ pushd /Users/[hoang.vu/Work/code/rive-android/kotlin/src/main/cpp/../../../../submodules/rive-cpp/../pls](http://hoang.vu/Work/code/rive-android/submodules/pls)
./[build.rive.for.sh](http://build.rive.for.sh/): line 158: pushd: /Users/[hoang.vu/Work/code/rive-android/kotlin/src/main/cpp/../../../../submodules/rive-cpp/../pls](http://hoang.vu/Work/code/rive-android/submodules/pls): No such file or directory
Base on the error content , I also tried to create pls
folder under the submodule but still get error at this line
+ premake5 --out=out/android/arm64/release --config=release --scripts=/Users/[hoang.vu/Work/code/rive-android/kotlin/src/main/cpp/../../../../submodules/rive-cpp/build](http://hoang.vu/Work/code/rive-android/submodules/rive-cpp/build) --with_rive_text --with_rive_audio=system --with_rive_layout --no-rive-decoders --os=android --arch=arm64 gmake2
Error: invalid option 'arch'
Any workaround here ?
vegeta2102 commented
It seems the problem comes from the Mac M3 chip ?
pratiksahu18 commented
any update?