realm-java
realm-java copied to clipboard
Build failed on realm-java/realm branch v7.0.0; realm-core v6.0.4
I am trying to build realm-java v7.0.0 from source code. I am using a windows based computer for the build, targeting android
When trying to build realm, here are the steps I took:
- Cloned realm-core and realm-java under the folder (checked out next to each other) o folder\realm-core o folder\realm-java
- Select a branch that would match the SDK and NDK tool versions that are already used in another project. SDK 28 (Pie) and NDK r21. The branches used are 6.0.4 and 7.0.0 for core and java respectively.
- Successfully build the realm-core project using the following command (as detailed in how-to-build.sh)
tools/cross_compile.sh -o android -a arm64-v8a -t Release
- Following the instructions from realm-java/readme.md, I downloaded the recommended NDK (r21), updated local.properties, added the required env variables and tried to build realm-java\realm using the command
.\gradlew assembleBase -PcoreSourcePath=..\..\realm-core -PbuildTargetABIs=arm64-v8a --info --stacktrace
There are no changes to the project other than updating the file local.properties to include ndk_dir value. As a precaution, I also checked out branch v7.0.0 for realm-java\recursive project. The change did not address the build results.
Essentially, the following is reported:
> Task :realm-library:externalNativeBuildBaseDebug FAILED
Caching disabled for task ':realm-library:externalNativeBuildBaseDebug': Caching has not been enabled for the task
Task ':realm-library:externalNativeBuildBaseDebug' is not up-to-date because:
Task has not declared any outputs despite executing actions.
externalNativeBuildBaseDebug: starting build
externalNativeBuildBaseDebug: reading expected JSONs
externalNativeBuildBaseDebug: done reading expected JSONs
externalNativeBuildBaseDebug: executing build commands for targets that produce .so files or executables
externalNativeBuildBaseDebug: evaluate miniconfig
externalNativeBuildBaseDebug: evaluate library lib_realm_core-Debug-arm64-v8a
externalNativeBuildBaseDebug: not building target lib_realm_core because there was no build command for it
externalNativeBuildBaseDebug: evaluate library OpenSSL::Crypto-Debug-arm64-v8a
externalNativeBuildBaseDebug: not building target OpenSSL::Crypto because there was no build command for it
externalNativeBuildBaseDebug: evaluate library realm-jni-Debug-arm64-v8a
externalNativeBuildBaseDebug: building target library realm-jni because no targets are specified.
externalNativeBuildBaseDebug: about to build C:\pathToAndroid\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe --build C:\folder\realm-java\realm\realm-library\.externalNativeBuild\cmake\baseDebug\arm64-v8a --target realm-jni
externalNativeBuildBaseDebug: evaluate library OpenSSL::SSL-Debug-arm64-v8a
externalNativeBuildBaseDebug: not building target OpenSSL::SSL because there was no build command for it
Build realm-jni arm64-v8a
externalNativeBuildBaseDebug: Executable : C:\pathToAndroid\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe
arguments :
--build
C:\folder\realm-java\realm\realm-library\.externalNativeBuild\cmake\baseDebug\arm64-v8a
--target
realm-jni
jvmArgs :
Executable : C:\pathToAndroid\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe
arguments :
--build
C:\folder\realm-java\realm\realm-library\.externalNativeBuild\cmake\baseDebug\arm64-v8a
--target
realm-jni
jvmArgs :
Starting process 'command 'C:\pathToAndroid\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe''. Working directory: C:\folder\realm-java\realm\realm-library Command: C:\pathToAndroid\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe --build C:\folder\realm-java\realm\realm-library\.externalNativeBuild\cmake\baseDebug\arm64-v8a --target realm-jni
Successfully started process 'command 'C:\pathToAndroid\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe''
ninja: error: FindFirstFileExA(/c:/folder/realm-java/realm/realm-library/.externalnativebuild/cmake/basedebug/arm64-v8a/jni_include): The filename, directory name, or volume label syntax is incorrect.
ninja: error: FindFirstFileExA(/c:/folder/realm-java/realm/realm-library/.externalnativebuild/cmake/basedebug/arm64-v8a/jni_include): The filename, directory name, or volume label syntax is incorrect.
ninja: error: FindFirstFileExA(/c:/folder/realm-java/realm/realm-library/.externalnativebuild/cmake/basedebug/arm64-v8a/jni_include): The filename, directory name, or volume label syntax is incorrect.
ninja: error: FindFirstFileExA(/c:/folder/realm-java/realm/realm-library/.externalnativebuild/cmake/basedebug/arm64-v8a/jni_include): The filename, directory name, or volume label syntax is incorrect.
I am using JDK 8, Android Studio 4.1.1, NDK 21.0.6113669, gradle 4.1.0, ninja 1.10.2
When trying to build the project from Android Studio, the following error is reported for realm-java\realm\realm-library\buiild.gradle (line 181..182): Cannot resolve symbol 'io'
android.registerTransform(new io.realm.transformer.RealmTransformer(project))
android.registerTransform(new io.realm.buildtransformer.RealmBuildTransformer(
Thank you for your comments and suggestions
➤ Clemente Tort Barbero commented:
You might try to follow the instructions available in the README.md. There is no need to manually fetch and compile core as it is configured as a git submodule.
Closing due to inactivity.